SQL Compare - 8.0
Learning SQL Compare - 8.0
Working with scripts folders
A scripts folder is a set of object creation scripts representing a database schema. A script file is created for each object, and different object types are stored within subfolders you can specify.
You can use scripts folders:
- for version control of databases
For example, you may want to store the script files in a source control system, so that you can track the modified or new objects.
Note that if you are using a 'check out/edit/check in' (VSS style) source control system, you can use SQL Changeset to integrate SQL Compare Professional Edition with your source control system. For examples and details of how to use SQL Changeset, see Using SQL Changeset.
- to compare databases on unconnected SQL Servers
You can create and compare scripts folders only if you are using SQL Compare Professional Edition.
Creating a scripts folder
To create a new scripts folder, on the File menu, select Create Scripts Folder.
The Create New Scripts Folder dialog box is displayed:
Under Data source details, specify the details of the source for the scripts folder. You can create a scripts folder from a database, backup, snapshot, or another scripts folder.
Under Scripts folder properties, specify a name and location for the scripts folder.
SQL Compare automatically detects the case sensitivity of the data source. If you want to override this, clear the Auto detect case sensitivity check box, and select the Treat items as case sensitive check box if required.
By default, SQL Compare decrypts text objects in SQL Server 2008 and SQL Server 2005 databases that were created using the WITH ENCRYPTION option. When comparing large databases, selecting this option can result in slower performance.
Note that:
- when the source is a snapshot, the case sensitivity and decryption options are not available
- when the source is a scripts folder, the decryption option is not available
Can I use my own scripts?
You can also use your own object creation scripts as a data source. SQL Compare will determine any object dependencies and read the scripts in the correct order.
Comparing and synchronizing scripts folders
You can:
- compare a scripts folder with another data source
- synchronize a scripts folder
When a scripts folder is the target, you can either:
- Create a synchronization script to update the database from which the scripts folder was created
- Modify files in the scripts folder directly.
Note that when an object is dropped during synchronization, its script file is not deleted.
If a scripts folder is the target, and any of the script files that will be modified are designated as read-only, then a warning is displayed. If you click Yes to continue, then these files will be made writable so that they can be modified. This may occur, for example, when you are working with a source control system that sets files to read-only status in some situations (if you are not using SQL Changeset for source control integration)
Fore more information, see Using the Synchronization wizard
More information about scripts folders
This section provides further information about using object creation scripts as a data source in SQL Compare.
- White space
SQL Server does not always process white space and comments correctly at the beginning and end of the object definition for some objects such as views, stored procedures, and rules. You are therefore recommended to select the Ignore White Space option when you use a scripts folder as a data source.
- Numbered stored procedures
If you are using a scripts folder as a data source, numbered stored procedures are not supported.
- CLR assemblies
SQL Compare can compare object creation scripts that contain CLR assemblies, or include paths to assembly files. When synchronizing to a scripts folder, SQL Compare will use the hexadecimal content of the assembly.
- Certificates, symmetric keys, and asymmetric keys
These are not supported when you use a scripts folder as a data source.
- Comments
When you select a scripts folder as the target data source, SQL Compare preserves comments in object types such as views and stored procedures. However, this is not possible for non-textual object types such as tables. Comments that are part of a table definition will be lost when the table is modified and the object creation script updated.
See also |
Was this article helpful?
SQL Compare
- Logging and log files
- Stored Procedures and Functions created with wrong name
- Synchronization scripts may be in incorrect version of SQL syntax
- Extended properties not permitted error (version 5.2)
- CLR Procedures' permissions are not recreated (version 5)
- Support for 'returns NULL on NULL Input' in CLR functions (version 5)
- Project files (scp files) suddenly appear on desktop (version 5)
- Stored procedures using full-text queries fail to synchronize
- When does the synchronization process rebuild tables?
- Unable to begin a distributed transaction error synchronizing databases
- User or role already exists in the current database error
- Clarification on the "Ignore Triggers" option in the SQL Compare command-line version
- Common table expressions returned by User Defined Functions may fail
- Can't compare encrypted text in SQL Server 2005, 2008
- Exception when connecting to SQL Server (Version 6)
- SQL comparison and synchronization automation capabilities
- Error logging in SQL Compare 6.2
- Using Team Foundation Server source control system
- Creating a SQL 2000 compatible database from a SQL 2005 database using SQL Compare
- Support for numbered stored procedures
- SQL Compare 7 Object-level restore
- Index was outside the bounds of the array error when registering databases X64
- HTML reports are generated for identical comparisons
- Comparison may seem slower than necessary
- DEFAULT_SCHEMA clause cannot be used with a Windows group
- SQL Compare may drop and create CLR assemblies
- SDK activation prompt may appear when starting a new SQL Compare project
- Column does not allow nulls. INSERT fails
- This SQL Server has been optimized for x concurrent queries.
- SQL Compare comparison differences
- Using SQL Server Management Studio Express as a query editor
- How to force SQL Compare and SQL Data Compare to use an Encrypted Connection
- Invalid SQL when synchronizing an index to a scripts folder when data compression is specified
- Tips
- Changes to distribution of command line
- Common error messages
- Copying the structure of a database
- Permissions required to use SQL Compare
- Rollback on script failure or cancellation
- Errors in scripts folders
- Logging and log files
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
SQL Compare
- Activating your products
- Activating your products
- Getting help offline
- Release notes - version 9.5 EAP
- Introducing SQL Compare 8: FAQs for SQL Compare 7 users
- Release notes - version 10.xx
- SQL Compare release notes - version 9.xx
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs


Using SQL Compare
Working with other data sources