• No results found

Using the Synchronization wizard

© Red Gate Software Ltd 71 15 July 2009

status in some situations (if you are not using SQL Changeset for source control integration)

For more information, see Working with scripts folders (page 83)

1. Choose synchronization method

On the first page of the Synchronization Wizard you can choose to create and save a synchronization script, perform the synchronization using SQL Data Compare, or update a scripts folder:

Create a synchronization script

If you choose to create a synchronization script, on the Review page you can save a copy of the script or open it in your SQL editor.

To change the application you use to open the script, click Change. The Application Options (page 55) dialog box is displayed, and you can specify the default application used to edit SQL Scripts.

© Red Gate Software Ltd 72 15 July 2009

Synchronize using SQL Data Compare

If you choose to synchronize using SQL Data Compare, on the Review page you can save a copy of the script and exit the wizard, or click Synchronize Now to perform the synchronization.

If the target is a scripts folder, this option is instead replaced by Update the scripts folder, and the SQL script files in the target are modified when you synchronize. If you select Back up target before synchronization, a step is added to the Synchronization Wizard (page 75) allowing you to specify details of the backup.

Note that if the target is a backup, the option to synchronize using SQL Data Compare is not available. Instead, synchronizing creates a script to modify the data source form which the backup was created.

2. Configure backup (optional step)

If you selected the option to back up before synchronization, the Configure backup

page is added to the Synchronization Wizard.

If the target is a database, this page allows you to perform a backup before synchronization.

© Red Gate Software Ltd 73 15 July 2009

Perform a full backup

When the target is a database, you can perform a full backup. In the Back up using box , select:

Native SQL Server to create a backup using the native SQL Server BACKUP command

Red Gate SQL Backup to create a backup using SQL Backup (http://www.red-

gate.com/products/SQL_Backup/index.htm) version 4 or later

Note that to use Red Gate SQL Backup, you must have the SQL Backup server components installed on the SQL Server instance of the target database. For more information, see Backing up before synchronization (page 75)

© Red Gate Software Ltd 74 15 July 2009

3. Review

There are three tabs on the Review page:

Synchronization script shows the script to synchronize the data sources. You can search the script, save it, or copy it to the clipboard.

Summary shows a synopsis of the actions in the synchronization script. You can view the summary grouped by the objects affected, by the type of modification, or by the order in which the script modifies the target.

Warnings shows a list of any warnings about unexpected behavior that may occur when you synchronize the databases.

For more information, see Warnings (page 78)

If you are updating or creating a scripts folder, the Files tab lists the object creation and data script files modified or created during synchronization.

When you have reviewed the script, click Synchronize Now to perform the synchronization.

© Red Gate Software Ltd 75 15 July 2009

The Configure Backup page of the Synchronization Wizard allows you to perform a full backup using either Red Gate SQL Backup (http://www.red-

gate.com/products/SQL_Backup/index.htm), or SQL Server native backups.

Backup name and location

For SQL Server native:

1. Type the file path in the Backup folder box or click to specify the path using the folder browser. By default, Backup folder is set to the default backup folder for the SQL Server instance.

2. Type the file name in the box to the right of the Backup folder box. For Red Gate SQL Backup:

1. Type the file path in the Backup folder box or click to specify the path using the folder browser. By default, Backup folder is set to the folder specified in the SQL Backup options for the SQL Server instance. If no backup file locations have been set up, SQL Backup uses the SQL Server instance's default backup folder.

2. Specify the file name in the box to the right of the Backup folder box. By default, the file name is set to <AUTO>.sqb; SQL Backup uses the SQL Backup options to generate the backup file path and file name. If no backup file locations have been set up, SQL Backup uses the SQL Server instance's default format for file names.

To change the file name, clear the Name file automatically check box, and type the required file name. You can use SQL Backup tags, if required. For information about tags, see File Location Tags in the SQL Backup online help.

To specify a network path in the Backup folder box, type the full path, including the server name, for example \\ServerName\MyFolder

Note that the file path is relative to the selected SQL Server. For example, if you have chosen to back up a database on a remote SQL Server instance called ServerA and you specify a local path such as C:\Backups, the backup files will be created on the C: drive on ServerA, not on the local computer.

Select the Overwrite existing backup files of the same name check box if you want to overwrite any files of the same name that exist for the file path you specified in the

Backup Folder box. Note that if a file of the same name exists already and you have not chosen to overwrite it, the backup will fail if you are using SQL Backup.

Backup compression (Red Gate SQL Backup only)

If you are using SQL Backup to back up the target database, you can choose from the three compression levels described below. Generally, the smaller the resulting backup file, the slower the backup process.