I have 2 server (Server1, Server2). I want to run a script to make Server2, the subscriber of Server1. It's very simple using wizard. I have generated related script using wizard but it doesn't work. The script is:
EXEC sp_addmergesubscription
@publication = 'MergePub',
@subscriber = 'Server2',
@subscriber_db = 'MergeDB',
@subscription_type = N'push',
@sync_type = 'Automatic',
@subscriber_type='Global';
EXEC sp_addmergepushsubscription_agent
@publication = 'MergePub',
@subscriber = 'Server2',
@subscriber_db = 'MergeDB'
@subscriber_login = 'sa'
@subscriber_password = '123'
what's the wrong stuff?