SQLScripter is a powerful command line utility that scripts SQL Server objects. The utility is designed to automate the process of schema generation.
SQLScripter scripts your entire server(s). Schedule an automatic job that scripts all database level objects and server level objects on a daily or weekly basis.
SQLScripter offers flexible configuration options meeting various needs. You can script all your production servers from a single location while nothing is installed on any SQL Server instance.
SQLScripter can script all objects of the same type to a single file, i.e. a single file containing all tables, a single files containing all Views and so on, or script every object to it’s own file which is useful when you develop your database under source control and need to check out and check in files.
Oooops… a problem found in a stored procedure loaded in the recent version – no need to look for the appropriate backup and restore. Save that time and immediately get the required object available on your file system.
Your developers access the production servers to see if the schema matches the schema at their environment – not any more, automate a job that brings the production schema to your organization and save your developers and your organization a lot of precious time.
Besides the ability to script all objects there are many command line switches that are helpful in the DBA”s daily tasks, for example while tuning indexes the I switch will generate indexes script files useful for backup purposes. Similarly the FK switch will generate a script file contains the CREATE statements for all Foreign Key Constraints. This can be done for a single database, a few databases or all databases on the server, or for all servers defined in the configuration file. In the same way the TR switch will script triggers. DBAs working with Replication may find the NFR (NOT FOR REPLICATION) switch useful.
SQLScripter can be useful in High Availability scenarios where you need to assure that objects belonging to a specific server are always available and exists on another server when a disaster event occurs.
Many High Availability solutions do not take care of server level objects (jobs, logins, linked servers etc) and SQLScripter well addresses this requirement.
SQLScripter is a professional tool at a low cost price.
Installation and configuration is quick. The product is very light and when you install it you do not effect anything on your machine.
Obtain a license
- Purchase a license by clicking the PayPal button
- Email the ComputerName.tek file (located at your working folder) to firstname.lastname@example.org
- Receive a reply mail containing the license file
- Locate the received license file at your working folder. The working folder is the folder where SQLScripter is installed. If the default installation path was not modified during the installation then the path should be:
C:\Program Files\SQLScripter\ (x64 machines)
C:\Program Files (x86)\SQLScripter\ (x86 machines)
Your license includes support and updates with no additional fee.
SQLScripter requires Microsoft .NET Framework version 3.5 installed on the machine where the program is installed (if required a version that requires .NET 2 is available).
SQL Server’s port open one direction from the machine installed with SQLScripter and the SQL Server(s) being scripted.
Supported operating systems
Windows Server 2000
Windows Server 2003
Windows Server 2008
Windows Server 2008 R2
Windows Server 2012
SQLScripter terminates with a return value of 0 on success and 1 on failure.
SQLScripter does not script encrypted routines.
Run SQLScripter.msi file to install the program.
Following the installation edit SQLScripter.exe.config file and Servers.config file.
Once the two files have been configured you can launch the program by running SQLScripter.exe file.
There is one configuration file to edit before running SQLScripter.exe:
SQLScripter.exe.config (see the bellow table for details)
SQLScripter.exe.config is where you define all the configuration settings required.
There are various settings that if required can be modified by editing the file log4net.config.
The key “file” represents the logs file location and defaults to the working directory.
The key “maxSizeRollBackups” defaults to 5 which represent the maximum number of log files that are available at a given time. The files are managed in a FIFO (First In First Out) algorithm.
The key “maximumFileSize” defaults to 10 which represent a size of 10MB per log file.
When applying for support please send a description of the problem encountered to email@example.com with SQLScripter in the subject of the mail and attach the following files:
|Server||ServerNameServerName\Instance||For a default instanceFor a named instance|
|Database||db1; db1; db2; db3; All||Script specific database. A semi column separated list of databasesAll databases|
|ObjectsToScript||U; V; P; FK; FN;All||Script specific object. A semi column separated list of objectsAll objects|
|FN||User Defined Functions|
|FK||Generates two files: One file creates Foreign Key Constraints One file drops all Foreign Key Constraints|
|TR||DML Triggers – Generates two files: One file creates all Triggers One file drops all Triggers|
|I||Generates three files: One file creates all indexes One file creates all indexes excluding PK One file drops all indexes excluding PK|
|DDL||DDL Database Triggers|
|DDLSRV||DDL Server Triggers|
|J||Generates two files: One file containing all Jobs One file containing all Jobs apart of Replication jobs and Maintenance Plan jobs|
|DDLSRV||DDL Server Triggers|
|UG||Generates three files, this is the combination of J + L: One file containing all Jobs One file containing all Jobs apart of Replication jobs and Maintenance Plan jobs and one file contains Logins|
|DDLSRV||DDL Server Triggers|
|US||Database Users (Principals)|
|PP||GDR (GRANT, DENY, REVOKE) permissions of objects, Users and Logins|
|NFR||Generates 9 files: A DROP, CREATE AND CREATE NOT FOR REPLICATION per each object type: Foreign Key Constraints, Check Constraints and DML Triggers|
|Output Path||C:\sqlscripter_out||The path where SQLScripter will create the folder and generate the script files. This can be a local path, a mapped drive, a network drive or a UNC path (Universal Naming Convention; \\computername\sharedfolder\resource). If the OutputPath is not local a UNC path is the preferred option. The account executing SQLScripter requires the appropriate permissions to connect and create folder and files at the OutputPath. If OutputPath is not supplied or OutputPath is not a valid path then the current location is assumed (the location where SQLScripter.exe is executed from)|
|ZipDir||Boolean: true/false||Zip the output folder.|
|ZipPW||String||If the ZipDir key is configured with a value of 1 then optionally you may protect the zip file with a password|
|DeleteOutputPathAfterZip||Boolean: true/false||If the ZipDir key is configured with a value of 1 then optionally you may delete the Output folder thus leaving just the zip file|
|AuthenticationMode||Boolean: true/false||Windows Authentication|
|DaysToKeepOutputFolder||Int||Define the retention period in days|
|126.96.36.199||Fixed minor issues of compatibility with objects not supported by SQL Server 2000||07/10/2007|
|188.8.131.52||Fixed minor issues of compatibility with objects not supported by SQL Server 2000||03/11/2007|
|184.108.40.206||Added connectivity using SQL Login||07/01/2008|
|220.127.116.11||Added the I (Indexes) switch||05/02/2008|
|18.104.22.168||Added the NFR switch||11/03/2008|
|22.214.171.124||Fixed a problem that the zip file was corrupted||17/11/2008|
|126.96.36.199||Fixed a problem that the zip file was corruptedAdded the passwords hashed to the Logins script (SQL 2005 only)Add the option to supply a semi column separated list of database names in addition to a specific database name or the “ALL” options available in previous versionsAdd the UG switch (Upgrade)SQL Server 2008 compatible||19/02/2009|
|188.8.131.52||Add a license requirement to run the utility in the fully featured Standard Edition while the Freeware Edition becomes limited in featuresReplaced the logger with the log4net loggerAdd a Cleanup task that deletes old Output FoldersAdd the option to supply a semi column separated list of objects in addition to a specific object name or the “ALL” options available in previous versionsAdd the LS switch (Linked Servers)||24/08/2009|
|184.108.40.206||Add the PP switch (GDR Permissions)Fixed an issue that indexes of Indexed Views were not scripted||20/10/2009|