This topic describes how to link a dSource from a Microsoft SQL Server database.
Prerequisites
- Be sure that the source database meets the requirements described in Setting Up and Configuring Delphix for SQL Server.
- You must have already defined a staging environment as described in Adding a SQL Server Standalone Target Environment
- You must have already defined a source environment for the server or cluster that hosts the source database as described in Adding a SQL Server Source Environment
Maximum Size of a Database that Can Be Llinked
- As of Delphix 5.1, the maximum Source database size is 256 TB as long as the Staging Target is Windows 2008 or greater. This is also the largest size to which a virtual database (VDB) can grow.
- Prior to Delphix 5.1, the maximum Source database size is 32 TB as long as the Staging Target is Windows 2008 or greater. This is also the largest size to which a virtual database (VDB) can grow.
- If the Staging Target is Windows 2003, the largest Source database size is 2TB. This is also the largest size to which a virtual database (VDB) can grow.
In each case, the maximum size of the database and resulting VDBs is determined by the operating system in the staging environment.
Failover cluster environments cannot be used as staging environments
When linking a dSource, you cannot use SQL Server failover cluster instances as a Staging Target. When linking, you must use a SQL Server instance in a standalone target environment as the Staging Target.
Procedure
- Login to the Delphix Management application.
- Click Manage > datasets and click the icon. Then select Add dSource from the drop-down menu.
In the first page of the Add dSource wizard, select the source database by highlighting it.
Verify the version, source environment name, environment user account name, SQL instance name, and database name of the source database.
Changing the Environment User
If you need to change or add an environment user for the source database, see Managing Environment Users on Windows .
Enter the database login credentials for the source database.
Click Verify Credentials.
Click Next to go to the second page of the Add dSource wizard, entitled dSource Configuration.
By default, the name given to the dSource with be the same as the name of the source database. You can change it by typing a new name in the dSource Name text box.
If the name of the source database contains any non-ASCII characters, then please ensure that the dSource Name contains only ASCII characters.
Specify a Dataset Group (shown as Target Group) in which the new dSource will reside. This target group can either be an existing dataset group (one of the groups suggested in the selection box) or you can create a new dataset group by clicking on the Add Dataset Group link.
Dataset Group assignments are permanent
Once a dSource has been assigned to a target Dataset Group, it cannot be changed afterward. The only way to move a dSource to a different Dataset Group is to drop it and recreate it.
Dataset Groups and Permissions
By default, a dSource and its objects (like snapshots) inherit the Delphix Domain user permissions and policies associated with the Dataset Group to which the dSource belongs. You can override those policies and permissions on a case-by-case basis. For more information, see the topics under Users, Permissions, and Policies.
Click Next.
You must first choose how the Delphix Engine will capture the initial load image of the source database within the dSource, and then keep the image in sync with the source database. If you choose to enable Delphix Managed Backups, then the Delphix Engine becomes the backup solution for your SQL Server source database. If selected, then Delphix will periodically take a copy-only full backups of your source database based on the schedule specified by the selected SnapSync Policy. For more information, see Delphix as a Backup Solution to SQL Server.
This selection is permanent
It is only possible to enable Delphix Managed Backups on this page. Once a dSource has been linked, you cannot modify the use of this feature. If you enable this feature, the dSource can only use Delphix-initiated copy-only full backups to stay in sync with its source; the Delphix Engine will prohibit linking from existing backups.
- First, click the checkbox to enable Delphix Managed Backups.
- Next, select the Staging Environment and SQL Instance that will be used to manage the staging database used for the dSource.
- Then select the SnapSync Policy that will determine when and how frequently the Delphix Engine takes copy-only backups of the source database.
- If you want to create a new SnapSync policy, refer to the instructions for Creating Custom Policies.
- If you want to view or modify one of the existing policies, refer to the instructions for managing policies.
- If you do not enable Delphix Managed Backups, then you must specify how the Delphix Engine will capture the initial image of the source database and how it will keep the dSource synchronized with the source database.
- Select one of the following Initial Load options:
- Delphix will take a copy-only full backup of the source database.
- Delphix will use the most recent full or differential backup.
- Delphix will use a specific full or differential backup. This option requires that a Backup Set UUID value be provided to identify the backup.
- Next, specify Backup Paths in which the backups of the source database are available for the Delphix Engine to restore.
- Select Autodiscover to have the Delphix Engine automatically locate the backups by querying the MSDB database in the SQL instance.
- Otherwise, you can add multiple paths where backup files are available. To add a path, click on the (pencil icon). To add more paths, click on the + icon. For each path, please specify the top level of a particular backup path using UNC naming conventions, such as "\\hostName\shareName\subDirectory". Be aware that only hostName and shareName are required since the Delphix Engine will recursively search for the backup file in all sub-directories beneath the specified path. Specifying optional subDirectory names will limit the scope of the recursive search.
- Select the Staging environment and SQL Instance that will be used to manage the staging database used for validated sync of the dSource.
- Select the Validated Sync Mode that will be used to keep the dSource synchronized with the source database. Options are:
- Transaction log backups with LogSync disabled, see Advanced Data Management Settings for SQL Server dSources
- Transaction log backups with LogSync enabled, see Advanced Data Management Settings for SQL Server dSources
- Full or differential backups
- Full backups
- None
Note that the Delphix LogSync service is disabled by default. For more information about how LogSync functions and its advantages and disadvantages, see LogSync for SQL Server dSources.
- Select one of the following Initial Load options:
- Click the Advanced link at the bottom of the wizard page to specify the following additional options for linking the dSource to the source database.
- If the source database is backed up using LiteSpeed or RedGate with password protected encryption, you can supply the encryption key that the Delphix Engine should use to restore those backups.
- You can specify Pre-scripts and/or Post-scripts that the Delphix Engine should run before and/or after each SnapSync operation. For details on Pre- and Post-scripts, refer to Customizing SQL Server Management with Pre- and Post-Scripts. Please be aware that Pre- and Post-Scripts are an earlier functionality than Hooks, and are provided mainly for backward compatibility. If you are creating a new dSource and want to add functional customizations, it is better to specify that functionality using Hooks on the next page of the Add dSource wizard.
- You can also specify a Retention Policy that will determine how long the Delphix Engine should retain snapshots and transaction log files for the dSource.
- If the source database is backed up using LiteSpeed or RedGate with password protected encryption, you can supply the encryption key that the Delphix Engine should use to restore those backups.
- If you wish to add custom functionality to run prior to, or after, a sync operation, then please follow the instructions to create hooks as shown in Hooks for SQL Server.
- Click Next.
- Review the dSource Configuration and Data Management information. If anything is incorrect, go back to a prior page and correct it.
- Click Submit to start the creation of the dSource.
For initial load, the Delphix Engine will start two internal jobs to create and load the dSource, named DB_Link and DB_Sync. You can monitor these jobs by clicking Actions in the top menu bar, or by selecting Event Viewer from the System item in the menu bar. When the jobs have completed successfully, the icon for the source database in the Environments > environment > Databases window will change to a dSource icon, and the dSource will appear in the left pane of the Datasets window under its assigned group.
You can view the current state of Validated Sync for the dSource on the dSource pane.
The dSource Pane
Related Links
- Users, Permissions, and Policies
- Overview of Setting Up SQL Server Environments
- Linking a dSource from a SQL Server: An Overview
- Advanced Data Management Settings for SQL Server dSources
- Adding a SQL Server Source Environment
- Adding a SQL Server Standalone Target Environment
- Setting Up and Configuring Delphix for SQL Server
- Using Pre- and Post-Scripts with SQL Server dSources
- Managing Environment Users on Windows
- Delphix as a Backup Solution to SQL Server
- Creating Custom Policies
- Managing Policies
- Hooks fo SQL Server