Exporting routines to a script
Use the Export a Routine wizard to export stored procedures or user-defined functions to a script file for later deployment. You can save the export script in a project, or you can save the script to the local file system. If you are exporting to the file system, you can also choose to create a ZIP file that includes all associated export files.
To export a routine to a script:
- Switch to the Data perspective.
- In the Data Definition view, right-click either the Stored Procedure or User-Defined Functions folder, and click Export from the pop-up menu. The Export a Routine wizard opens.
- Complete the steps of the wizard.
The export script is saved in the project or the file system. If you exported to a project then the script is located in the Scripts folder. If you exported to the file system you will see the export script and instructions that describe how to deploy the script in a file called DeployInstructions.txt in the folder that you specified. The export script is either an SQL file or an XML file, depending on the routine type and target database.