Quantcast
Channel: SQL Server Replication forum
Viewing all 4054 articles
Browse latest View live

Microsoft.SqlServer.Replication.ComErrorException; building in "x86"

0
0

Hello,

I have a quick question that I have really been struggling with as of late. I'm going to keep it simple. I am developing an application that uses a two databases running different types of Sql Server, one 32-bit and the other 64 bit. Basically, I need to build my application using Configuration properties of "x86" because accessing the 32-bit database has been deemed more important. The problem occurs when accessing the 64-bit database, I receive the exception Microsoft.SqlServer.Replication.ComErrorException,"class not registered". Unfortunately I can't use the most suggested solution of changing the build properties to "Any CPU" because it breaks access to the 32-bit database. Does anyone have an idea about how I would fix this in another manner? I've tried adding references to Microsoft.SqlServer.Replication.dll, Microsoft.SqlServer.Rmo.dll among others and still no luck. Any advice is appreciated and I thank you in advance.


Deferred Updates happed even if the value does not change in SQL Server 2012

0
0

I am not sure if this was an intentional compatibility break for SQL Server 2012, but I have not been able to find any docs on it, so I am going to post it here to see.

We upgraded our SQL Server that publishes reference data to other servers.  The upgrade moved us from SQL Server 2008 R2 to SQL Server 2012.

After the upgrade we noticed that some of our replications would break because tables that were designed to never delete rows were trying to replicate deletes.

After a lot of research I found that my SSIS package that populates the source table every night was starting the chain of events that lead to the deletes.  This SSIS package fills a stage table, then does a MERGE to the "live" data.  (The idea is that any changes to data will then be replicated to the subscribing databases.  This all worked perfectly with SQL Server 2008 R2.)

The SSIS Package is very careful to never delete any rows.  Any NOT MATCHED on Source rows have an IsActive column set to false (not a DELETE).

However, after upgrading to SQL Server 2012, this merge statement would cause  every row in the table to try to publish a delete and an insert statement to the subscribers.

In an attempt to get to the point of this issue I need to define a scenario that can cause a Deferred Update:

If a MERGE statement has the clustered key in an UPDATE statement (in the MATCHED clause) then every row affected will post as a Deferred Update (Causing a Delete and an Insert to be published to subscribers).

However, new in SQL Server 2012, is the fact that even if the value of the clustered keyDOES NOT CHANGE it will still replicate as a Deferred Update.  Infact, even ifnothing in the row has changed at all, the row will still replicate a delete and an insert.

I tested this with traces an found it to be true and totally reproduceable every time.

So, I have 3 questions:

  1. Has anyone else seen this?  (Can it be reproed by more than just me?)
  2. Is it a Bug?
  3. Is there a way around it (besides using a compatibility mode)? 
    (NOTE: Trace Flag 8207 will only work if you are updating a single row, my merge statement affects the whole table.)

For now we removed the Clustered Key (Primary Key) from the update part of the merge statement.  (It never, ever, changes, so we did not need it there anyway.)  But I would still like to know what is going on here.


Column Valid_date(column_name) in object dbo.Table_name contains type Date, which is not supported in the target server version, SQL Server 2005.

0
0

Hi Guys,

We need to configure Database Transnational replication between two SQL 2012 Server.

we created SQL Agent Authentication between both server for db replication. After successfully creation of Publication, while we monitoring replication through replication monitoring window for Agent history status,  it will throws error for some in-compatibility of column of some tables, which fails t create first snapshot to start Transnational replication between SQL 2012 Server.

Error got from snapshot Agent History from Replication Monitor Window says : 'Column Valid_date(column_name) in object dbo.Table_name contains type Date, which is not supported in the target server version, SQL Server 2005.'

Any one can suggest how to make that column compatible with SQL 2012 server. Required efficient solution as there are more then 500 tables need to change with some columns. 

below is full error message :

Error messages:
Source: Microsoft.SqlServer.Smo
Target Site: System.Collections.Generic.IEnumerable`1[System.String] ScriptWithList(Microsoft.SqlServer.Management.Smo.DependencyCollection, Microsoft.SqlServer.Management.Smo.SqlSmoObject[], Boolean)
Message: Script failed for Table 'dbo.table_name'. 
Stack:    at Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(DependencyCollection depList, SqlSmoObject[] objects, Boolean discoveryRequired)
   at Microsoft.SqlServer.Management.Smo.Scripter.EnumScriptWithList(SqlSmoObject[] objects)
   at Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(SqlSmoObject[] objects)
   at Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateLogBasedArticleSchScript(Scripter scripter, BaseArticleWrapper articleWrapper, Table smoTable)
   at Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateLogBasedArticleScripts(ArticleScriptingBundle articleScriptingBundle)
   at Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateArticleScripts(ArticleScriptingBundle articleScriptingBundle)
   at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateObjectScripts(ArticleScriptingBundle articleScriptingBundle)
   at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
   at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
   at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
   at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
   at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: Microsoft.SqlServer.Smo, Error number: 0)
Get help: http://help/0
Source: Microsoft.SqlServer.Smo
Target Site: Void CheckSupportedType(Microsoft.SqlServer.Management.Smo.ScriptingPreferences)
Message: Column Valid_date(column_name) in object dbo.Table_name contains type Date, which is not supported in the target server version, SQL Server 2005.
Stack:    at Microsoft.SqlServer.Management.Smo.Column.CheckSupportedType(ScriptingPreferences options)
   at Microsoft.SqlServer.Management.Smo.Column.VersionValidate(ScriptingPreferences sp)
   at Microsoft.SqlServer.Management.Smo.Column.ScriptDdlCreateImpl(StringBuilder sb, ScriptingPreferences sp)
   at Microsoft.SqlServer.Management.Smo.Column.ScriptDdl(StringCollection queries, ScriptingPreferences sp)
   at Microsoft.SqlServer.Management.Smo.Table.ScriptTableInternal(ScriptingPreferences sp, StringBuilder sb, ColumnCollection columns, ICollection indexes)
   at Microsoft.SqlServer.Management.Smo.Table.GetTableCreationScript(ScriptingPreferences sp, StringBuilder sb)
   at Microsoft.SqlServer.Management.Smo.Table.ScriptCreate(StringCollection queries, ScriptingPreferences sp)
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ScriptCreateInternal(StringCollection query, ScriptingPreferences sp, Boolean skipPropagateScript)

How to determine how many trasnactiosn are left to replicate

0
0
Is there a way to read the transaction log and determine how many transactions are marked for replication?

John M. Couch

Peer to Peer replication primary key conflict (Emergency)

0
0
(On SQL server 2012) I have to set up peer to peer replication on A/A cluster node(production to development and development to production ). Now the question is if data is coming from application server and inserting/updating a row on production. it will mirror automatically on development too. but at that same time while doing this if both table is same on both server and which has a primary key then it will be conflict insert-insert or update-update or insert-update conflict. So, i want some automatic solution for this. can please someone guide to solve this conflict?

Bulk Copy failure where subscriber Article contains additional columns to publisher Article

0
0

Hi

I have a transactional publication containing an Article that is column filtered (i.e some columns are not to be replicated). The corresponding Article in the subscriber is IDENTICAL to the Article in the Publisher. That is, the subscriber article contains the columns of the publisher article that are not replicated. Also, these "additional" subscriber columns both allows null .

Neverthless the application of the snapshot fails with

"The process could not bulk copy into table <Table>."
"End of file reached, terminator missing or field data incomplete"

The bcp file, naturally enough ,only contains values for the replicated columns. I have read advice that states that if the subscriber article specifies defaults for the unreplicated columns then everything should be OK.

How can this be fixed without redefining the subscribers schema definition. Does bcp assume all column values are provided

Can parameters on the bcp command be altered in the publication definition to cater for this situation

Bulk Copy failure where subscriber Article contains additional columns to publisher Article

0
0

Hi

I have a transactional publication containing an Article that is column filtered (i.e some columns are not to be replicated). The corresponding Article in the subscriber is IDENTICAL to the Article in the Publisher. That is, the subscriber article contains the columns of the publisher article that are not replicated. Also, these "additional" subscriber columns both allows null and have a default value (' ') specified.

Neverthless the application of the snapshot fails with

"The process could not bulk copy into table <Table>."
"End of file reached, terminator missing or field data incomplete"

The bcp file, naturally enough ,only contains values for the replicated columns. I have read advice that states that if the subscriber article specifies defaults for the unreplicated columns then everything should be OK.

How can this be fixed without redefining the subscribers schema definition. Does bcp assume all column values are provided

Can parameters on the bcp command be altered in the publication definition to cater for this situation

Henrietta

Réplication de fusion

0
0

Bonjour,

je suis entrain de développer une application de force de vente qui utilise la synchronisation web et la réplication de fusion.

j'ai trois type de table(type 1 type2 type3),et pour chaque type  j'ai crée une publication,et maintenant j'ai un quatrième type de table ,si je crée la cinquième  publication ça ne me fais pas des anomalies dans mon serveur .

s'il vous plait merci de me données votre conseille.

-utiliser plusieurs publications

ou bien

-diminuer le nombre des publication est augmenter le nombre d'article dans chaque  publication.

Merci d'avance.


Repilication_Issue

0
0

Hi 

i am using transaction replication i reinitialized the subscription then it copied some data and after some time it was showing continuously that 'The process is running and is waiting for a response from the server'.  what it mean and how to resolve it

 


naveen

Trans Replication IDENTITY range management info

0
0

Where does Transactional replication store the information about the type of IDENTITY range management? I am trying to find the system table that shows the mapping between the article name and the IDENTITY range management option (manual or auto).

Thank you.

error in adding subscriber to exisiting config

0
0

the error is :Replication-Replication Distribution Subsystem: agent (null) failed. The publication 'Transactional' does not exist.

Have a already running transactional  repl and was adding a new subscriber to this one and got the error above

The process was:

1. backup of publisher

2. restore on subscriber

3. configure pull subscription from subscriber

4. initialize from backup


Ap

Could two sql cluster do transactional replication ?

0
0

Hello, I have 2 sql failover cluster in the same domain with SQL Server 2008R2,
each cluster has 2 nodes(dedicated server) and these 4 dedicated server has same OS SID and same domain account with administrator right.
also, the 4 dedicated server firewall is closed and cluster is work normally.

Now, I need to make the 2 clusters to do transactional replication to each other, is it work?
I've success in two virtual sever but didnt't try on cluster.

I use the DTCPing and the DtcTester to validate msdtc connection between these 2 clusters,thd DTCPing is ok, but the dtctester is always fail.
Does anybody has any idea tell my why???

and another question is should I restart the SQLServer Service after msdtc service restart?

======================================================
Any help is greatly appreciated. Thanks a Lot.

Regards,
Caty

Microsoft SQL Server 2008 R2 Transaction log shipping large logs at 2AM

0
0

Hi everyone, i have an odd question.

We've recently migrated to MS SQL 2008 R2 with SP2 and the latest CU, (as in this week)
We use Transaction log shipping to our DR facility for recovery purposes

The issue we are facing is this:
At about 1AM every day so far since we re-introduced the log shipping we have been receiving our WSS_Content database Transaction logs in an out of character large chunk e.g. 19GB over a 50mbps link to our DR SQL server normally the Transaction logs sit at around the 800MB mark sometimes less sometimes more.

I'd like to find out exactly what is happening, additionally I'd like to point out our log shipping time is 15 minutes, during this period the Veeam backup has not been running either so it's not like the logs have built up

I've been able to find out that there is a job called syspolicy_purge_history which is scheduled to run daily @ 2AM however this doesn't fit the picture

SQL 2008 Replication on a x64 machine using x86 replication DLL's

0
0

We are developing an applicaiton that uses SQL replication. We also have DLL's in our project that call unmanaged C++ librairies. (We can not get away from this).
I have done the data replication and it works great when ran in "Any CPU" my machine is a x64 machine. However when I went to integrate the other DLL's that the project needs they have to run in x86 mode. Everything works except SQL replication when compiled in x86. I get class not found error. I believe this is because since my machine is x64 the replication dlls are for a x64 machine.
Is there a way I can use the x86 dlls on my machine (in my project) to get replication to work? What are the files needed and how to reference them?
Thanks!

One Way Replication Publisher 2 Subscriber

0
0

Hello Friends,

I got scenario where data should be only downloaded from Publisher to Subscriber ( All updates happened at Publisher ) . I know that i can implement the transnational replication and even one way Merge Replication ( I am ok with this). But to implement the Transnational Replication i don't have Primary Keys on the tables , and they cant be its designed by application.

And now if i use Merge my issue will be resolved by creating the Identity ROWGUID column by replication, and by specifying the ExchangeType -2 at Agent properties , but what read was when we made the Articles as download only , they are loosing the ability to record the changes and it wont update the subscriber tables with the changes any on top of the inserts , it can only download new inserts ( which i am not sure about).

So now my issues is we will get lots of updates on single row and i have to replicate all the changes to subscriber with out fail. And there is no filtering involved in this replication setup.

Please Advise.


Regards JakDBA Please Mark this as Answered if this solves your issue or satisfied with the response.


In RMO, which property of the class "Microsoft.SqlServer.Replication.PublicationAttributes" corresponds to the sync_method parameter of sp_addpublication?

0
0

In RMO, which property of the class "Microsoft.SqlServer.Replication.PublicationAttributes" corresponds to the sync_method parameter of  sp_addpublication?

I'm implement transactional replication using RMO and I need to set the sync_method property. I believe it should be a property of the class "Microsoft.SqlServer.Replication.PublicationAttributes"  but not sure which one.

Can anyone give me a hand please? Thanks.

Skipped XX error(s) when applying transactions at the Subscriber.

0
0

Why Am I getting these warnings?

My subscriber every now and then would go out of sync so I set this property ON at the agent 'continue on data consistency errors'

Why does the data go data out of sync?

Thanks

Reinitialize subscriptions and New Snapshot

0
0

Hi, I'm a little bit confused about "Reinitialize" and "create a new Snapshot".

This is what I figured out:
When setting up a replication, I have to initialize the subscriber (sending all data from publisher).
This is done by a snapshot.

If I add an article to replication I add it in this WIZARD. When I request "Reinitialize subscription"  after this the  new data (not the existing one) is transfered  via a new Snapshot.  Therefore a "Reinitialize" in my mind is allways a "new Snapshot"
Is this correct ?

  1. Is there a way just transfer the data only for a single able (via snapshot)?
  2. In which case a complete 'Reinitialize' is recomended? (For example if subscriber is completly out of sync, for example after an restore on subscriber or publisher side) - and how do I start this process
  3. There is a  way to initialize subscibers without a snapshot via backup/restore - when does this make sense?

Regards

Christian



Microsoft.SqlServer.Replication.ComErrorException; must build "x86"

0
0

Hello,

I have a quick question that I have really been struggling with as of late. I'm going to keep it simple. I am developing an application that uses a two databases running different types of Sql Server, one 32-bit and the other 64 bit. Basically, I need to build my application using Configuration properties of "x86" because accessing the 32-bit database has been deemed more important. The problem occurs when accessing the 64-bit database, I receive the exception Microsoft.SqlServer.Replication.ComErrorException, "class not registered". Unfortunately I can't use the most suggested solution of changing the build properties to "Any CPU" because it breaks access to the 32-bit database. Does anyone have an idea about how I would fix this in another manner? I've tried adding references to Microsoft.SqlServer.Replication.dll, Microsoft.SqlServer.Rmo.dll among others and still no luck. Recently, I have been advised to split the portions of code into 32-bit and 64 bit specific assemblies, do you think this would work? Would an interprocess communication be the way to go? Any advice is appreciated and I thank you in advance.

How to sync the data without taking snapshot

0
0

Hello,

I am working on replication which replicates data from servers A to B to C. The data is everytime changing on the publisher. Manytimes i see the data out of sync. How do I fix the data once in for all and then start the replication. Without re-initialization as the data is very big.

I have data compare tool which can be used. There are more than one publishers on A and B servers to push the data and they are by row filters.

Can someone please suggest me permanent fix?

Viewing all 4054 articles
Browse latest View live




Latest Images