all groups > sql server replication > november 2003 >
You're in the

sql server replication

group:

Replication Script


Replication Script MReichert
11/7/2003 6:32:39 AM
sql server replication:
Hi,

I have created 2 scripts using EM, one for creating and
one for dropping a merge replication between one publisher
and one subscriber.

If I run the script for dropping the publication first and
afterwards run the script to create the publication again
with all subscriptions no errors are mentioned in QA but I
can't see any pull subscription entries in EM.

Does anyone knows why that might happen?



RE: Replication Script v-yshao NO[at]SPAM online.microsoft.com
11/10/2003 6:54:53 AM
Hi,

Thanks for your post. As I understand, you created a merge replication
using SQL Enterprise Manager (SQLEM). Also, you right-clicked the name of
the replication in the publications folder and clicked "Generate SQL
Script.." command to create a script for creating this publication and
deleting this publication. Then you ran the script for deleting this
publication and recreating the publications. If I have misunderstood,
please feel free to let me know.

Based on my research, the script you created using SQLEM for creating this
publication does not include the one used for adding the pull merge
subscriptions. The pull merge subscriptions are not created, so we are
unable to see any pull subscription entries using SQLEM.

For more information regarding scripting replication, please refer to the
following article on SQL Server Books Online.
Topic: "Scripting Replication"

Please feel free to post in the group if this solves your problem or if you
would like further assistance.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
RE: Replication Script v-yshao NO[at]SPAM online.microsoft.com
11/10/2003 7:04:16 AM
Hi,

If you want to script the replication using SQL Server Enterprise Manager,
please try to perform the following steps.

1. At the Publisher, open SQL Server Enterprise Manager, expand a server
group, right-click the Replication folder, and then click Generate SQL
Script.

2. Select the replication component to script (Distributor properties,
publications and push subscriptions, or pull subscriptions) and whether you
want the script to enable or create the components or disable or drop the
components.

For additional information regarding this issue, please refer to the
following article on SQL Server Books Online.
Topic: "Scripting Replication"

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
RE: Replication Script Marco Reichert
11/17/2003 1:11:46 AM
Hi,

I have studied the scripts and I found 3 statements:
- one calling sp_addsubscriber
- one calling sp_changesubscriber_schedule
- one calling sp_addmergesubscription

So I think the scripts already contain the statements to
create the push subcription.

RE: Replication Script MReichert
11/18/2003 4:35:43 AM
Hi Michael,

I know about that. I do not want to script pull
subscriptions but push subscriptions.
I think for me everything works fine except that execution
of push subscription statements, even I don't receive any
RE: Replication Script v-yshao NO[at]SPAM online.microsoft.com
11/18/2003 11:30:51 AM
Hi Marco,

Thanks for your feedback. As I understand, your concern is that when you
use script to create the replication, the pull subscriptions do not appear
in SQL Server Enterprise Manager (SQLEM). If I have misunderstood, please
feel free to let me know.

When you right-click the specified publication to create the scripts. I
agree with you that the scripts contain the statements to create the push
subscription and then the push subscription will appear in the SQLEM.
However, there is not any statement in the scripts to create pull
subscription. You can check to see in the statements in the scripts.

When you right-click the publication folder to create scripts. You can
choose the replication components what you want to generate the scripts.

Please feel free to post in the group if this solves your problem or if you
would like further assistance.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
RE: Replication Script v-yshao NO[at]SPAM online.microsoft.com
11/19/2003 9:57:50 AM
Hi,

Thanks for your post. As I understand, you generated the script to create
the push subscriptions. The problem is that the push subscriptions did not
appear in the SQL Server Enterprise Manager (SQLEM) when you executed the
related script. If I have misunderstood, please feel free to let me know.

Did you press F5 to refresh the screen in SQLEM? When you performed these
scripts using Query Analyzer, what resulting message did you get?

On my side, I can recreated the push subscription and then saw it in the
SQLEM. It is strange that you are unable to see the push subscription on
your side after running the created script.

I would like you to provide me with the detailed steps of this action so
that I can narrow down the cause of this issue.

1. The steps for creating the scripts.
2. The steps for deleting the replication including the push subscription.
3. The steps for running the scripts.
4. The steps that you used to try to see the push subscription in SQLEM.

Also, please provide the related script. You can send it to me at
v-yshao@microsoft.com.

I am standing by for your response.

Thanks for using MSDN newsgroup.

Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
RE: Replication Script anonymous NO[at]SPAM discussions.microsoft.com
11/24/2003 11:44:57 PM
Hi,

thanks for your help. The problem was that the sql server
agent was using the local system account. As I changed the
sql server agent acount on both machines (publisher and
subscriber) to a local administrator account, which is
existing on both machines, everything works fine.

[quoted text, click to view]
AddThis Social Bookmark Button