1
0
mirror of https://github.com/alex-bochkov/ssms-addin.git synced 2026-06-15 16:57:06 +02:00

Create transactional-replication-helpful-commands.sql

This commit is contained in:
Alexey Bochkov
2019-04-28 12:30:30 -07:00
committed by GitHub
parent febfec92e4
commit 1b23ca2dd7
@@ -0,0 +1,12 @@
-- Initialize subscriber from backup. The biggest benefit - no need to take snapshots on publisher database.
-- Subscriber is ready immidiately.
exec sp_addsubscription @publication = N'db_Publication',
@sync_type = N'initialize with backup',
@backupdevicetype='Disk',
@backupdevicename='\\192.168.1.1\d$\db\db_20171214223004.trn',
@subscriber = N'full server name',
@subscriber_type = 0,
@destination_db = N'dmTraffic',
@subscription_type = N'push',
@update_mode = N'read only',
@article = N'all'