Setting Up AB Suite for Database Mirroring

AB Suite supports Database Mirroring functionality provided by SQL Server. You must set up AB suite for database mirroring on the following servers:

Using the Runtime Server
  1. Install AB Suite Runtime software.

  2. Click All Tasks > Register Database Server in the Runtime Administrator Tool to register the principal SQL Server as a database server.

  3. Add a new runtime database.

  4. Deploy a sample system to the newly created database.

  5. Change the schema password in Windows Runtime and SQL Server by using the Administrator Tool.

  6. Ensure that the system is working.

  7. Stop and disable the system.

  8. Shut down all running instances of dllhost.exe.

Using the Principal SQL Server
  1. Retrieve the SQL Server ID (SSID) of the runtime schema (to which AB Suite system is deployed).

    Query: SELECT SID FROM sys.server_principals where Name='<Runtime DB SCHEMA name>'
  2. Complete a backup of the runtime database from the principal server.

  3. Complete a backup of the transaction log of the runtime database from the principal server.

Using the Mirror SQL Server
  1. Create a database on the mirror server with the same name as that of the runtime database on the principal instance.

  2. Copy the database and transactional log backup files to the mirror server.

  3. Create a schema login for the newly created database on the mirror server with the same name and SID as on the principal server. Set the schema password to match the password on the principal server.

    Query: CREATE login SAMPLE WITH password='Welcome@123', sid=<SID same as principal DB>
  4. Update the login after it is created.

    Query: exec sp_change_users_login ’Update_One’, '<user name>', '<Schema login name>'
  5. Restore the complete backup of the principal database to the mirror database with the NO RECOVERY option.

  6. Restore the backup of the transactional log of the principal database to the mirror database with the NO RECOVERY option.

Configuring SQL Mirroring

To configure SQL mirroring on the principal database, perform the following:

  1. Connect to the principal instance in Microsoft SQL Server Management Studio.

  2. Select the database to be mirrored on the principal server, for example, SAMPLEDB.

  3. Right-click the database, and select Tasks > Mirror.

    The Mirroring page of the Database Properties dialog box is displayed.

  4. Click the Configure Security button to begin the SQL mirroring configuration.

    The Configure Database Mirroring Security Wizard is displayed.

  5. Click Yes to add a witness server.

  6. Click Yes to configure the witness server.

  7. Select the Witness server instance check box.

  8. Configure the Principal, Mirror and Witness server by entering the corresponding Listener port, for example, 5022 and the Endpoint name for example, Mirroring.

  9. Verify the server configuration summary.

  10. After setup is completed, the status of Endpoint configuration is displayed.

    This completes the setup of the SQL mirror.

  11. Click the StartMirroring button to start SQL Mirroring.

    The change in database status from this database is not configured for mirroring to the databases are fully synchronized is displayed.

    Notes:

    • Principal server database status “SAMPLEDB (Principal, synchronized)”.

    • Mirror server database status “SAMPLEDB (Mirror, Synchronized / Restoring...)”.