We are currently attempting to (Merge) replicate a database between 2 servers; distributor and subscriber. Apparently there are no Primary Keys in the database, and without the input of the developers, we can only assume that data integrity must be maintained by the application and the database is somewhat generic. In any case, what we are experiencing is that when we attempt to replicate, and you may know, you need PKs. Without any, SQL Server has utilized it's own (Row GUIDs). The Snapshot worked fine, but the merge agent reports error 1505.
The error is "CREATE UNIQUE INDEX terminated because a duplicate key was found for index ID %d. Most significant primary key is '%S_KEY'."
The fix and workaround are SP2 and deselecting Unique in the index propoerties of the index raising the error. We already had SP2 on the system. Tried the other and still the same issue occurs.
Microsoft's Knowledgebase has nothing. Any suggestions or fixes would be greatly appreciated.
Msg 2601, Level 14, State 1, Procedure DFP_report_load, Line 161 Cannot insert duplicate key row in object 'dbo.DFP_Reports_History' with unique index 'ix_report_history_creative_id'.
The duplicate key value is (40736326382, 1, 2015-07-03, 67618862, 355324). Msg 3621, Level 0, State 0, Procedure DFP_report_load, Line 161
The statement has been terminated.
Exception in Task: Cannot insert duplicate key row in object 'dbo.DFP_Reports_History' with unique index 'ix_report_history_creative_id'. The duplicate key value is (40736326382, 1, 2015-07-03, 67618862, 355324).
I have a slight problem which I'm sure must be a common happening. Here's my problem.
I'm using Merge replication and I have a table the has a unique contraint on a non primary key column (the column is called [name]). The thing that goes wrong (for me) is that when a new record is added in a subscriber and a new record is added in the publisher before a synchronization and both records have the same [name] value then when the merge agent runs I get an unresolved conflict because of a unique index violation.
I've read the BOL and I'm left thinking that in order to solve this problem then I must use a custom resolver. Is this the best way of handling such a conflict? Actually if it is I'm still a little stuck as I'm not sure what I could do to help the situation inside the custom resolver anyway!!
We are designing a scenario in which we will have a central publisher and several subscribers in a server to server environment using Merge replication. We also will have a fulltext index for one of the tables being replicated and synchronized. What are your recommendations for the index? Would auto change tracking reduce the impact? We are building for a possible 1 billion row table but do not anticipate more than 100K rows at any time of replication.
One of the table that is in a merge replication somehow is missing anindex. Strangely, only the table in one of the subscriber of the mergereplication is missing the index; another subscriber and the publisherof the merge replication don't have this problem.How should I add the missing index back to that table? My understandingis that making structural change on a table that is inmerge-replication is different from making change on a table that isnot merge-replicated. For example, when we need to add a column into atable that is being merge-replicated, we must add the column bychanging the attributes in the properties of the published article(table) instead of simply using CREATE INDEX command. I am wonderingwhether there is a similar restriction on adding an index onto a tablethat is merge replicated.I have already added the index back to the table anyway. I am askinghere just in case doing this may get me into a problem later on.Thanks in advance for any info.Jay Chan
I get the following error message while droping unique index.
Server: Msg 3723, Level 16, State 5, Line 1 An explicit DROP INDEX is not allowed on index 'dbo.ALEG.IX_ALEG'. It is being used for UNIQUE KEY constraint enforcement.
I'm getting the following error on our merge contents table in one of our DBs:
Msg 8952, Level 16, State 1, Line 1 Table error: Database 'ks241', index 'MSmerge_contents.nc3MSmerge_contents' (ID 1950682047) (index ID 3). Extra or invalid key for the keys: Msg 8956, Level 16, State 1, Line 1 Index row (1:1893:42) with values (partchangegen = NULL and tablenick = 17665001 and rowguid = AEAE7256-F571-478E-B2B4-D142B47C38C1) points to the data row identified by (). Msg 8952, Level 16, State 1, Line 1 Table error: Database 'ks241', index 'MSmerge_contents.nc3MSmerge_contents' (ID 1950682047) (index ID 3). Extra or invalid key for the keys: Msg 8956, Level 16, State 1, Line 1 Index row (1:1893:66) with values (partchangegen = NULL and tablenick = 17665001 and rowguid = B94F1591-33B0-4625-A269-DB9B8B05BCCE) points to the data row identified by (). CHECKTABLE found 0 allocation errors and 2 consistency errors in table 'MSmerge_contents' (object ID 1950682047). repair_fast is the minimum repair level for the errors found by DBCC CHECKTABLE (ks241.dbo.MSmerge_contents ).
There are no other corruption issues on the server that I can find. I do not believe there are any current hardware issues, though I am not on site.
What would be the best way to resolve this? Is recreating or defrag/rebuild the index an option, here? Or can I just run a repair on this? Since it's a merge table, I'm a little gun shy, having limited experience with replication.
Thanks.
____________________________________________________________________________________ "Believe in those who are seeking the truth. Doubt those who say they have found it." -Andre Gide
I have an issue where I am getting an error on an unique index.
I know why I am getting the error but not sure how to get around it.
The query does a check on whether a unique value exists in the Insert/Select. If I run it one record at a time (SELECT TOP 1...) it works fine and just won't update it if the record exists.
But if I do it in a batch, I get the error. I assume this is because it does the checking on the file before records are written out and then writes out the records one at a time from a temporary table.
It thinks all the records are unique because it compares the records one at a time to the original table (where there would be no duplicates). But it doesn't check the records against each other. Then when it actually writes out the record, the duplicate is there.
How do I do a batch where the Insert/Select would write out the records without the duplicates as it does when I do it one record at a time.
Replication-Replication Merge Subsystem: agent TRPSQL3-ThomsonResearch-TR Pub-TRPSQL2-4 failed. The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history log
I am getting the above error in Merge Replication. any one having any idea pls let me know.
In Merge Replication, I am not able to replicate one table having more than 5 GB data to the subscriber. If I have filter on the table I am able to do. I couldn't understand the problem? Any one having any idea on the same?
For your information.
I have 1.7GB free space in C drive. Is it a space problem in C drive? Actually my data base is storing in E drive. It has 30GB free space. But Sql Server installed in D drive it has 2 GB free space.
We have an HTTPS merge publication which has been working fine, but all of a sudden the subscription for a subscriber is failing with the following message at the publisher:
Error messages: The process could not read the request message due to OS error 10054. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147014842) Get help: http://help/MSSQL_REPL-2147014842 The format of a message during Web synchronization was invalid. Ensure that replication components are properly configured at the Web server. (Source: MSSQL_REPL, Error number: MSSQL_REPL- 2147199374) Get help: http://help/MSSQL_REPL-2147199374 The subscription to publication 'yarraman main' could not be verified. Ensure that all Merge Agent command line parameters are specified correctly and that the subscription is correctly configured. If the Publisher no longer has information about this subscription, drop and recreate the subscription. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201019) Get help: http://help/MSSQL_REPL-2147201019
We have 2 subscribers to this publication and it is working fine for the other subscriber..
A UNIQUE INDEX must inherently impose a unique constraint and a UNIQUE CONSTRAINT is most likely implemented via a UNIQUE INDEX. So what is the difference? When you create in Enterprise Manager you must select one or the other.
What's the difference in the effect of the followings: CREATE UNIQUE NONCLUSTERED INDEX and ALTER TABLE dbo.titles ADD CONSTRAINT titleind UNIQUE NONCLUSTERED
I found there're two settings in Indexs/Keys dialog box of the management studio, Is Unique, and Type. The DDL statements above are generated by setting Is Unique to yes plus Type to Index, and just Type to Unique Key, respectively. What's the difference between them?
Dear Friends, I am very new to replication, For learning purpose I am trying to setup merge replication. The given setup I am using.
1. Windows 2000 Server + SP4 (Publisher for SQL 2000) 2. Windows 2003 Server + SP1 (Subscriber For SQL 2000)
I am getting a replication error, I have taken this errors details from merge agent on publisher server.
Find enclosed replication error details in the microsoft document file format (.doc). The document is consist of three SQL Server snapshot rather three diffrent errors.
In the pictures you can find the red & white color cross (wrong sign) on replication monitor tab, I don't know why it is appearing. :confused:
Kindly, give me guidance to rectify this error & setup the marge replication between two SQL 2000 Servers.
I have a merge replication publication that has been running for months. This week the Snapshot started failing, reporting that an article was not included in the publication. I checked and found 3 articles that mysteriously no longer show up as being in the publication. When I attempt to add them it reports that it can't add them because there is already an article by that name in the publication. Apparently some table has lost its rows for these articles while another table(s) still has its rows.
Has anyone had this problem? Is there a solution short of dropping the publication and starting over - a solution that would literally take weeks for us?
I have setup merge replication between SQL Server 2005 and SQL Server Express. The setup uses web synchronization. (And the setup uses dynamic filter HOST_NAME)
On some of the client machines, replication fails with the following error (when initializing the subscription):
from subscriber merge agent verbose log: A dynamic snapshot will be applied from 'D:DOCUME~1JBAUMG~1.CORLOCALS~1TempDB101-EQA-SCL_BQDB_BQ_PUB_BQDB'
Validating dynamic snapshot 2007-04-1819:39:45.434 OLE DB Subscriber 'FRG-BAUMGARTENJSQLEXPRESS': sys.sp_MSregisterdynsnapseqno @snapshot_session_token=N'\XXX.XX.XX.XXSnapshotuncDB101-EQA-SCL_BQDB_BQ_PUB20070417180079dynsnap', @dynsnapseqno='5599F67E-A1A9-4573-A14F-9851F6FE4B51'
(Note: XXX.XX.XX.XX is a proper IP of DB, I have just masked it in the post)
The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file.When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.
I enabled verbose logging for the snapshot agent for the subscriber, but there was no error there. It is obvious from the log info above that the error occurs only after downloading the snapshot to the client and during applying it to the subscriber by the merge agent.
After I got this error, I tried running the subscriber program again and it successfully replicated on the third attempt. But this behavior is not consistent and it fails for most of the time on some of the machines
When trying to start a Merge Replication agent I get the following Error message:
The process could not enumerate the changes at the subscriber. 2812
The snapshot agent works fine as far as I can see.
The replication is set up between a Win2000 / SQL7 / SP 4 and a Win2003 / SQL2000 / SP 3a machine. Sqlserveragent on both machines is run as a system account.
In trying to activate a merge replication between a Win2000/SQL7 distributor/publisher and a Win2003/SQL2000 subscriber I keep getting the following error:
Process could not enumerate changes at the subscriber (error 2812)
Merge publication works fine between the distributor and another subscriber (NT4/SQL7).
When i look at the details of the merge agent history i can see the process stopped with :
call sp_MSenumeratechanges(?,?,?,?,?)
I read article 308743 on microsoft/technet, and there they advise to install SP3a for SQL2000 on the subscriber. Ive done that but the error persists.
SQLServerAgent on the subscriber starts up with a local administrator account, the (physical) server itself is not a member of the local network; (outside the DMZ). The server is declared in the Client Network Utility of the distributor/publisher and is therefore known as a potential subscriber. In fact, the snapshot agent works perfectly (or so it seems).
Hi all i have setup merge replication with one publisher and 3 subscribers
The replication worked fine for about 2 months then i recieved the following error on all my subscriptions
The Publisher failed to allocate a new set of identity ranges for the subscription. This can occur when a Publisher or a republishing Subscriber has run out of identity ranges to allocate to its own Subscribers or when an identity column data type does not support an additional identity range allocation. If a republishing Subscriber has run out of identity ranges, synchronize the republishing Subscriber to obtain more identity ranges before restarting the synchronization. If a Publisher runs out of identit (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199417) Get help: http://help/MSSQL_REPL-2147199417
I have updated my sql server to service pack 2
The publisher is sql Standard edition and the subscribers are Express edition
Everyday between 18:00 and 20:00 nearly 1000 PDA Subsriber anonymously synchronise via Merge Replication and at least two time he have the error :
IIS Worker Process Faulting application w3wp.exe, version 6.0.3790.1830, faulting module sscerp20.dll, version 2.0.7331.0, fault address 0x000110f4.
And subscriber which synchronising meanwhile becomes suspect.
Can someone offer a suggestion as to the cause of and correction for this error?
Thanks,
Hakan G
Here is some details about our system:
Client Side OS: Windows Mobile 2003 4.21.1088 DB: SQL CE 2.0 Microsoft SQL Server CE (ssce20.dll) 2.00.4415.0 Microsoft SQL Server CE Client Agent (ssceca20.dll) 2.00.4415.0 Development Tools: VB.NET 2003 Service Pack: .NET Compact Framework 1.0 SP3
Server Side OS: Microsoft 2003 SP1 Internet Information Services (INETINFO.EXE) 6.0.3790.1830 (srv03_sp1_rtm.050324-1447) IIS Worker Process (w3wp.exe) 6.0.3790.1830 (srv03_sp1_rtm.050324-1447) HW:IBM XSERIES_346 Intel(R) Xeon(TM) CPU 3.60GHZ (2CPU) 5,00 GB RAM DB: SQL CE 2.0 DB:SQL Server Standart Edition 8.00.2039(SP4)
SQL CE Server 2.0 Microsoft SQL Server CE Server Agent (sscesa20.dll) 2.00.7331.0 Microsoft SQL Server CE Replication Provider (sscerp20.dll) 2.00.7331.0
I'm trying to set up a merge replication. Publication is created successfully and snapshot also, but when I create pull subscription on subscriber server and merge agent starts, after some time I get an error message of this type:
The schema script '\ANILREPLDATAuncANIL_BEJK_BEJK20070625142735dl_HF_vMSCene_3836.sch' could not be propagated to the subscriber. It seams there is a problem with certain Views and SPs, because tables are successfully created, and some Views and SPs also.
I tried to exclude problematic articles, but every time another one pops up. Up until now, I excluded 7 articles from publication (1 Stored Procedure and 6 Views) but I still get errors.
I gave up because I can't exclude half of the Views and SPs just to make it work.
Is there something that can be done to solve this problem?
We have a merge subscription which is reporting the following error at the subscriber:
The Merge Agent failed after detecting the retention-based metadata cleanup has deleted metadata at the Publisher for changes not yet set to the Subscriber. You must reinitalize the subscription (without upload)
I'm a bit confused about this - there have been no changes made at the publisher - why would we be getting this message?
i am getting the below error while applying running the Synchronization agent for the Subscriber. I have created replication topology with one central server and one subscriber. Here central server has windows server 2003 and subscriber has windows XP. Both are having SQL server 2005. After creating the merge subscriber, i am runnnig the Synchronization agent manually for the first time. While running that i am getting below error. Anybody aware of this error.
2006-06-24 00:26:00.175 Applying the snapshot to the Subscriber 2006-06-24 00:26:02.722 The schema script 'D_NUM_7.sch' could not be propagated to the subscriber. 2006-06-24 00:26:02.784 Category:NULL Source: Merge Replication Provider Number: -2147201001 Message: The schema script 'D_NUM_7.sch' could not be propagated to the subscriber. 2006-06-24 00:26:02.816 Category:AGENT Source: WMBT-07 Number: 0 Message: The process could not read file '\WMBT-01 epldatauncLTR-IN001_TEST_PUB20060624034804D_NUM_7.sch' due to OS error 1265. 2006-06-24 00:26:02.831 Category:OS Source: Number: 1265 Message: The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.
"The merge process could not retrieve identity range resource for table..."
then after solving this error we again started syncing of servers manually then we got some other error like
"the process could not enumerate changes to the subscriber".
We tried our best to solve this problem but some error appears each time like
"The process could not deliver the snapshot to the Subscriber."
"The schema script 'sync -t"Design" -o"dbo" -d"\ECOSYSTEMD$FTPMSSQLEcoSystemftpECOSYSTEM_MLEcosystem_MLEcosystem20060619204802Design_1337.bcp" -hORDER( [intDesignId] ASC)' could not be propagated to the subscriber"
again identity erroe emerges and agin we do the same process.
There is an error in one of my merge publication. The error is,
The change for the row with article nickname 2336003 (test), rowguidcol {436456F0-F5AD-E411-80CF-5CF3FC1D2D76} could not be applied at the destination. Further information about the failure reason can be found in the conflict logging tables.
When i checked my tables I got following values in rowguid column
Hi I am trying to complete sql server compact edition book online walkthrough "Creating a Mobile Application with SQL Server Compact Edition". I am successful to complete it as guided using all default settings (e.g. anonymous access, windows authenticaion etc.) and the sample run on both emulator and my pocket pc svc5000. I have following configuration..
Windows 2000 professional sp4 Sql server 2005 standard edition sp1 VS 2005 profesional edition (sp1 not installed) Sql server compact edition Sql server compact edition server tools
But the problem is that in production environment i will not be able to connect to the sql server using named instance (e.g machine_nameinstance_name). i have to use ip address in that situation. so i tried to modify the sample to use ip address in place of named instance and then the problem starts.. I have configued my sql server to allow remote connections using tcp/ip and named pipes using sql surface area config tool.
When using named instance i used following code to Synchronize with sqlserver 2005 with and it worked perfectly :
Dim filename As New String("Program FilesTestTest.sdf") Dim repl As New SqlCeReplication() repl.InternetUrl = http://machine_name/Test/sqlcesa30.dll repl.Publisher = "machine_nameinstance_name" repl.PublisherDatabase = "Test" repl.PublisherSecurityMode = SecurityType.NTAuthentication repl.Publication = "Test" repl.Subscriber = "Test" repl.SubscriberConnectionString = "Data Source='" + filename + "';Password='';Max Database Size='128';Default Lock Escalation ='100';" Try repl.AddSubscription(AddOption.CreateDatabase) repl.Synchronize() Catch err As SqlCeException MessageBox.Show(err.ToString) End Try
When i tried to do replication using ip address it shows following error:
System.Data.SqlServerCe.SqlCeException was unhandled HResult=-2147467259 Message="Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect." NativeError=29061 Source="Microsoft SQL Server Compact Edition" StackTrace: at System.Data.SqlServerCe.SqlCeReplication.Synchronize() at TEST.MainModule.Sync() at Test.MainModule.Main()
I am using following code to connect using ip address:
Dim repl As New SqlCeReplication() repl.InternetUrl = http://XXX.XXX.XXX.XXX/test/sqlcesa30.dll repl.PublisherNetwork = NetworkType.TcpIpSockets repl.PublisherAddress = "XXX.XXX.XXX.XXX,XXXX" repl.Publisher = "SQL2005" 'instance name of sql in sql2005 repl.PublisherSecurityMode = SecurityType.NTAuthentication repl.PublisherDatabase = "Test" repl.Publication = "Test" repl.Subscriber = "Test" repl.SubscriberConnectionString = "Data Source='" + filename + "';Password='';Max Database Size='128';Default Lock Escalation ='100';" repl.AddSubscription(AddOption.CreateDatabase) repl.Synchronize()
I have give rights to iuser_manchine_name in the public access list of publication and on database also.
I don't have any idea on where i am wrong... Please help soon.. Many thanks in advance..
I've been setting up subscriptions to a merge publication for the past 3 days. All of a sudden, I'm getting a pile of very strange errors. Replication is configured. I have 16 subscribers to an existing publication configured and synchronizing changes without any issues. The script that I'm using to create all of the subscriptions is as follows:
The last one that I added #17, gives the following errors after successfully creating the subscription.
Command attempted:
{call sys.sp_MSmergesubscribedb ('true', 0) }
Error messages:
The merge process could not initialize the subscription. Ensure that the subscription registration exists at the publisher, and reregister the subscription if necessary. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201011) Get help: http://help/MSSQL_REPL-2147201011
RegCreateKeyEx() returned error 5, 'Access is denied.' (Source: MSSQLServer, Error number: 22002) Get help: http://help/22002
Could not add article resolver 'Microsoft SQL Server Additive Conflict Resolver' information to the registry (Source: MSSQLServer, Error number: 21713) Get help: http://help/21713
Could not register article resolver: 'Microsoft SQL Server Additive Conflict Resolver'. (Source: MSSQLServer, Error number: 21715) Get help: http://help/21715
The system tables for merge replication could not be created successfully. (Source: MSSQLServer, Error number: 20008) Get help: http://help/20008
I've tried to manually create it using the GUI and get an even stranger error message as follows:
TITLE: New Subscription Wizard ------------------------------
Microsoft SQL Server Management Studio is unable to access replication components because replication is not installed on this instance of SQL Server. For information about installing replication, see the topic Installing Replication in SQL Server Books Online.
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=ReplicationNotInstalled&LinkId=20476
Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication. (Microsoft SQL Server, Error: 21028)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=21028&LinkId=20476
------------------------------ BUTTONS:
OK ------------------------------
I very obviously have replication installed by virtue of the fact that I have a publication and 16 subscriptions that are currently synchronizing. Any ideas?
Hi everyone, I need urgent help to resolve this issue... As far as the performance goes which one is better.. Unique Index(col1, col2) OR Unique constraint(col1, col2) ? Unique constraint automatically adds a unique index and unique index takes care of uniqueness then whats the use of unique constraint ?
BOL says a unique constraint is preferred over a unique index. It also states that a unique constraint creates a unique index. What then is the difference between the two, and why is a constraint preferred over the index?
hi team, .Can i create umique constraint with out unique index.when i am creating a unique constraint sql creates a unique index (default) can i have only unique constraint ?