Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Cannot propagate the constraint changes to subscriber in merge replication

Posted on 2005-05-09
5
Medium Priority
?
707 Views
Last Modified: 2008-02-01
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\20050506184002630\addConstraint.sql could not propagate


Cheers,
Manian
0
Comment
Question by:kaveri-Infosys
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:ispaleny
ID: 13961579
On Publisher
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.
0
 

Author Comment

by:kaveri-Infosys
ID: 13966574
Hi,
I followed your steps and got this error message.

The schema script '0\\ServerName\E$\Program Files\Microsoft SQL Server\MSSQL\ReplData\20050510143353687\addindex.sql' could not be propagated to the subscriber.

Please help us out.

Thanks,
Manian
0
 
LVL 13

Expert Comment

by:ispaleny
ID: 13968551
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\20050509183743883\addConstraint.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\20050509183743883\addConstraint.sql  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\20050509183743883\addConstraint.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
0
 

Author Comment

by:kaveri-Infosys
ID: 13980024
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.


0
 
LVL 13

Accepted Solution

by:
ispaleny earned 1500 total points
ID: 13980174
Version 1 - File missing: Solution - add the file with an emty command "select 1".
Version 2 - Script error: Solution - replace contents of the file with an emty command "select 1".
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question