Lesson 2: Transactional Replication
Activity 2: Configuring Transactional Replication
Solution:
- Navigate to C:\Code\Lesson02\Activity and open RemoveReplication.sql in SQL Server Management Studio. Modify the parameter values, as instructed in the script, and execute the script.
This will remove the existing publication and subscription for the AdventureWorks database.
This step is only to be executed if there is an existing publication and subscription for the AdventureWorks database.
- Execute the following query to drop and create the AdventureWorks database at the subscriber:
DROP DATABASE AdventureWorks
GO
CREATE DATABASE AdventureWorks
- Execute the C:\Code\Lesson02\Activity\1_CreatePublication.sql query in SQLCMD mode to create the Pub-AdventureWorks publication and add articles to the publication.
You'll have to modify the publisher and subscriber parameter values as per your environment.
- Execute the C:\Code\Lesson02\Activity\2_CreateSubscription.sql query in SQLCMD mode...