Home Products Downloads Purchase Support News Members Company
SITE FEED
Support Forum
The fastest and most effective to get answers to your questions quickly. Click Here for more info.
FAQs
Quick answers to common questions. Click Here for more info.
Troubleshooting
Known issues and basic troubleshooting techniques for problems or unexpected behaviors. Click Here for more info.
Knowledgebase
Technical tips, How-to articles, and other tutorials about ApexSQL Tools. Click Here for more info.
Online Documentation
All of our help files for download or convenient viewing online. Click Here for more info.
Videos
Watch product demos, training videos, or tutorials of our products' main features.  We frequently upload new videos so check often for updates. Click Here for more info.

ApexSQL Knowledgebase

Tips and How-to Articles for Apex SQL Tools


How do I script my database objects to one output file per object?

SOLUTION
Scripting your database objects to one output file per object can be done using ApexSQL Script. The steps are discussed below:

1. Create a Project in Structure mode:



2. Enter your login credentials then select the database(s) you want to script.



3. In the Object filter, check the object types that you want to script. All object types will be selected by default. Click Connect.



4. Once connected, all database objects with object type equal to what you selected in the Project Wizard’s Object Filter step will be displayed on a grid. Check each object that you want to be scripted.

To script all displayed objects on the grid, right-click the grid and click Check All as shown in image below:



5. Once all objects are selected, click Script Wizard from the Outlook bar found on the left side of the interface.



6. In the Script Wizard, you will be presented with various scripting options. You can change them as required. To script just the DDL of the db objects (data not included), select Structure Only in Scripting Mode.



7. To produce one script file per object, click the File node of Script Wizard and select Script Each Object to an Individual File.

You can use the Filename Template step to set how you want your script files to be named. In example below, {objectname} is used. Your script files will then have ObjectName.sql filenames.



8. Specify the folder where you want to save your scripts.



9. Click Create. The scripts per individual object will be saved at the folder you specified.



AUTHOR
Irene Sanford

LAST REVIEW DATE
02 June 2008

Labels:



© 2008 Apex SQL Tools All Rights Reserved | 1.919.968.8444 | Contact Us | Terms of Use | Privacy Policy