July 5, 2004 at 5:25 am
I'm looking to automate the publishing of a database, read up on the several sp's on the subject. I stumbled on sp_addarticle. It seems I can only add 1 artivle at the time. Since I have to publish a db with 800+ tables, I considered writing a cursor(shudder!) and get all the usertables from sysobject to publish them.
In got to think, though. When using EM to publish a database I get the option to SELECT ALL articles. I don't know what happens behind the screen, but could I somehow select all tables for publishing in T-SQL? Or maybe someone already wrote such a script?
Greetz,
Hans Brouwer
July 5, 2004 at 7:12 am
with the sp sp_addarticle you must add each table independently.
I did it once, because have many tables to add to a publication and create a cursor with the tables I needed. And then did something like this:
EXEC ('EXEC sp_addArticle @article = '+''''+ @TableName + ''''+ ', ...
Sorry but don't have the script.
July 6, 2004 at 9:59 am
July 7, 2004 at 12:30 am
1learns everyday. Tnx for the heads up.
Greetz,
Hans Brouwer
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply