Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Stored procedures, triggers, batches, and user-defined functions » Procedures

 

Copying a procedure (Sybase Central)

You can copy procedures between databases or within the same database by using Sybase Central. If you copy a procedure within the same database, you must rename the procedure or choose a different owner for the copied procedure.

Prérequis

To copy a procedure and assign yourself as the owner, you must have the CREATE PROCEDURE system privilege in the database you are copying the procedure to. To copy a procedure and assign a different user as the owner, you must have the CREATE ANY PROCEDURE or CREATE ANY OBJECT system privilege in the database you are copying the procedure to.

 Task
  1. In Sybase Central, use the SQL Anywhere 16 plug-in to connect to the database that contains the procedure you want to copy.

  2. Connect to the database that you want to copy the procedure to.

  3. Select the procedure you want to copy in the left pane of the first database, and drag it to Procedures & Functions of the second database.

Résultat

A new procedure is created, and the original procedure's code is copied to it. Only the procedure code is copied to the new procedure. Other procedure properties, such as privileges, are not copied.