This page describes how to create SQL Server Configuration for log shipping. Before proceeding further, make sure that Dbvisit StandbyMP was installed correctly fulfilling all prerequisites described here: https://dbvisit.atlassian.net/wiki/spaces/DSMPV12/pages/4403331076/Installation+Requirements#1.-Common-Requirements and that your SQL Server version is supported: https://dbvisit.atlassian.net/wiki/spaces/DSMPV12/pages/4397268995/Database+Support#2.-SQL-Server-Database-Support
SQL Server log shipping configuration is always per database pair (not instance pair).
1. Considerations and Prerequisites
Before creating SQL Server configuration, following considerations and prerequisites need to be addressed on primary and standby host:
1.1 Primary SQL Server Database Log backup Chain
In order for log shipping configuration to work correctly, Dbvisit StandbyMP needs to take control of the primary database log chain. Dbvisit is however able to leave copies of transaction log backups on the primary server in specific directory. You may need to modify your current primary server backup configuration to use these transaction log backup copies.
1.2 Primary and Standby OS and SQL Server Configuration
It is recommended that the primary and standby server operating system versions match.
SQL Server Software is installed on both the primary and standby database servers and the SQLServer instance is up and running.
SQL Server version must be supported as per https://dbvisit.atlassian.net/wiki/spaces/DSMPV12/pages/4397268995/Database+Support#2.-SQL-Server-Database-Support
The SQL Server Database software must use the same Edition - mixing editions is not Supported
You have a Primary Database already configured and it is online and in full recovery model
1.3 SQL Server Instance TCP/IP Enabled
SQL Server Instance must have TCP/IP enabled. You can verify this by running:
SQLServerManager15.msc
The executable name differs according to your version:
SQL Server 2022 (16.x) C:\Windows\SysWOW64\SQLServerManager16.msc
SQL Server 2019 (15.x) C:\Windows\SysWOW64\SQLServerManager15.msc
SQL Server 2017 (14.x) C:\Windows\SysWOW64\SQLServerManager14.msc
SQL Server 2016 (13.x) C:\Windows\SysWOW64\SQLServerManager13.msc
SQL Server 2014 (12.x) C:\Windows\SysWOW64\SQLServerManager12.msc
SQL Server 2012 (11.x) C:\Windows\SysWOW64\SQLServerManager11.msc
And then verifying TCP/IP is enable for your SQL Server instance (in this example MSSQLSERVER):
1.4 SQL Server Instance Authentication modes
Authentication mode must be set to “SQL Server and Windows Authentication mode”. You can verify this by starting SQL Server Management studio, logging to your instance and selecting properties:
On the Security tab, make sure the “SQL Server and Windows Authentication mode” is selected.
1.4 SQL Server Browser Service
SQL Server browser service must be up and running on your system:
2. Create SQL Server Configuration
To create configuration, choose NEW CONFIGURATION in the dashboard and select “Start with SQL Server”
It is also possible to add SQL Server instances individually by selecting “SQL SERVER INSTANCES” and then choose “Start with SQL Server”
On the following page, select your first server instance (1) and choose SQL Server Authentication (2) or Windows Authentication (3):
If choosing SQL Server Authetication, you will need to enter appropriate username with password for the SQL Server instance (4). Server role sysadmin is required for this account. Finally, click on Discover Instance (5). Summary of discovered instances will be shown:
You will see instances which Dbvisit dbvagentmanager was able to connect to (1), instances which we failed to connect (2) (in this example, this instance was shut down). Once you confirm the result, click on Confirm & Add Instances (3).
On the next screen you will see the newly added instance together with present databases (1) and you will need to select now the second instance host (2):
Start by selecting standby host (1), select preferred authentication method (2) - in this example we’ll choose Windows Authentication and finally “Confirm & Add Instance(s) (3):
Once you add the second instance, following form will appear where you can add individual databases:
You will be able to multi-select with single mouse click the databases for each discovered instance from the provided list (1). Note that:
only read-write database are listed
you cannot select databases from multiple source instances at once. So in this example selecting database “ocean” from instance on CZWIN0192 (3) is impossible, because it will de-select all databases from instance on CZWIN0191
You can use the clickable text “Select All Databases” for your convenience
Once you select database(s) select DR instance (2) you will see configuration details for your selected database(s):
Number | Description | Setting Explanation |
---|---|---|
1 | Checking Host connectivity | The connectivity check will test communication on port 7890 TCP between primary and standby. If it’s not working you will not be allowed to continue. Working communication is indicated by green checkmarks. |
2 | Custom Backup Locations for all selected Databases | This setting will allow you to select custom backup location for all databases. This location will be used for log backup shipping on primary and standby (you can select separate values for primary and standby): You can enter values directly or use Browse button. Click save to use the provided values. |
3 | Exceptions | When setting backup locations for all databases, you’re able to provide exceptions. This is useful when you’re creating configurations for multiple databases and you want specific setting only for a few databases from the whole list. Selecting the database from the dropdown list and clicking on Set Button will bring up popup window: Where you can select specific location for a single database overriding locations set by “Custom backup locations for all selected databases”. The selected directory must exist (it will not be automatically created). The specified exception will look like so: |
4 | Licence Key | Enter valid Licence Key |
5 | Create Configurations | Clicking on this button will create configuration for each database you selected. |
When using custom locations, you must ensure that that the directories must have writable privileges for:
User who runs dbvagentmanager service on standby
SQL Server Instance service account
You can refer to Microsoft Documentation: https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-file-system-permissions-for-database-engine-access?view=sql-server-ver16
Once the configurations are created you will be able to see all of them in the dashboard:
If the database is shown in red with no option “Set up Now” it means it’s recovery model is simple. You will need to set the database recovery model to full before you will be able to create standby database.
Comments