General
Apex SQL Audit
Apex SQL Clean
Apex SQL Code
Apex SQL Diff
Apex SQL Doc
Apex SQL Edit
Apex SQL Enforce
Apex SQL Log
Apex SQL Script
Knowledgebase Home
Apex SQL Audit
Apex SQL Clean
Apex SQL Code
Apex SQL Diff
Apex SQL Doc
Apex SQL Edit
Apex SQL Enforce
Apex SQL Log
Apex SQL Script
Knowledgebase Home
|
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: Apex SQL Script ...How to use ApexSQL Script to deploy a database as a .Net executable DESCRIPTION ApexSQL Script allows you to script your SQL Server Database structure and data and compile it into a .Net executable. This executable can be run from any pc without the need to have the SQL Server client tools installed. SOLUTION To create a .Net executable, select .Net package as your output type in the Script wizard: ![]() Selecting the output type determines the various customizable output options. For a .Net executable, you can configure the output processing options: ![]() Checking the “Use Compression” option will cause ApexSQL Script to try to reduce the size of the executable by using .Net algorithms. The “Run Executable Now” option simply means that the exe will be invoked the moment it has been compiled The Error handling step determines how errors will be handled when the package is executed. For .net executables the errors are handled internally which gives the package greater control and allows you select from the follow options for the treatment of errors: ![]() • Abort All changes which have been applied so far will be rolled back. • Ignore Errors will be ignored and the package will proceed as if nothing happened. • Ask for confirmation A message box will appear when an error is encountered to allow the user to select the appropriate action. ![]() You can also set the default database properties for the package: ![]() If you check the “Indicate Default Database” option, a default database will be recommended on the connection screen when you run the executable: ![]() ApexSQL Script also allows you to customize the details of the About Box: ![]() This information is then displayed when the About button is clicked on the Installer: ![]() Clicking on the create button will then create a .exe file.To run the newly created package, double click the .exe in explorer: ![]() This opens the installer: ![]() You can create a new database or edit an existing database. Once you have entered the connection details of the database you want to create or edit, click "Run". This will execute the package and create or edit the database, using the script generated by ApexSQL Script: ![]() You can verify that the database has been created using SQL Server Management Studio: ![]() AUTHOR Minette Steynberg LAST REVIEW DATE 01 September 2007 Labels: Apex SQL Script ...Welcome to the ApexSQL Knowledge Base Welcome to the ApexSQL Training Knowledge Base. Here you'll find tips, reviews, videos, and articles on how to get the most out of ApexSQL Tools and Microsoft SQL Server. Labels: Apex SQL Audit, Apex SQL Edit, Apex SQL Script, ApexSQL Clean, ApexSQL Code, ApexSQL Diff, ApexSQL Doc, ApexSQL Enforce, ApexSQL Law, ApexSQL Log, ApexSQL Report, General ... |
© 2008 Apex SQL Tools All Rights Reserved | 1.919.968.8444 | Contact Us | Terms of Use


















will then create a .exe file.


