ASA SQL Reference
SQL Statements
Use this statement to modify a procedure, or to enable and disable a procedure for replication with Sybase Replication Server. You must include the entire new procedure in the ALTER PROCEDURE statement.
ALTER PROCEDURE [ owner.]procedure-name
procedure-definition
procedure-definition:
CREATE PROCEDURE syntax following the name
ALTER PROCEDURE [ owner.]procedure-name
REPLICATE { ON | OFF }
ALTER PROCEDURE [ owner.]procedure-name SET HIDDEN
Syntax 1 The ALTER PROCEDURE statement is identical in syntax to the CREATE PROCEDURE statement except for the first word. Either version of the CREATE PROCEDURE statement can be altered.
Existing permissions on the procedure are maintained, and do not have to be reassigned. If a DROP PROCEDURE and CREATE PROCEDURE were carried out, execute permissions would have to be reassigned.
Syntax 2 If a procedure is to be replicated to other sites using Sybase Replication Server, you must set REPLICATE ON for the procedure.
Syntax 2 of the ALTER PROCEDURE statement has the same effect as the sp_setreplicate or sp_setrepproc 'table' Adaptive Server Enterprise system procedures.
Syntax 3 You can use SET HIDDEN to scramble the definition of the associated procedure and cause it to become unreadable. The procedure can be unloaded and reloaded into other databases.
This setting is irreversible. If you will need the original source again, you must maintain it outside the database. |
If SET HIDDEN is used, debugging using the stored procedure debugger will not show the procedure definition, nor will it be available through procedure profiling.
You cannot combine Syntax 2 with Syntax 1. You cannot combine Syntax 3 with either Syntax 1 or 2.
Must be the owner of the procedure or be DBA.
Automatic commit.
Hiding the contents of procedures, functions, triggers and views
SQL/92 Vendor extension.
SQL/99 Vendor extension.
Sybase Not supported by Adaptive Server Enterprise.