Md. shams
Replication
Replication
hi,
Primarily we have four types of replications.
1.Snapshot Replication
2. Transactional Replication
3.Peer to peer Replication
4.Merge Replication
And another type of Replication is Transactional Replication with Updatable Subscription.this feature may be deprecated feature in future release of versions in SQL Server.
The subscription to this publication is not active yet. No user action is required
Hello Experts,
Replication is always uneasy subject to me..
I just saw few 100 articles getting bcp'ed from from publisher. But distributor agent is still saying "on to this publication is not active yet. No user action is required"
Why is distributor agent not applying these tables into subscriber? I am clueless. Can you please help?
Web Synchronization from non server to server
Its possible to use merge replication with web synchronization on two pcs where one is a webserver hosted online and other is a simple pc with internet access? Can the pc with simply internet access be the publisher?
If so, how can i do it?
Publisher which is sql server failover cluster, ran slowly
I have a sql server failover cluster with 2 nodes (named DBS). The database runs normally. The OS is Windows Server 2012 Standard Edition. The version of DBS is sql server 2012 enterprise.
And I have 4 stand-alone databases (DB1, DB2, DB3, Dist). The Dist is set up to a distribution database. DBS is a publisher. DB1, DB2, DB3 are subscribers.
But the DBS ran very slowly. Actually, it very hard to use Management Studio. I usually have got error message: Time out.
Therefore, I have to install another stand-alone database, and make it to a publisher. And the replication is fine.
So what 's happened with my sql cluster ???
I can not find any errors or warnings in Event viewer and Sql server logs. Anybody has the same problem ?
How to debug business logic handler in local system.
Hi
i have followed what ever steps metioned in msdn.
When i start the synchronization through RMO,Datas are replicated from publisher to subscriber.But the problem is it was not hits the break point in business logic handler project.
Already i spent 3 days ,please help me for this issue.
Thanks
How do I restore cluster database using a backup file(.bak)
I have a clustered database(sql server 2008 and sql server 2008 r2) that is in production environment(data is updated in both database at the same time)
I would like to restore the data from the backup file to both databases with minimal downtime
How do I go about doing this?
Microsoft Publisher 2013 stops working
Merge Replication Primary Key Conflict Resolution
I'm having a problem with large numbers of unresolvable conflicts in a merge publication.
A situation has occurred that has introduced a large number of conflicts across multiple tables which are caused by primary key violations. We're using subscriber always wins conflict resolvers, but the conflicts are not being resolved. From my reading of other posts and threads it appears that the conflict resolver CANNOT resolve conflicts arising from primary key violations.
I have also read that turning on "compensate for errors" on the article should cause the problem to rollback, but that is not happening in practise.
What I'm seeing is that the conflicts are re-propagated every sync, causing the msmerge_genhistory table to grow larger and larger, (around 150,000 new rows are being added every hour), which greatly exceeds the amount of replication traffic I am expecting.
It is not feasible to manually go to the subscribers and delete the conflicting data rows as there are far too many subscribers, tables and conflicts to deal with.
Aside from blowing away replication and reinitialising the entire site, what are my options?
SQL replications not reliable???
Hi,
After running merge replications for over a year on production system, we have noticed that there are mismatches between publisher and subscriber. The differences are in the count of rows and also in the values of fields. I have no idea how this happened as there are no conflicts reported and replications have never failed. I know there is a validation procedures provided by SQL, but is not an option, because it takes too long and it doesn't fix it automatically.
Any ideas how this might happen? Are replications unreliable?
Merge Replication : Log the "Winning" Row
According to this KB
http://msdn.microsoft.com/en-us/library/ms151749(v=sql.90).aspx
After a conflict is detected, the Merge Agent launches the conflict resolver specified for the article with a conflict and uses the resolver to determine the conflict winner. The winning row is applied at the Publisher and Subscriber, and the data from the losing row is written to a conflict table.
Losing row is logged , what if I want to log also the winning row to compare what changes exactly happened ? when I launch conflict viewer , it looks like the viewer shows the winning row as the last image of the row so there could be more changes in the interiem
Any idea ?
[Business Logic Handler debugging] - The assembly is not loaded by inetinfo.exe process
Hi there,
Here is my story - my merge replication topology consists of one publisher (sql server 2008), a distributor (same server as publisher) and a subscriber (sql server 3.5 CE). I use web synchronization for my merger replication. Publisher, Distributor, Subscriber and IIS run all on the same (development) machine. I use MSSMS to synchronize the subscriber.
I've created a custom resolver (Business Logic Handler) that should perform some data modification that has been inserted at the subscriber, before it is merged into the publisher. It should but it doesn't so I need to debug it to see what's going on. I've followed steps form here http://msdn.microsoft.com/en-us/library/ms365150.aspx on how to debug a business logic handler on a Web server using Web synchronization and I'm stuck at step 7.MY PROBLEM IS when I attache to inetinfo.exe process from VS2008, I don't see my assembly to be loaded neither in Output nor in Modules window and the break points say that they will not be hit because the symbols were not loaded.
I configured web synchronization almost exactly as it says here http://msdn.microsoft.com/en-us/library/ms151810.aspx , the only difference is that I didn't configured and don't use SSL but even so the synchronization works between publisher and subscriber.
I set the break points and built my business logic assembly in debug mode (I cleared \obj and \bin folders before build), copied both .dll and .pdb files into C:\Program Files\Microsoft SQL Server\100\COM folder and registered it into Distributor using following script:
exec sp_registercustomresolver
@article_resolver = N'Custom Conflict Resolver' , @resolver_clsid = NULL , @is_dotnet_assembly = N'true' , @dotnet_assembly_name = N'C:\Program Files\Microsoft SQL Server\100\COM\CustomConflictResolver.dll' , @dotnet_class_name = N'CustomConflictResolver.CustomConflictResolver'
Then I sync the subscriber and after that, from VS2008 attach to the inetinfo.exe process with 'Attach to' option set to 'Managed code, Native code'. After I do all that, as I said earlier, I don't see my assembly to be loaded in Output neither in Modules windows.
[UPDATE]: I know that handler is executed during synchronization as I get the error that I generate in the code, than means that assembly is loaded. Why I don't see that it's loaded when I try to debug it?
Please help as I've already spent 2 days trying to figure this out but with no luck.
Thanks,
Victor
Merge replication - schema script could not be propagated to the subscriber
Hi
I see lots of references to this problem that have to do with permissions but I don't think that's it here...
I added a couple of columns to a table, and added a default value for one. A little later I didn't like the way I had done it and dropped the columns. Then I added them again the way I really meant to in the first place.
The rest of the error says:
Error messages:
The schema script ' if exists (select * from syscolumns where name = N'Col1' and id = object_id(N'[dbo].[tbl1]')) if exists (select * from syscolumns
where name = N'Col2' and id = object_id(N'[dbo].[tbl1]')) if object_id(N'[dbo].[tbl1]') is not null exec('ALTER TABLE [dbo].[tbl1]
DROP COLUMN Col2, Col1')' could not be propagated to the subscriber. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
The object 'DF_tbl1_Col2' is dependent on column 'Col2'. (Source: MSSQLServer, Error number: 5074)
Get help: http://help/5074
ALTER TABLE DROP COLUMN Col2 failed because one or more objects access this column. (Source: MSSQLServer, Error number: 4922)
Get help: http://help/4922
I've tried reinitializing and that didn't help. I tried stopping synchronization and removing the article that is this table and then going back and removing the columns from the publisher and the subscriber separately. But when I add the article back in and restart synchronization (with a new snapshot), the columns end up added back in already before the offending code tries to run.
It looks, in fact, like the order of execution of the DDL statements can end up out of sequence. When trying to start from a new snapshot as described above, I found it choking on another table where it said that the schema of the tables in the two databases weren't compatible. In this instance, I had added Field1 to a table, then came back and added Field2 and Field3. But in some (not all) of the subscription databases the fields were added in the order Field2, Field3, Field1. This is a bit scary to me...
Can someone please give me a clue what I need to do here?
Thank you!!!
sql server distribution database issue
hi,
we have "transnational" replication one of my production server,
here i am checking my "distribution database" is located in subscriber server, will it work transnational replication here.
please post the answers...Replication Issue.
we are contentiously receiving below error message :
" The replication agent encountered an error and is set to restart within the job step retry interval. See the previous job step history message or Replication Monitor for more information"
then i am check into the replication monitor we have one message :
"CONDITIONAL failed because the following SET options have incorrect settings: 'ANSI_PADDING'.
Verify that SET options are correct for use with indexed views and/or indexes on computed columns
and/or query notifications and/or xml data type methods."
so what we can do here , please give me the answer.
Replicating identity column issue.
hi Replication experts
After completing SNAPSHOT Replication from sql server 2012 to sql server 2005 , i'm getting an Primary key voilation Error though after reseeding the value to the max (column) value using DBCC checkident('TableName',Reseed,Max(ColumnValue)),
sql server loosing the identity current value for the tables all of a sudden and inserting the previous value which is already existing. for this causing primary key voilation.
For Example SalesID is 100 and Ident_current is 100 for the inital, after some moment Ident_current value will jump to 55 which causes the error for Primary key voilation
Identity property is set :
IdentitySeed
IncrementNot For Replication
RID1 10
i'm not restarting my sql server frequently.
why sql server loosing the identity Ident_current value for the tables?
is there any issue to fix this problem ??
Now database restored in Sql server 2008 RTM Enterprise Edition & running in windows server 2008, but issue is same .
please give me solution or troubleshooting methods if found or faced any similar issues.
is there any setting/configuration at database level to get rid of this issue.
Myself Troubleshooted steps:
Rebuilded Indexes using DBCC DBREINDEX()
Updated statistics using sp_updatestats
setted compatibility level to (100) and restarted, so that sql server will do recovery while startup for SS 2005 DataBase.
Thanks in advance.
Pavicoolman
Merge replication 2005 : row flagged as conflict even if it was not updated at publisher
Hey folks
I've a specific situation where I don't know why some rows are flagged as conflicts
1- APP made modification on Subscriber instance
2- Distributor , remote, identified this row as conflict
3- Merge agent picks Publisher as winner and applies the row to both publisher and subscriber.I know no modifications happened on publisher because we have triggers on updates that will log the updates and who made it. The triggers logged the operation on subscriber as expected.
Anyone saw that before ?
Appreciate
Merge replication fail to sync!!! HELP!!!
1 Server (sql 2008 std) - 7 Workstations (sql 2008 exp)
For each workstation, there will be 2 publication on the server for it.
So far 6 workstations are able to sync properly using windows synchronization manager to do pull subscription.
With the exception of 1 workstation, while 1 publication was able to sync.
Another failed with the following 4 errors in the replication monitor:
1) Unable to retry the command. The merge process could not add retry information at the Publisher on tempdb. This may be due to too much activity on tempdb. Restart the synchronization when activity on tempdb has decreased. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201015)
- i have checked the database at 1.6gb, tempdb at ~600mb and distribution at ~80mb.
- ram is running with extra physical ram.
2) Error converting data type bigint to int (Source: MSSQLServer, Error number: 8114)
3) The merge process could not replicate or more INSERT statements to the 'Publisher'. A stored procedure failed to execute. Troubleshoot by using SQL Profiler. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200990)
4) The process was successfully stopped. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200999)
Any help to resolve this problem would be appreciated, as it is very urgent and important!!!
Thanks!
ic3dwabit
Merge replication using RMO with SQL Server 2008 Express
I am trying to configure a merge replication between a the publisher (SQL Server 2008 R2) and several clients running SQL 2008 R2 Express. I have created separate local windows logins for merge, distrubution and snapshot agents. Everything works fine if I use Sync Center on clients to replicate, but I cant get it to work when using RMO.
The problem is that I dont know how to connect with RMO using the dedicated merge account that Im using with Sync Center or a client that has the SQL Server Agent with the replication job.
Does anybody know best practice for this?
Here is a code snippet that I am using:
ServerConnection conn = new ServerConnection(subscriberName);
MergePullSubscription subscription;
conn.Connect();
subscription = new MergePullSubscription();
subscription.ConnectionContext = conn;
subscription.DatabaseName = subscriptionDbName;
subscription.PublisherName = publisherName;
subscription.PublicationDBName = publicationDbName;
subscription.PublicationName = publicationName;
if (subscription.LoadProperties())
{
agent = subscription.SynchronizationAgent;
agent.PublisherSecurityMode = SecurityMode.Integrated;
agent.DistributorSecurityMode = SecurityMode.Integrated;
agent.Distributor = publisherName;
agent.OutputVerboseLevel = 4;
agent.Output = "C:\\TEMP\\mergeagent.log";
agent.Status += new AgentCore.StatusEventHandler(agent_Status);
agent.Synchronize();
}
Replication command string error
Hi All,
We are facing a rear issue which leads to crash of all subscription and table out of sync.
Details are: Replication 'A' have 3 subscriber (B,C,D)
- When Column 'Col1' is being updated with some value , it creates replication string for all three subscription
- At subscriber end, when this replication string get execute it gave us an error
Error converting data type varchar to uniqueidentifier.
- We tried to drop and re-create replication many times but none of error resolved(conversion error and out of sync)
Here is replication string which we got from Replication error table
0x0031C9AC00001A5D0001ServerNameDBName203001NULLNULL0x00000000000000000000{CALL [dbo].[sp_MSupd_dboTableName]
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'A4',NULL,NULL,NULL,NULL,NULL,{A853D213-5EC5-42F8-9287-FC505997A2FF},NULL,NULL,NULL,NULL,NULL,NULL,
438156,'WT WM',0x00100400)}1
--> 'WT WM' value in above string is creating problem for us as procedure at subscriber end expect a Unique identifier values (old Unique identifier value).
SM