November 13, 2006 at 3:54 am
I'm looking for some sql-code able to reverse engineering my replication-setup.
Want to automatic run this everey month.
November 13, 2006 at 4:22 am
I'm not 100% on replication but I believe you can script it from Enterprise Manager... Failing that, look in Google for
"Sql Server" script replication
I quickly found in the first few hits this web page
http://www.replicationanswers.com/Scripts.asp
There's a link there entitled "Script out the complete replication setup to a text file " - should do what you want Or at least give you some pointers
Cheers
November 13, 2006 at 4:34 am
I'm looking for some code to run automaticly every month (not manual right-clciking EM).
This way I hopefully, can catch any changes in the replication setup, made by any other DBA
November 13, 2006 at 11:55 pm
Here's the secret to how I automated mine: I have a (non-replicated) table in the publisher called ReplicatedTables. If a table is listed in that table, it gets replicated; if not, it doesn't. Obviously, I'm only replicating tables. I created a series of stored procedures that does every step from the ground up (skipping steps that aren't needed).
The steps are:
November 14, 2006 at 1:29 am
Thanks for your reply. I'm not very good at decribing what I'm looking for
Generally I search for reverse engineering scripts, so I through a job automaticlly can produce the same scripts as if I manually was using "generate sql-scripts" by right-clicking in EM.
This way we don't have a potentielly lost when any of the DBA create a new user, new replication and so on
November 14, 2006 at 8:10 am
Enterprise Manager can be used to create scripts for publications through (I think) the replication monitor.
Right click on several nodes until you find the scripting option.
This scripts the publication and subscriptions 'as is'. The code can then be copied, pasted and hacked.
Good Luck
November 14, 2006 at 9:48 am
If you want to script it without using EM, you'll have to create your own process to script it out.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply