Download presentation
Presentation is loading. Please wait.
1
SQL Replication for RCSQL Reporting
Todd Endicott
2
Agenda Pro’s and Con’s Pre-Req’s Service Account
Setup Replication from backup
3
Pro’s and Con’s No downtime for end users
Less system intensive during setup Sometimes easier to fix VLDB’s Must completely remove and add back in for system upgrades Not DR capable
4
Pre-Req’s Secondary SQL server
Hard Drive space (Virtual Drive recommended) (External?) Replication components installed Service Accounts (Likely bounce of SQL services) Permissions, permissions, permissions
5
Service Account Windows Service Account (example - ZOLLREPL)
6
Service Account Must change “Log On” account for SQL and SQL Agent
7
Service Account Must restart SQL and SQL Agent service for the new Login’s to take effect.
8
Service Account Repeat steps on “Replicated” SQL server
Know where your data will live (Permissions and storage availability are critical to replication performance) Recommend not using the default SQL paths just because of long path name (Example – E:\ZOLLREPL vs. E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\REPL
9
Setup Replication The order of the steps is critical to success!!
How do we set it up? What happens if things go wrong? Common mistakes/issues How to remove replication
10
Setup Distribution Database
Setup “Distribution” database (Where do I put it? How large will it be? Other considerations?)
11
Setup Distribution Database
Components not installed?
12
Setup Distribution Database
Add necessary components to existing instance.
13
Setup Distribution Database
14
Setup Distribution Database
15
Setup Distribution Database
(Several screenshots were skipped in showing this step. Defaults are fine on missing screens) Close the installation and re-launch SQL Management studio Don’t forget to install components on secondary server
16
Setup Distribution Database
17
Setup Distribution Database
18
Setup Distribution Database
WARNING!!! (Probably don’t want to do this)
19
Setup Distribution Database
Still wrong!!!
20
Setup Distribution Database
Correct path and permissions
21
Setup Distribution Database
MDF and LDF location
22
Setup Distribution Database
23
Setup Distribution Database
24
Setup Distribution Database
25
Setup Distribution Database
26
Distribution Database
Where do I find it?
27
Setup Publication
28
Setup Publication Start Publication Wizard
29
Setup Publication Choose RCSQL database
30
Setup Publication Choose replication type (Transactional publication)
31
Setup Publication
32
Setup Publication Some tables WON’T replicate (Missing Primary Keys)
33
Setup Publication Remove “RescueNet Central Reporting Log” from replicated articles
34
Setup Publication
35
Setup Publication
36
Setup Publication THIS IS DIFFERENT!!!!!
37
Setup Publication Setup Service Account
38
Setup Publication
39
Setup Publication Will automatically use service account for log reader
40
Setup Publication
41
Setup Publication Name your publication
42
Setup Publication Your Article amount may differ
43
RCSQL Publication
44
RCSQL Publication Must set subscription to be able to be initialized from a backup. (Publisher properties)
45
RCSQL Publication Now that Publication is built
Run full backup of RCSQL in production (Can be compressed) Where backup is located will be VERY IMPORTANT!! Restore backup to secondary SQL server Give DBO rights to RCSQL on both servers to service account Wait for restore to complete Possibly move BAK file back to production server (Virtual Drive vs. File Copy)
46
RCSQL Publication Should now have RCSQL on Production server and replicated server Make sure you can access tables on restored databases before proceeding Make sure replicated copy of RCSQL matches in size to the production copy.
47
Setup Subscription NO GUI? PUSH OR PULL?
Check Permissions (Folders and Databases) Subscription Script
48
Setup Subscription /*At the publisher, run the following command */
USE [RCSQL] GO EXEC sp_addsubscription @publication = 'RCSQL Pub to DSS', @subscriber = 'ITSREPL', @destination_db = RCSQL, @subscription_type ='Push', @sync_type = 'initialize with backup', @article = 'all', @update_mode = 'read only', @subscriber_type = 0, @backupdevicetype ='disk', @backupdevicename = '\\ITSSQL\zollrepl\rcsql.bak' Change backup device name to UNC path.....
49
Setup Subscription
50
Setup Subscription
51
Validate Subscription
Where do I find it? Push vs Pull
52
Validate Subscription
53
Validate Subscription
54
Validate Subscription
What are the errors?
55
Validate Subscription
Check all tabs for possible errors
56
Validate Subscription
Job Activity Monitor (Note the red X’s)
57
Validate Subscription
Job Activity Monitor (Note the red X)
58
Validate Subscription
After checking permissions, notices I did not add DBO access for service account on production server. (All red X’s are gone)
59
Validate Subscription
A “HAPPY” replication monitor
60
Validate Subscription
Check “Undistributed Commands” tab
61
What Next? Make change in “RescueNet” Admin to utilize the DSS server
Test reports against “Replicated” side and “Production”, validate results When satisfied, move all report functions to the replicated server (Custom reports will need to be manually pointed at report server) If Archiving, Archive first then replicate. Archive server and replication server can be the same server.
62
Q & A
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.