kaveri-Infosys
asked on
Cannot propagate the constraint changes to subscriber in merge replication
Hi there,
I have been using merge replication with pull subscription. I managed to add a constraint using the following steps and schema changes were taken place at the publisher, but when i do syncronization at the subscriber, it does not sync,instead it gives en error. I have even re-initialized the subscription, still it does not work. Is anyone out there to give me a solution.
Your help would really be appreciated. Thanks in advance.
steps, that i have used to create a constraint on the published table is given below.
a. Open Notepad
b. Paste the following Transact – SQL Command
alter table <PublishedTableName>
add constraint <ConstraintName>
go
c.Save the files as addConstraint.sql
d. use <PublicationDatabase>
go
sp_addscriptexec @publication = <PublicationDatabase>,
@scriptfile = <path of addConstraint.sql>
go
Error that i have encountered at the subscriber when i syncronize is given below
The schema script '0\\machinename\repldata\2 0050506184 002630\add Constraint .sql could not propagate
Cheers,
Manian
I have been using merge replication with pull subscription. I managed to add a constraint using the following steps and schema changes were taken place at the publisher, but when i do syncronization at the subscriber, it does not sync,instead it gives en error. I have even re-initialized the subscription, still it does not work. Is anyone out there to give me a solution.
Your help would really be appreciated. Thanks in advance.
steps, that i have used to create a constraint on the published table is given below.
a. Open Notepad
b. Paste the following Transact – SQL Command
alter table <PublishedTableName>
add constraint <ConstraintName>
go
c.Save the files as addConstraint.sql
d. use <PublicationDatabase>
go
sp_addscriptexec @publication = <PublicationDatabase>,
@scriptfile = <path of addConstraint.sql>
go
Error that i have encountered at the subscriber when i syncronize is given below
The schema script '0\\machinename\repldata\2
Cheers,
Manian
ASKER
Hi,
I followed your steps and got this error message.
The schema script '0\\ServerName\E$\Program Files\Microsoft SQL Server\MSSQL\ReplData\2005 0510143353 687\addind ex.sql' could not be propagated to the subscriber.
Please help us out.
Thanks,
Manian
I followed your steps and got this error message.
The schema script '0\\ServerName\E$\Program Files\Microsoft SQL Server\MSSQL\ReplData\2005
Please help us out.
Thanks,
Manian
It is a general error on the first row, but there are 6 rows describing the error. From last to the first one. You are not allowed to copy them out of GUI, except the first line (Error Details). Use eye2paper method or capture SQL filling the EM form by SQL Profiler (sp_MSenum_merge_sd with some code sauce).
See samples:
Version 1 - File missing:
-------------------------- ---------- ---------- -------
The schema script '0\\BSPWSBOSSNB\ReplData\2 0050509183 743883\add Constraint .sql' could not be propagated to the subscriber.
Failed to apply the script 'addConstraint.sql' using the 'osql' utility.
Last 112 characters in 'osql' output buffer: Cannot open input file - \\BSPWSBOSSNB\ReplData\200 5050918374 3883\addCo nstraint.s ql No such file or directory
Launching osql to apply the script 'addConstraint.sql'
Connecting to Publisher 'BSPWSBOSSNB'
Initializing
Version 2 - Script error:
-------------------------- ---------- ---------- -------
The schema script '0\\BSPWSBOSSNB\ReplData\2 0050509183 743883\add Constraint .sql' could not be propagated to the subscriber.
Failed to apply the script 'addConstraint.sql' using the 'osql' utility.
Last 108 characters in 'osql' output buffer: 1> 2> Msg 8134, Level 16, State 1, Server BSPWSBOSSNB\MSDE2KSP4, Line 1 Divide by zero error encountered.
Launching osql to apply the script 'addConstraint.sql'
Connecting to Publisher 'BSPWSBOSSNB'
Initializing
See samples:
Version 1 - File missing:
--------------------------
The schema script '0\\BSPWSBOSSNB\ReplData\2
Failed to apply the script 'addConstraint.sql' using the 'osql' utility.
Last 112 characters in 'osql' output buffer: Cannot open input file - \\BSPWSBOSSNB\ReplData\200
Launching osql to apply the script 'addConstraint.sql'
Connecting to Publisher 'BSPWSBOSSNB'
Initializing
Version 2 - Script error:
--------------------------
The schema script '0\\BSPWSBOSSNB\ReplData\2
Failed to apply the script 'addConstraint.sql' using the 'osql' utility.
Last 108 characters in 'osql' output buffer: 1> 2> Msg 8134, Level 16, State 1, Server BSPWSBOSSNB\MSDE2KSP4, Line 1 Divide by zero error encountered.
Launching osql to apply the script 'addConstraint.sql'
Connecting to Publisher 'BSPWSBOSSNB'
Initializing
ASKER
Hi,
what would be the solution for the above error version 1 and version 2. By the way, I would like to know whether we can change constraint on the publication database without changing the publication, If yes, please let me know how to do?
Thanks in advance.
what would be the solution for the above error version 1 and version 2. By the way, I would like to know whether we can change constraint on the publication database without changing the publication, If yes, please let me know how to do?
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Goto EM
Replication Monitor
Agents
Merge Agents (if merge replication)
Right click on your replication agent
Agent history
Find the error in history and select it
Click on Session details
3rd line Action Message "Last 108 characters in oslq..." describes the error in detail.