• Hi Grant,

    Thanks for taking the time to share!!

    Have you ever had to restore a published DB? Did/would you generate the scripts (Via the GUI) for the publications just prior to restoring? This is what I've been doing in my dev area. (Replacing the NULL passwords)

    Although I pump replication data into a DBA DB, I can only use that data to recreate a publication manually. Ideally, I would want to script out the create publication scripts automatically, say once a week to file. Or is this going overboard? Will I have to script this from scratch or has MS got a handy little sp for this?

    Profiler shows many SPs when I "Generate script".

    exec sp_helparticle @publication = N'Testing_Pub'

    exec sp_helppublication @publication = N'Testing_Pub'

    exec sp_helpsubscription @publication = N'Testing_Pub', @article = N'CaseTest'

    exec sp_helpsubscription @publication = N'Testing_Pub', @article = N'FKCompKey'

    -- etc...



    For better, quicker answers on T-SQL questions, read Jeff Moden's suggestions.[/url]

    "Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort