Creating a mirror for your Citrix database
Options
SQL server Preparation
- Disk and data directories
- Service account
- Data – D:Data
- Log – E:Log
- Backup – D:Backup
Mirror preparation
- Backup of database
- Backup of transaction log
- Restore of database on mirror
- Restore of transaction log on mirror
We’re now on the principal server!
For this blog I used a new database for the Citrix database was mirrored already and I saw no reason to break that.
From The database via TASK you select BACK-UP. You are taken to the next screen, Make sure you select FULL backup type here and start the backup, it will take mere seconds to complete.
We’re now on the mirror server!
Click on the Options and change the recovery state to RESTORE WITH NORECOVERY.
Next step is to restore the transaction log, so right click the database and navigate via TASK / RESTORE to Transaction Log.
Select From file or tape and browse for the transaction log backup file.
Click on the options and set the recovery state to “Leave… NORECOVERY”
After the restore you get the message that it was successful, don’t worry about the restore message behind the database, it will stay there.
Mirror setup
A new wizard will start, this will configure the mirror configuration.
Click on Next to start.
We want to use the Witness server so click on YES and then next.
Make sure you have all server marked.
First server is our principal server, check the server names before you continue or connect.
The Endpoint name is by default MIRRORING but can be changed, because here we only want to mirror the Citrix database I named it CitrixXenApp.
The second server is the mirror server, so make sure the mirror server is listed and click on connect.
You are prompted to log on to the server again make sure the mirror server is selected. Once the connection is successful the wizard continues.
The witness server is the last one, make sure the correct server is listed. Here I used a SQL Express version for the Witness so that was easy to remember.
Again a pop-up and again a log on to the server.
The last screen of configuration is the screen with the service accounts, you have to define which service accounts you are using on each server. I used the same one on each server, it was a domain user account.
After you configured all that a nice overview is presented to show you what will happen next. So when you click finish the servers will be contacted and the mirror configuration will be configured.
If all goes well you will have all green marks. Click close to return to the first configuration screen.
Now it’s gets real, you are prompted to start the mirroring. So click on START MIRRORING to actually star the mirror.
It will take a few moments but when you configured all well, the mirror starts. You notice the pause button and the remove mirror button, that’s is a good indication of a successful mirror.
If you want to check if the mirror is running fine you can start the mirroring monitor. Browse to TASK and start LAUNCH DATABASE MIRRORING MONITOR
The mirroring monitor is started and you can see if the synchronization is working.
If you configured the database authentication wrong one of the servers might report to have an error. Click on ACTION and MANAGE SERVER INSTANCE CONNECTIONS to set the service accounts.