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

Best Practice for Replicating Schema Changes

$
0
0
Hi,

We manage several merge replication topologies (each topology has a single publisher/distributor with several pull subscriptions, all servers/subscribers are SQL Server 2008 R2).  When we have a need to perform schema changes in support of pending software upgrades we do the following:

a) Have all subscribers synchronize to ensure there are no unsynchronized changes present in the topology at the time of schema update,
b) Make full copy-only backup of distribution and publication databases,
c) Execute snapshot agent,
d) Execute schema change script(s) on publisher (*) when c and d are reversed this has caused issues with changes to view definitions which has resulted in us having to reinitialize subscriptions,
e) Have subscribers synchronize again to receive schema updates.

Each topology has it's own quirks in terms of subscriber availability and consequently the best time to perform such updates.

The above process would seem necessary when making schema changes to remove tables, columns and/or views from the database, but when schema changes are focused on adding and/or updating objects, and/or adding/updating data, is the entire process above necessary?  In this instance, if it's possible to remove the step of coordinating the entire topology to synchronize prior to performing these changes I would like to do that.

The process as we currently perform it works without issue, but I'd like to streamline it if and where possible, while maintaining integrity and avoiding potential for non-convergence.

Any assistance or insight you can provide is greatly appreciated.

Best Regards
Brad

row mismatch alerts are not getting in transactional replication ?

$
0
0

Hi All,

Few days back we have configured a transactional replication between SQL server2008r2 and SQL server2012 servers .

Today i have find the row mismatch on lot of tables .but replication was not triggering  any alerts regarding this and i have checked the Replication monitor ,i didn't find the any errors& alerts.

Can you please clarify the why it's not triggered any alerts ?

Thanks in Advance,


RAM




Replication -> Distribution out of space

$
0
0

There is a replication issue we faced in non prod hours so we could not get much details on that, can someone please suggest me the reason for this.

replication was running fine until some time then a message came as

 Date        10/24/2014 3:04:43 AM  E:\SQL-MDF\distribution.MDF: Operating system error 112(There is not enough space on the disk.) encountered.

after that we faced

Error: 1105, Severity: 17, State: 2.

Could not allocate space for object 'dbo.MSrepl_commands'.'ucMSrepl_commands' in database 'distribution' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

Error: 14151, Severity: 18, State: 1.

Replication-Replication Transaction-Log Reader Subsystem: agent XXX failed. The process could not execute 'sp_MSadd_replcmds' on 'YYY'.

Then the replication failed and subscriber expired.

When check the error logs and eventvwr there was nothing abnormal activity, more strange thing is we did not receive any space alert at that time. we believe space was not an issue.. is there anything I need to check. the drive host distribution database has 117GB free space.

  

Best Regards Moug

SQL PULL Merge Replication over web - totally unreliable?

$
0
0

Hi,

We have problems performing SQL PULL merge replication over the web.  Most of the time it works fine, but periodically we experience issues as described below.  Our application uses SQL Express for subscribers and we have our own C# RMO code for the agent.  We have eliminated our application as the source of the problem by setting up a full SQL Server as a subscriber and using the built in agent.  It experiences the same problems.

1. Unable to download a snapshot.

After reinitializing a subscriber, the snapshot will partially download and will then suddenly stop with the error:

    The connection with the server was terminated abnormally

There is no obvious timeout issue, the error typically occurs as soon as one of the .bcp files is about to be downloaded.  It's often the same .bcp file that has the problem, but not always so there is no consistency.

The only solution is to continually retry until the download eventually succeeds.  Recreating the snapshot before retrying seems to improve the chances of a successful sync.

2. Unable to perform a normal sync (i.e. an update, rather than a full snapshot)

An attempt to perform a sync results in the following information being logged:

    The upload message to be sent to Publisher 'SERVER2' is being generated
    The merge process is using Exchange ID 'F82F1A56-A81A-4786-A469-7A76259F9ED8' for this web synchronization session.
    No data needed to be merged.
    Request message generated, now making it ready for upload.
    Upload request size is 1895 bytes.

At this point the sync simply stops doing anything.  There are no errors, the agent still appears to be running, but nothing else happens.

We typically experience this problem once every few weeks.  Reinitializing a subscriber does not help, the same problem occurs.  The only solution is to recreate the snapshot and then to reinitialize the subscriber.  This then requires the subscriber to perform a full sync which takes around 45 minutes for our dataset.

I am aware through online searches that others have experienced similar issues with SQL replication over web.  Are there any practical solutions to these issues, or is SQL replication over web simply broken?

Problem getting started with RMO conflict resolvers in merge replication: "Could not load file or assembly "

$
0
0

We are in need of help with a problem dealing with RMO conflict resolvers in merge replication. We created a class library in Visual Studio and signed it with a strong name key. The dll was then registered with the distributor/publication using RMO calls.  We registered the dll in the GAC.

 

Imports System.Reflection

<Assembly: AssemblyKeyFile("ConflictResolvers.snk")>

 

PublicClass HardwareDetails

    Inherits BusinessLogicModule

    …

End Class

 

We set the business logic handler and article using the following two calls, we attached the two files:

 

DistributionDatabase. RegisterBusinessLogicHandler

MergeArticle. ArticleResolver

 

After verifying that the dll is registered in the gac, we attempt to run the merge replication job and get the error:

 

010-03-10 13:48:00.322 Error loading custom class "Progeny.NITSS.ConflictResolvers.HardwareDetails" from custom assembly "E:\MSSQL\ConflictResolvers\ConflictResolvers.dll", Error : "Could not load type 'Progeny.NITSS.ConflictResolvers.HardwareDetails' from assembly 'ConflictResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c3fec6b9867b9e16'.".

2010-03-10 13:48:02.916 Category:NULL

Source:  Merge Process

Number:  -2147467259

Message: Error loading custom class "Progeny.NITSS.ConflictResolvers.HardwareDetails" from custom assembly "E:\MSSQL\ConflictResolvers\ConflictResolvers.dll", Error : "Could not load type 'Progeny.NITSS.ConflictResolvers.HardwareDetails' from assembly 'ConflictResolvers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c3fec6b9867b9e16'.".

2010-03-10 13:48:03.009 Category:NULL

Source:  Merge Process

Number:  -2147199414

Message: The Merge Agent encountered an error when executing code in the HandledChangeStates property implemented in the business logic handler 'E:\MSSQL\ConflictResolvers\ConflictResolvers.dll'. Ensure that the overridden HandledChangeStates property has been properly implemented in the business logic handler.

 

We verified that HandledChangeStates has been set.


Thanks,
Paul W

Sql Server 2012 Evaluation - convertion to production

$
0
0

Hi all

We are testing SQL server 2012 and replication with 2 stores. Now that all Works as expected we want to buy the estándar versión but we do not want to reinstall all again.

Can we just install the license without reinstall anything ? If so, the replication will keep on working as has been in the last weeks ?

Thank you for your help

James

SQL Server Latency Tracking

$
0
0

Hi,
I just want to track replication latency for every 10 min in particular table. just want following fields to be track

Pending commands
Date Time
Time for applying commands on replicated Server<o:p></o:p>

Please suggest<o:p></o:p>

Merge replication using Web sync, snapshot timeout error.

$
0
0
I'm setting up merge replication using web sync using SQL Server 2012, Windows server2008R2. When I try to do my initial pull synchronization to get the snapshot the synchronization times out because a couple of my .bcp files are over 1GB but less than 2GB. So I changed my publication to compress the snapshot files. Now I rerun the snapshot agent and it created one snapshot.cab file of 800MB (looks good). So I figure the remote Pc subscription will download the one cab file. But when I run the subscription agent and monitor the status I still see each bcp file being fetched in each request/response. I thought I would see a single request for the cab file. What am I missing? How do I make it download the snapshot.cab file?

Is Sql transactional replication real time

$
0
0

Hi All,

I am having a setup of transactional sql replication where i have a Oracle publisher and SQL server distributor and subscriber.I have a requirement to find the lag in transferring transaction between oracle publisher to distribution database and then to subscriber.

Is there any way by which i can achieve it?. Is the transfer real time or there is some lag in it and how can i find the lag in that case.

Kindly Help me out.

Thanks in advance.

Distributor Error while configuring Replication

$
0
0

Hi Friends,

I am encountering error following error  while configuring replication, I restarted sql server and check all permission please help me . In order to solve the problem thank you. regards,asad

 


asad

Merge replication hostname change

$
0
0

Hi ,

How to change Merge replication hostname ?

is it possible configure replication from sql server to postgresql?

$
0
0

Hello Everyone,

is it possible configure replication from sql server to postgresql?

Publisher : sql server

Subscriber : postgresql

thanks in advance

Where is Custom Resolver Log ?

$
0
0

HI,

I created a program which runs correctly for all update, insert, delete and conflicts events .

I also filled "historyLogLevel" & "historyLogMessage" but I don't find where these messages are stored.

Has anybody an information about this subject?

Can you use SQL 2008 Database Mirroring on database that has Tables without Primary Keys

$
0
0
Can you use SQL 2008 Database Mirroring on database that has Tables without Primary Keys

replication update statement takes long time

$
0
0

Hi Replication experts,

I have a issue and please suggest if my understanding and solution is correct.

We have a transactional replication setup for data warehouse, from today morning replication got huge latency so when I looked into it I saw the "sp_MSupd_< tablename >" was running for very long time and by this time it was running for 9 hours still no data was updated, Latency went very high. What we feel is that the index maintenance was not done in subscriber also it was not replicated too. So due to high fragmentation the update statement could take very long.
As there was no error message or blocks found all we see is the update taking very long. So to avoid this we are planning to remove the index, as this is just data warehouse index maintenance is not required by removing we can gain some space too. Is this a good Idea to implement?

When we ran profiler nothing was found, no error or alert logged.
Please let me know your suggestions

Thanks


Best Regards Moug



Reinitializing subscription

$
0
0

Is there a cheap way to rollback all changes to a subscriber database since the last sync? I don't think reinitializing each time is practical.

I'd like to have unidirectional replication from pub to sub and also allow local changes on the subscriber.  At the next synchronization I'd like to rollback all the local subscriber changes then apply any new updates from the publisher.  

There may only be a few hundred updates at the subscriber per sync but thousands of update getting push from the publisher.  I was hoping to be able to use merge replication and web synchronization..

invalid handle attempting to load message from resource DLL

$
0
0

Hi,

We are trying to Sync local SQL Express 2005 database with SQL Server 2005 database by using C# windows application.

It is working in some machines, some machines it is giving error as "invalid handle attempting to load message from resource dll" even though total setup is same.

Could you please someone help me to solve this asap.

Thanks

SQL Server 2012 Undetected Deadlock ?

$
0
0

Hi All,

SQL ver: SQL 2012 (11.0.3350)

We have enabled Trace flags 1222,1204,3605 globally for deadlock tracing and after enable the trace flags we are unable to find any deadlock  information on SQl server error logs.

in the same time one of application job has recorded the deadlock info with transaction process id and time.

Why Sql server is not finding those data?

Thanks

 


RAM

INSERT INTO...SELECT FROM and Merge Replication

$
0
0

Hi,

We're using SQL Server 2008 R2.  We have a desire to save an end-user a significant amount of time and transfer data already present in tables on a test server (the data is scrubbed and ready for production) to tables on a production server which are included in merge replication.  My question is, are there any concerns with using a distributed query to INSERT INTO (production server tables)...SELECT FROM (test server tables) that would affect merge replication?

Will the data inserted using this method be included in replication or is there something explicit I need to do to make this happen?  I realize we need to ensure there are no key/constraint violations but we have already verified this won't be an issue.

Any insight here is greatly appreciated!

Best Regards

Brad

Update Table using Distributed Query

$
0
0

Hi,

Using SQL Server 2008 R2 on local and remote server.  We are looking to update data in a remote table (a few columns) using data in a local table.  The PK values in the local and remote tables are the same, so we would match on them.  I know how to INSERT INTO, SELECT FROM with regard to distributed queries, but am unsure of how to do it with regard to updates.

Assume the table (both local and remote) DDL is as follows:

CREATE TABLE [dbo].[Items](
	[ItemID] [varchar](50) NOT NULL,
	[DescriptionA] [varchar](100) NULL,
	[DescriptionB] [varchar](100) NULL,
	[DescriptionC] [varchar](100) NULL,
	CONSTRAINT [PK_Items_ItemID] PRIMARY KEY CLUSTERED ([ItemID] ASC)
	WITH
	(
		PAD_INDEX = OFF,
		STATISTICS_NORECOMPUTE = OFF,
		IGNORE_DUP_KEY = OFF,
		ALLOW_ROW_LOCKS = ON,
		ALLOW_PAGE_LOCKS = ON
	)
	ON [PRIMARY]
)
ON [PRIMARY]
GO

And we want to set the value of [remote].[DescriptionA] to the value of [local].[DescriptionA] where [remote].[ItemID] = [local].[ItemID].  What would be the correct syntax to accomplish this?

Thanks!

Viewing all 4054 articles
Browse latest View live




Latest Images