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

Wat is the easiest way to change the name of a subscriper for Push Transactional Replication with SnapShot ?

0
0
I am migrating a physical server (that has 2 replicated databases) to a new VM server and using a DNS c-name alias to let applications to continue using the old server name. However, since the server name seems to be in the Replication metadata, DNS redirect does not seem to work for replication. In the past, I had to script all DROP and ADD replication on the Publisher and Subscriber, but change the ADD scripts to have the name of the new Subscriber. Is there an easier way to do this ? Is it possible to drop only the subscriber, and then add the "new" subscriber server name ?

Can we synchronize the SQL database from Outlook Business Contact Manager 2008 with another SQL server?

0
0

I have Business Contact Manager at the home office, using SQL server for accounts and contacts.  I synchronize my other databases with a branch office using merge replication.  Can I synchronize the Business Contact Manager database?

My initial experiment yielded a "schema script xx could not be propagated to the subscriber" error. 

Is synchronization impossible?

Merge Replication 'Microsoft SQLServer Stored Procedure Resolver' issue

0
0
Hello,
This is my first time on the Social Forums, so I hope I manage to explain myself.
This is our scenario (it’s a bit complex).
Initially we had a SQL Server 2005 SP3 CU4 instance as publisher in a Merge replication topology with several pull subscribers.
On this server we decided to perform an upgrade to SQL Server 2008 R2 CU7 (from now on 'Inst1').
We had set a Custom Conflict Resolver ('Microsoft SQLServer Stored Procedure resolved') for one article in a bidirectional merge publication that continued to work correctly after the upgrade was finished.
So far, so good. Now we needed to scale up our solution by adding a second merge publisher to our topology ('Inst2'). Since both merge publishers must be kept in sync, we set Peer-to-Peer replication between them to achieve this synchronization (each publisher is a node within a cluster).
After setting up on the second server and instance with both databases correctly in sync (both are identical), we have all merge-subscribers replicating against 'Inst1' and 'Inst2' is being properly updated by Peer-to-Peer replication. At this point we created merge-publications on 'Inst2' identical to those already existing on Inst1 and everything seemed to work just fine.
Now we wanted to move one merge-subscriber from Inst1 to 'Inst2'. In order to do this we removed its subscriptions to Inst1, created new subscriptions to 'Inst2' and started the initial merge-replication against 'Inst2'.
And here is where the problem begins. During this initial merge-replication of the subscriber against 'Inst2' an error is generated related to the Custom Conflict Resolver:
"The process could not initialize 'Microsoft SQLServer Stored Procedure resolved'." Verify that the component is registered correctly."
So far the only difference between both merge-publishers that we have found is the schema_option specified for the article (sysmergearticles) that uses the custom conflict resolver (based on a stored procedure):
Inst1: Schema_Option = 0x000000000C034FD1 Resolver_Clsid = {87EC4491-1B75-4844-B7CF-090A1FB84BA6}
Inst2: Schema_Option = 0x000000B20C034FD1 Resolver_Clsid = {D264B5C0-1300-471A-80C9-9C1FC34A3691}
If we set this article conflict resolution to its default option (publisher wins all conflicts), merge replication works like a charm. But if we set it again to use the custom resolver, we get the same error message again.
Now just another curiosity. Trying to further investigate this problem, we tried and changed on 'Inst1' the article properties to use the Default Resolver (obviously this does not produce any error). And then we changed it back to use the 'Microsoft SQLServer Stored Procedure resolved' option. Surprisingly with this setup we get on Inst1 the same error message as on 'Inst2' (always during merge replication).
Under these circumstances we checked again the sysmergearticles table on both instances and obtained this:
Inst1: Schema_Option = 0x000000000C034FD1 Resolver_Clsid = {D264B5C0-1300-471A-80C9-9C1FC34A3691}
Inst2: Schema_Option = 0x000000B20C034FD1 Resolver_Clsid = {D264B5C0-1300-471A-80C9-9C1FC34A3691}
This is, now we have the same Resolver_Clsid on both publishers and merge replication doesn’t work against any of them.
So, after this long explanation, probably everything comes to one question?
Are there any known limitations to conflict resolution with merge replication when the publisher is at the same time involved in peer-to-peer replication?
Any help would be appreciated.
Thanks in advance and best regards.

Fran Lens http://es.linkedin.com/in/franlens


rename column name during replication

0
0

In sql server replication, we could set the destination table name different from the source table name , does anyone know is there any method to change the column name? thanks.

eg,

source:  table  Tbl_A with column A_1, A_2, A_3

destination:  table Tbl_B with column B_1, B_2, B_3

The process could not initialize 'Microsoft SQLServer Stored Procedure Resolver'. Verify that the component is registered correctly.

0
0

Hi all,

I am trying to use Microsoft SQLServer Stored Procedure Resolver for our Merge Replication via Web Sync/LAN

We have

User PC <---> Web Service (Server on Cloud) <----> Re-Publisher (DB Server on Cloud) <-----> Publisher (Local DB)

User PC has SQL Express 2012 installed

Re-Publisher/Publisher has SQL 2012 SP1 installed

Web Server (IIS) has dlls from Re-Publisher copied and registered

Synchronization works well if we use the Default Resolver

Now we want to use a custom Resolver (registered at Distributor) such asMicrosoft SQLServer Stored Procedure Resolver or a simple one likeMicrosoft SQL Server DATETIME (Later Wins) Conflict Resolver.

However we encountered an error while doing the synchronization:

The process could not initialize 'Microsoft SQLServer Stored Procedure Resolver'. Verify that the component is registered correctly.

We have tried to copy the spresolv.dll from the publisher/republisher to the User's PC and register it with regsvr32 but it did not help.

Any one has any other ideas, we had a feeling that some other dlls might need to be copied down to the User's PC. We also tried other dlls but still no luck...

Thanks in advance guys.


Doug

How to map a value of the __$update_bitmap column in the conflicts table of peer-to-peer replication to actual columns?

0
0

Hello, 

I need to programatically resolve conflicts in peer-to-peer replication and for that I need to now which columns in a particular data table were causing the conflicts. This information is stored in the __$update_bitmap column of the related conflicts table (http://technet.microsoft.com/en-us/library/bb934201.aspx), but I cannot decipher the meaning of the values. For example, I can get the value 0x400 there, which is bit number 10 being set, and I have only 9 columns in my table. Any help that could shed some light on it would be much appreciated.

Tadeusz Dracz

P.S. I know that this table is populated AFTER the conflict was automatically resolved using the node with the highest ID as the winner, but I just need to "fix" this resolution in certain situations.

MS SQL 2008 R2 Replication Behavior

0
0

When publishing a db for replication, does MS SQL 2008 R2 automaticaly shrink the subscription db?

SQL replication or SSIS using CDC

0
0

Hi All,

Can anyone let me know which method is better for replicating data from oracle to SQL Server.whether its SQL Replication(i.e publisher,distributer,subscriber) or using SSIS and CDC tables.My main concern is the performance of Oracle Server as it is my production database so i don't want any overhead on it.kindly Suggest me and also if possible please provide me any link where i can get the advantages and disadvantages of both.Thanks in Advance.


DB replication Vs. SSIS

0
0

I saw a lot of solution would use SSIS rather than DB replication to do the OLAP solution,

But from my feeling, DB replication is much easier to setup and let maintainance for data transfer...

Could any one give my a high level comparence of these two? In which solution the one is better?

Issue in Linked Server

0
0

linked server has been created sucessfully. when i update the data in linked server i have receieved the following errors.

"The Operation could not be performed because OLE DB provider "SQLNCLI" for Linked Server was unable to begin a distributed transaction

"OLE  DB provider "SQLNCLI" for Linked Server returned message "No transaction is Active"

Help me anybody have any solution regarding This issue.

Peer to Peer replication migration

0
0

Hello guys,

We have a two MSSQL instances SQL 2008 R2 Enterprise with established peer to peer transactional replication between them.

The solution is built as a scale-out for better performance. One of the servers is a read server and the second one is a write server. Backend app server uses the write server to load data and another frontend application & SharePoint server use the read server.

There are tables that are enabled for replication and others that are not which results in different database size on each peer.

We are planning to migrate the solution to two SQL 2008 R2 database consolidation instances built on a HA cluster active/active.

Our plan is to proceed in the following way:

1. Make sure there are no replicated transactions in progress and databases are in sync
2. Script replication with all publications/subscriptions on both instances and make the necessary changes in advance to reflect the new instance names. Transfer logins.
3. Disable all replication jobs on both peers
4. Detach databases from both reader & writer instances and attach them to the two new SQL 2008 R2 instances. Fix any login/user mappings
5. Execute the replication creation scripts that will create the distribution database, jobs, publications & subscriptions
6. Re-sync databases

I did not find many articles describing how an entire replication solution is supposed to be migrated. I would like to to check with you if the plan is correct or there is a better way to do this as well as any additional factors that must be taken into account.

Thank you in advance.

primary key on rowguid column in merge replication

0
0

Hi ALL,

                 Can i create primary key on ROWGUID column in merge repicated tables...if i created PK are thy would be any issues with ongoing merge replication....

P2P Replication and Update Stats

0
0

I had P2P Replication configured between 2 servers. The replication from Server 1 to Server 2 was working fine but the Replication from Server 2 to Server 1 was broken. I removed Replication completely and temporarily configured Log shipping between Server 1 and Server 2 as Server 2 was not yet active. After removing P2P Replication, the updatestats on the db which was part of P2P Replication started failing. On researching I found a KB Article:KB2498796 which states that this issue is fixed in SQL 2008 SP2 cu3. (The version of my server is SQL 2008 SP2). I upgrade my server to SQL 2008 SP3 cu1 and notice that the updatestats continue to fail. On further research, I found that the KB Article  for SQL 2008 SP2 cu3 does not list KB2498796 in the bug fix list. I could not find any cu or SP After SP2 cu3 as well which would fix this issue. Only option so far I have identified is clone the table and drop existing table. My table sizes are really huge and also the number of tables along with the number of indexes, constraints, triggers and dependencies on each of the tables It does not seem worth to clone every table to fix this issue. Can anyone suggest any other alternative to fix this issue.??

The error that occurs when I run update stats is :

Msg 0, Level 11, State 0, Line 0

A severe error occurred on the current command.  The results, if any, should be discarded.

Msg 0, Level 20, State 0, Line 0

A severe error occurred on the current command.  The results, if any, should be discarded.

SQL Replication two untrusted domains?

0
0

Quick question.  I am not a DBA and my experience with SQL comes only from installing and configuring it for other Microsoft Technologies.  So this might be an easy answer.

We have a client that is moving some of their web applications to Azure.  We need to replicate data from a SQL instance in the cloud to their onsite SQL server.  My issues is they do not want to extend Active Directory to the cloud, they don't want to trust the domain that we are going to build in the cloud.

Is it possible to still replicate data from the cloud to the onsite database?

Right now we are planning on building a VM and running SQL 2012 and the onsite database is on a SQL 2005 Instance.


Kristopher Turner | Not the brightest bulb but by far not the dimmest bulb.

Replication information

0
0

Hi ,

we configurations the  Replication, after we can run the update statistics on the publication database, this update statistics reflect into subscriber database or not ?

 



SQL Replicate a certain time range

0
0

Hello helpful community, :)

I have a question about replication / logshipping.

Our situation: We have old, big databases on an current production servers (~900GB). (We need to keep many years of data because of FDA) We build a complete new system with new databases, new applications etc. The new databases will go live end of the year and we plan to run both systems parallel for some time. The issue I'm facing are the reports. We need to pull data from both (old and new systems) during this transition period before we can archive the old system.

My Question: We have a new and fast report server. I would like to replicate the current data to the new report server to be able to pull data. Is it possible to setup a replication or logshipping for a certain date range? I thought about having two years worth of data in the subscription / secondary database. 2 years is the range we need for our internal reports.

Additional information: I would prefer to use a replication or logshipping instead of linked servers. The new SQL servers are faster than the old once.

Old systems: SQL 2005 SP4

New systems: SQL 2012 SP1

Thanks in advance

SQL Server 2012 Merge Replication Issue - Inserted Data on Subscriber get deleted after successfully synced back to the Publishers

0
0

Hi all,

I have just encountered this weird issue with our Merge Replication Setup.
We have a primary sql server 2012 replicating data out to another secondary sql server 2012 database (pushing data continuously).
Then we have subscribers (users) synchronize data to the secondary database server (pull subscription, bi-directional sync).
We use parameterized filter (suser_sname) and joined filters on a few tables.
We have the following set up as seen in the attachment

At the subscribers (user's machine), i created a new record of customer which also created customer_contact,contact,pwc_header,pwc_header_extra,pwc_line,site records (one row for each table).
Then i sync the Subscriber with the Publisher. All the inserts were inserted into the Publishers (secondary database server and primary database server) correctly.
However, the inserts were deleted from the subscribers straightaway in the same sync session and we had no idea why it would do that.



Has anyone encountered the similar issue before? Please help...

Custom Resolver Stored Procedure

0
0

I have a merge replication that uses Sql Server Express 2008R2 on the client machines and SQL Server 2008 R2 on the main server.

I tried to create a custom resolver stored procedure on my simplest table. I receive this error message when the resolver is needed:

The Stored Procedure Resolver encountered the following
error executing the stored procedure 'uspCustomerServiceNotesConflictsHandler'.
Could not find server 'DLI000WHE\SQLExpress' in sys.servers. Verify that the cor
rect server name was specified. If necessary, execute the stored procedure sp_ad
dlinkedserver to add the server to sys.servers.

Does a custom resolver work with SQL Express? I have 85 clients and setting them up as linked servers is not something I want to do.

Here is my sproc

ALTER procedure [dbo].[uspCustomerServiceNotesConflictsHandler]
 @tableowner sysname,
 @tablename sysname,
 @rowguid varchar(36),
 @subscriber sysname,
 @subscriber_db sysname,
 @log_conflict INT OUTPUT,
 @conflict_message nvarchar(512) OUTPUT

AS
 set nocount on
 DECLARE
  @ServiceNotes nvarchar(max),
  @ServiceNotesConflict nvarchar(max),
  @ServiceNotesUsed nvarchar(max),
  @CustomerID int,
   @SQL_TEXT nvarchar(2000)

/*** Temp table to hold ServiceNotes value from the conflicting subscriber ***/
create table #tempSubscriber
 (CustomerID int,
 ServiceNotes nvarchar(max),
 rowguid varchar(36)
 )

SET @SQL_TEXT ='insert into #tempSubscriber
   (CustomerID, ServiceNotes,  rowguid)
   Select CustomerID, CustomerServiceNotes, rowguid
     From  ['+@subscriber+'].'+@subscriber_db+'.'+@tableowner+'.'+@tablename+
       '  Where rowguid='''+@rowguid+''''

EXEC sp_executesql @SQL_TEXT

Select @ServiceNotesConflict = ServiceNotes
From  #tempSubscriber
where  rowguid=@rowguid

/*** Get the current values from the publisher. Use the one with the most characters ***/
select @ServiceNotes = CustomerServiceNotes
from tblCustomerServiceNotes
where rowguid=@rowguid

If LEN(@ServiceNotes) >= LEN(@ServiceNotesConflict)
 Begin
  Select @ServiceNotesUsed = @ServiceNotes
 end
 else
 Begin
  Select @ServiceNotesUsed = @ServiceNotesConflict
 End
/***Update the publisher and Subscriber with the new column values ***/
select CustomerID, @ServiceNotesUsed, rowguid
from tblCustomerServiceNotes
where rowguid=@rowguid

drop table #tempsubscriber



Replication

0
0

Hi,

Is every replication requires Linked Server and Distributor in sql server 2005/2008?

Merge Replication, Delete is working at publisher(if a row is deleted at publisher then its getting updated at subscriber) and not working at subscriber(if a row is deleted at subscriber then its not getting updated at publisher)?

0
0

Hi,

We've merge replication configured in our environment(4 SQL servers 2008R2). As we know merge replication is bidirectional, its working fine in case of inserts i.e, if a row is inserted at publisher it's getting updated at subscriber and vice-versa. The Issue is, if row gets deleted at publisher its getting deleted at subscriber but, if a row gets deleted in any of 3 subscribers its not getting deleted at publisher. I've checked delete_tracking option in sp_helpmergearticle and its set to '1'.

Please help me out. Thank you in advance.

Regards,
Wilshere

Viewing all 4054 articles
Browse latest View live




Latest Images