Implement Database Mirroring and Replication
Implement Database Mirroring and Replication
Introduction
Implement Database Mirroring
Implementing Replication
Summary
Introduction
The Implement Database Mirroring and Replication module provides you with
the instruction and server hardware to develop your hands on skills in the defined topics.
This module includes the following exercises:
Lab Diagram
During your session you will have access to the following lab configuration. Depending
on the exercises you may or may not use all of the devices, but they are shown here in the
layout to get an overall understanding of the topology of the lab.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 1/119
7/23/2019 Print content
In this module you will be working on the following equipment to carry out the steps
defined in each exercise.
To start, simply choose a device and click Power on. In some cases, the devices may
power on automatically.
For further information and technical support, please see our Help and Support
page.
Copyright Notice
This document and its content is copyright of Practice-IT - © Practice-IT 2014. All rights reserved. Any
redistribution or reproduction of part or all of the contents in any form is prohibited other than the
following:
1) You may print or download to a local hard disk extracts for your personal and non-commercial use
only.
2) You may copy the content to individual third parties for their personal use, but only if you
acknowledge the website as the source of the material. You may not, except with our express written
permission, distribute or commercially exploit the content. Nor may you transmit it or store it in any
other website or other form of electronic retrieval system.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 2/119
7/23/2019 Print content
In this task, you will mirror the AdventureWorks2012 database between PLABSQL01
and PLABSQL02.
Step 1
Ensure that you have powered on the required devices.
Step 2
In the Connect to Server dialogue box, click Connect to use the default credentials.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 3/119
7/23/2019 Print content
Step 3
Expand Databases node and right-click on AdventureWorks2012 database then
chose Properties.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 4/119
7/23/2019 Print content
Step 4
On Database Properties - AdventureWorks2012 dialogue box, in Select a page
section, click on Options.
Go to Recovery Model drop-down list and change it to Full, then click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 5/119
7/23/2019 Print content
Step 5
Right-click again on AdventureWorks2012 and choose Tasks > Back Up…
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 6/119
7/23/2019 Print content
Step 6
On Back Up Database-AdventureWorks2012, while in General page, go to
Destination section.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 7/119
7/23/2019 Print content
Step 7
After removing the folder path, click Add…
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 8/119
7/23/2019 Print content
Step 8
In the Select Backup Destination, click in the File name box and type:
C:\backup\aw2012.bak
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 9/119
7/23/2019 Print content
Step 9
On Back Up Database-AdventureWorks2012 dialogue box, click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 10/119
7/23/2019 Print content
Step 10
Click OK when notified that the backup was successfully completed.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 11/119
7/23/2019 Print content
Step 11
Switch to PLABSQL02 device. Launch Windows Explorer from taskbar.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 12/119
7/23/2019 Print content
Step 12
Click in the address bar and type:
\\plabsql01\c$
Press Enter.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 13/119
7/23/2019 Print content
Step 13
The connection to \\plabsql01\c$ is displayed.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 14/119
7/23/2019 Print content
Step 14
Expand Computer and then expand Local Disk C.
Note: If you prompted that you are overwriting a folder, click Yes.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 15/119
7/23/2019 Print content
Step 15
Launch SQL Server Management Studio from desktop.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 16/119
7/23/2019 Print content
Step 16
From Connect to Server dialogue box, click Connect.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 17/119
7/23/2019 Print content
Step 17
Expand Databases folder.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 18/119
7/23/2019 Print content
Step 18
On Restore Database dialogue box, under Source section, click on Device radio
button then click on […]
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 19/119
7/23/2019 Print content
Step 19
The Select backup devices dialogue box appears.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 20/119
7/23/2019 Print content
Step 20
The Locate Backup File-PLABSQL02 is displayed.
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 21/119
7/23/2019 Print content
Step 21
Back in the Select backup devices, the backup media is now added click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 22/119
7/23/2019 Print content
Step 22
You are redirected back to Restore Database-AdventureWorks2012 dialogue box.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 23/119
7/23/2019 Print content
Step 23
In the Options page, enable Overwrite the existing database (WITH REPLACE)
check box.
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 24/119
7/23/2019 Print content
Step 24
The database restore runs momentarily.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 25/119
7/23/2019 Print content
Step 25
Minimize Microsoft SQL Server Management Studio window.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 26/119
7/23/2019 Print content
The SQL Server service account is used to initialize the SQL server instance on a
computer. To change the SQL Server service account, follow these steps:
Step 1
Switch to PLABSQL01.
Click Start go to All Programs and then Microsoft SQL Server 2012 go to
Configuration Tools folder and finally click on SQL Server Configuration
Manager.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 27/119
7/23/2019 Print content
Step 2
SQL Server Configuration Manager opens.
Click on SQL Server Services node. Then in the right details pane, right-click SQL
Server (MSSQLSERVER) and choose Properties.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 28/119
7/23/2019 Print content
Step 3
On SQL Server (MSSQLSERVER) Properties dialogue box, click in Account
Name box and type:
practicelabs\administrator
Passw0rd
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 29/119
7/23/2019 Print content
Step 4
Click Yes when prompted that this will cause the service to be restarted.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 30/119
7/23/2019 Print content
Step 5
There will be a momentary pause while the change is being applied.
You will be redirected back to Sql Server Configuration Manager. Notice that SQL
Server (MSSQLSERVER) Log On As details has changed.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 31/119
7/23/2019 Print content
Step 6
Using the same steps done earlier, you will change the SQL Service Account in
PLABSQL02.
Click Start go to All Programs and then Microsoft SQL Server 2012 go to
Configuration Tools folder and finally click on SQL Server Configuration
Manager.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 32/119
7/23/2019 Print content
Step 7
SQL Server Configuration Manager opens.
Click on SQL Server Services node. Then in the right details pane, right-click SQL
Server (MSSQLSERVER) and choose Properties.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 33/119
7/23/2019 Print content
Step 8
On SQL Server (MSSQLSERVER) Properties dialogue box, click in Account
Name box and type:
practicelabs\administrator
Passw0rd
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 34/119
7/23/2019 Print content
Step 9
Click Yes when prompted that this will cause the service to be restarted.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 35/119
7/23/2019 Print content
Step 10
There will be a momentary pause while the change is being applied.
You will be redirected back to Sql Server Configuration Manager. Notice that SQL
Server (MSSQLSERVER) Log On As details has changed.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 36/119
7/23/2019 Print content
Step 1
Connect to PLABSQL01 and reopen SQL Server Management Studio.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 37/119
7/23/2019 Print content
Step 2
The Database Properties - AdventureWorks2012 dialog box is displayed.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 38/119
7/23/2019 Print content
Step 3
On Mirroring page, and click Configure Security in the right pane.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 39/119
7/23/2019 Print content
Step 4
The Configure Database Mirroring Security Wizard database appears.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 40/119
7/23/2019 Print content
Step 5
On the Include Witness Server screen, select No and click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 41/119
7/23/2019 Print content
Step 6
From the Principal Server Instance page, use the default Listener port and the
Endpoint name chosen by SQL Server Management Studio.
Clear the check box to Encrypt data sent through this endpoint as shown in the
screenshot, then click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 42/119
7/23/2019 Print content
Step 7
In the Mirror Server Instance page, click the drop down box and click <browse for
more>…
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 43/119
7/23/2019 Print content
Step 8
In the SSMS Connect to Server prompt type the hostname of PLABSQL02.
Click Connect.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 44/119
7/23/2019 Print content
Step 9
You’re redirected back to Mirror Server Instance, clear Encrypt data sent
through this endpoint check box.
Click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 45/119
7/23/2019 Print content
Step 10
In the Service Accounts window, type the appropriate service account you want to use
for database mirroring.
For this setup as we are in a lab environment type in the Principal and Mirror check
boxes:
practicelabs\administrator
Click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 46/119
7/23/2019 Print content
Step 11
Double check the summary details and click Finish.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 47/119
7/23/2019 Print content
Step 12
Please wait while database mirroring is being created.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 48/119
7/23/2019 Print content
Step 13
The Status - Success should be displayed in the Configuration Endpoints dialogue
box.
Click Close.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 49/119
7/23/2019 Print content
Step 14
On Database Properties dialogue box, click Start Mirroring button.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 50/119
7/23/2019 Print content
Step 15
There will be a momentary pause while mirroring is in progress.
If everything has been successful you will get the following screen saying
Synchronized: the databases are fully synchronized.
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 51/119
7/23/2019 Print content
Step 16
From Microsoft SQL Server Management Studio, notice that
AdventureWorks2012 (Principal, Synchronized) is now displayed.
You can see the caption of the database has changed in both the principal and the
mirrored server.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 52/119
7/23/2019 Print content
Step 17
Switch to PLABSQL02 and reopen Microsoft SQL Server Management Studio.
You can see the caption of the database has changed in both the principal and the
mirrored server.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 53/119
7/23/2019 Print content
Step 18
Go to Practice Labs web application.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 54/119
7/23/2019 Print content
Step 19
Power back on PLABSQL01 and then PLABSQL02.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 55/119
7/23/2019 Print content
The SQL Server service account is used to initialize the SQL server instance on a
computer. To change the SQL Server service account, follow these steps:
Step 1
Connect to PLABSQL01.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 56/119
7/23/2019 Print content
Click Start go to All Programs and then Microsoft SQL Server 2012 go to
Configuration Tools folder and finally click on SQL Server Configuration
Manager.
Step 2
SQL Server Configuration Manager opens.
Click on SQL Server Services node. Then in the right details pane, right-click SQL
Server (MSSQLSERVER) and choose Properties.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 57/119
7/23/2019 Print content
Step 3
On SQL Server (MSSQLSERVER) Properties dialogue box, click in Account
Name box and type:
practicelabs\administrator
Passw0rd
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 58/119
7/23/2019 Print content
Step 4
Click Yes when prompted that this will cause the service to be restarted.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 59/119
7/23/2019 Print content
Step 5
There will be a momentary pause while the change is being applied.
You will be redirected back to Sql Server Configuration Manager. Notice that SQL
Server (MSSQLSERVER) Log On As details has changed.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 60/119
7/23/2019 Print content
Step 6
Now right-click on SQL Server Agent (MSSQLSERVER) and choose Properties.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 61/119
7/23/2019 Print content
Step 7
On SQL Server Agent (MSSQLSERVER) Properties, click Start.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 62/119
7/23/2019 Print content
Step 8
Please wait while the service is being restarted.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 63/119
7/23/2019 Print content
Step 9
Back in the SQL Server Agent (MSSQLSERVER) Properties, click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 64/119
7/23/2019 Print content
Step 10
Close Sql Server Configuration Manager window.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 65/119
7/23/2019 Print content
Step 11
Using the same steps done earlier, you will change the SQL Service Account in
PLABSQL02.
Click Start go to All Programs and then Microsoft SQL Server 2012 go to
Configuration Tools folder and finally click on SQL Server Configuration
Manager.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 66/119
7/23/2019 Print content
Step 12
SQL Server Configuration Manager opens.
Click on SQL Server Services node. Then in the right details pane, right-click SQL
Server (MSSQLSERVER) and choose Properties.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 67/119
7/23/2019 Print content
Step 13
On SQL Server (MSSQLSERVER) Properties dialogue box, click in Account
Name box and type:
practicelabs\administrator
Passw0rd
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 68/119
7/23/2019 Print content
Step 14
Click Yes when prompted that this will cause the service to be restarted.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 69/119
7/23/2019 Print content
Step 15
There will be a momentary pause while the change is being applied.
You will be redirected back to Sql Server Configuration Manager. Notice that SQL
Server (MSSQLSERVER) Log On As details has changed.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 70/119
7/23/2019 Print content
Step 16
Right-click on SQL Server Agent (MSSQLSERVER) and choose Start.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 71/119
7/23/2019 Print content
Step 17
Please wait while the service is being started.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 72/119
7/23/2019 Print content
Step 18
Find SQL Server Agent (MSSQLSERVER) now Running.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 73/119
7/23/2019 Print content
Before carrying out this exercise, set the start of the SQL Server Agent to automatic
within Services.
Step 1
From PLABSQL02 server, click Start and go to Administrative Tools then select
Services.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 74/119
7/23/2019 Print content
Step 2
In Services console, scroll down the list.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 75/119
7/23/2019 Print content
Step 3
In SQL Server Agent (MSSQLSERVER) Properties (Local Computer), change
the Startup type to Automatic.
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 76/119
7/23/2019 Print content
Step 4
Close Services console.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 77/119
7/23/2019 Print content
Step 5
Switch to PLABSQL01 device.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 78/119
7/23/2019 Print content
Step 6
On SQL Server Agent (MSSQLSERVER) Properties, change Startup type to
Automatic.
Click OK.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 79/119
7/23/2019 Print content
Step 7
On PLABSQL01, open SQL Server Management Studio and click Connect.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 80/119
7/23/2019 Print content
Step 8
In Object Explorer, expand the Replication folder.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 81/119
7/23/2019 Print content
Step 9
Right-click Local Publications and then click New Publication.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 82/119
7/23/2019 Print content
Step 10
On the New Publication Wizard page, click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 83/119
7/23/2019 Print content
Step 11
On the Distributor page, use the default selection which makes PLABSQL01 a
distributor and a publisher, then click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 84/119
7/23/2019 Print content
Step 12
On the Snapshot Folder page accept the default location and click Next.
Note that the default location is not able to support pull subscriptions because it is
not a network share.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 85/119
7/23/2019 Print content
Step 13
On the Publication Database page, click AdventureWorksDW2012 and then click
Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 86/119
7/23/2019 Print content
Step 14
On the Publication Type page, click Transactional publication and then click
Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 87/119
7/23/2019 Print content
Step 15
On the Articles page, expand Tables, select DimAccount(dbo) and then click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 88/119
7/23/2019 Print content
Step 16
On the Filter Table Rows page click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 89/119
7/23/2019 Print content
Step 17
On the Snapshot Agent page, accept the default and click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 90/119
7/23/2019 Print content
Step 18
On the Agent Security page, click the Security Settings button on the right hand
side.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 91/119
7/23/2019 Print content
Step 19
On the Snapshot Agent Security page, in the Process account box, type:
practicelabs\administrator
Passw0rd
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 92/119
7/23/2019 Print content
Step 20
Back in the Agent Security page, click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 93/119
7/23/2019 Print content
Step 21
On the Wizard Actions page leave the default Create the publication option
selected and click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 94/119
7/23/2019 Print content
Step 22
On the Complete the Wizard page enter a Publication name of
AdventureWorksDW2012, and then click Finish.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 95/119
7/23/2019 Print content
Step 23
Please wait while the publication is being created.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 96/119
7/23/2019 Print content
Step 24
When the publication is successfully created, click Close.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 97/119
7/23/2019 Print content
Step 25
You have now successfully configured replication using transactional streaming on
PLABSQL01.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 98/119
7/23/2019 Print content
Step 1
Connect to PLABSQL02 and open SQL Server Management Studio. Click
Connect when prompted.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 99/119
7/23/2019 Print content
Step 2
In Object Explorer pane, expand Replication and click on Local Subscriptions.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 100/119
7/23/2019 Print content
Step 3
At the new subscription wizard click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 101/119
7/23/2019 Print content
Step 4
Then at the Publication page, use the drop down box to select <Find SQL Server
Publisher>…
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 102/119
7/23/2019 Print content
Step 5
In the Connect to Server window, enter in the name of PLABSQL01 and press the
Connect button.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 103/119
7/23/2019 Print content
Step 6
You will see the publication for AdventureWorksDW2012 that you previously
configured.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 104/119
7/23/2019 Print content
Step 7
At the agent location page, change the selection to Run all agents at the Distributor,
PLABSQL01 (Push subscriptions) because our replication directory is not on a share
we cannot use pull.
Click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 105/119
7/23/2019 Print content
Step 8
At the Subscribers page leave the default selection and click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 106/119
7/23/2019 Print content
Step 9
On Distribution Agent Security page, click […] button.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 107/119
7/23/2019 Print content
Step 10
At the Distribution Agent Security dialogue box, in the Process account field, type:
practicelabs\administrator
Passw0rd
Clic
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 108/119
7/23/2019 Print content
Step 11
You will return to the Distribution Agent Security page where you need to click
Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 109/119
7/23/2019 Print content
Step 12
At the Synchronization Schedule leave the default of run continuously and click
Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 110/119
7/23/2019 Print content
Step 13
At the Initialize Subscriptions page accept the defaults and click Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 111/119
7/23/2019 Print content
Step 14
Again at the Wizard Actions, leave the default to create the subscription and click
Next.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 112/119
7/23/2019 Print content
Step 15
Finally at Complete the Wizard page, click Finish.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 113/119
7/23/2019 Print content
Step 16
Please wait while the subscription is being created.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 114/119
7/23/2019 Print content
Step 17
Click Close when Creating Subscriptions page indicates Success status.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 115/119
7/23/2019 Print content
Step 18
Minimize SQL Server Management Studio.
Step 19
Switch to PLABSQL01 and go back to SQL Server Management Studio.
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 116/119
7/23/2019 Print content
Step 20
You will see that there is a message saying that the initial snapshot is not available yet.
Click Close.
Step 21
To remedy this, right click the [AdventureWorksDW2012]:
AdventureWorksDW2012 publication and select View Snapshot Agent Status
Step 22
Then click Start.
Step 23
You will receive this message about pre-loading meta-data of all tables.
Step 24
When the message “A snapshot of article(s) is generated… click Close.
Step 25
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 117/119
7/23/2019 Print content
Step 26
You will get a message about No replicated transactions are available, since no
changes have been made on the database.
Click Close.
Step 27
Switch to PLABSQL02 device.
Shutdown all virtual machines used in this lab, by using the power functions located in
the Tools bar before proceeding to the next module.
Summary
In this module, you covered carried the following practical tasks:
https://www.practice-labs.com/authenticated/vNext/vn-print-content.aspx 119/119