Articles on this Page
- 03/26/15--03:45: _SQL Server Database...
- 03/26/15--06:59: _Transactional Repli...
- 03/26/15--08:55: _SQL Server is unabl...
- 03/26/15--09:31: _Merge replication c...
- 03/26/15--09:18: _Launching Replicati...
- 03/26/15--11:13: _Merge Replication f...
- 03/27/15--12:01: _Grant create index ...
- 03/27/15--13:24: _Same articles, with...
- 03/30/15--12:12: _Issue with CDC and ...
- 03/31/15--01:33: _Replication monitor...
- 03/30/15--13:48: _Publisher to Distri...
- 08/15/13--19:23: _Transactional Repli...
- 03/31/15--04:02: _How to restore a re...
- 03/30/15--10:43: _SQL not caching on ...
- 02/25/15--06:43: _Dropping of replica...
- 04/01/15--03:26: _Getting General net...
- 03/16/15--01:41: _SQL SERVER 2012 Mir...
- 04/01/15--08:34: _Issue with Replicat...
- 04/01/15--11:20: _renaming publicatio...
- 03/09/12--00:15: _Could not load file...
- 03/26/15--03:45: SQL Server Database backup and restore issue
- 03/26/15--06:59: Transactional Replication sp_MSupd RUNNABLE and never ends
- 03/26/15--08:55: SQL Server is unable to connect to the server-Replication
- 03/26/15--09:31: Merge replication conflicts on load balanced servers
- 03/26/15--09:18: Launching Replication Monitor problem
- 03/26/15--11:13: Merge Replication from SQL2014 publisher to SQL2008R2 subscriber
- 03/27/15--12:01: Grant create index question
- 03/27/15--13:24: Same articles, with two kinds of replications ?.
- 03/30/15--12:12: Issue with CDC and Replication enabled
- 03/31/15--01:33: Replication monitor on publisher showing deleted publishers.
- 03/30/15--13:48: Publisher to Distributor Latency Madness 1h30m+
- SQL Server 2008 R2
- 400Gb Database running in SQL 2000 compatability mode
- 08/15/13--19:23: Transactional Replication - Slow running sp_MSget_repl_commands
- 03/31/15--04:02: How to restore a replicated (publisher) database
- SQL 2008R2
- Create database AAA in full recovery mode
- Backup AAA and restore as AAA_Replicated
- Import single table of data
- Create transactional publication on this table, no filtering.
- Create AAA_Replicated as a subscriber
- Update AAA and check the replication is working.
- Stop the log reader agent
- Disable any replication related agent jobs.
- Put the database AAA into single user mode
- Restore AAA from the backup used to create AAA_Replicated using KEEP_REPLICATION
- 03/30/15--10:43: SQL not caching on failed over node
- 02/25/15--06:43: Dropping of replication failing during database deployment
- 04/01/15--03:26: Getting General network error...
- 03/16/15--01:41: SQL SERVER 2012 Mirror Issue
- 04/01/15--08:34: Issue with Replication Latency with computed columns
- 04/01/15--11:20: renaming publication articles in transactional replication
I am trying to take a backup of the database and using restore to create its copy on the same server
Basically I am following this approach
Using the restore command is giving me the following error
Logical file "ORIGINALDB" is not part of database "TARGETDB" . Use RESTOREFILELIST only to list
plz suggest as I checked the syntax is fine too as per
I am using SQL Server 2012
I came across not understandable problem connecting transactional pull replication. Once or twice a month I have a problem that stored procedure on subscription server (sp_MSupd) cannot be finished. It is not blocked by any other session and does not have any wait type. It simply hangs and remains in task status RUNNABLE. The only one way to recover the replication is initilizing it from backup or snapshot. Do you have any suggestions. Have you faced similiar problem?
Today I found one strange issue, when I tried to add new publisher Database in Transactional Replication I found the following error message.
Does anyone knows how to resolve this?
Also I checked the server name , when the time of Initial configuration I given the same server name not the IP. No clue why I got this issue, could you guys please explain to resolve this.
We have 2 web and 2 load balancing SQL servers. We use merge replication for users sessions to keep couple tables on both SQL servers up to date. The problem is that we experience merge replication conflicts all the time. We thought it is related to slow performance of system tables. We tried to reduce tables by configuring retention period to 1 day. Now table has these counts:
MSmerge_contents ---- 300 000
MSmerge_tombstone ---- 100 000
MSmerge_genhistory ---- 100 000
But this does not helped and we still have conflicts in some table and we are not sure why this happens.
Any ideas how to troubleshoot this?
while launching replication monitor, i can't able to see other server replication details. only my local server publication details can able to see.Kindly find below for ref. what shall i do for seeing other server publication details?
Regards, Muthukumar Balu
My company replaced an aging SQL2008R2 server with a new SQL2014 server. The server, both in its old and new forms, acted as both distributor and publisher in the replication of about 40 merge publications, 100-150 articles per publication. The publications are scheduled to synchronize nightly to a subscriber SQL2008R2 server (on our LAN) and their start times are staggered to reduce server load. All subscriptions are pull subscriptions.
We recently did an update that affected every record of one of the highest row count articles in each publication. In some publications this approaches hundreds of millions of rows. Typically this article synchronizes changes at a speed of about 4000 rows per second. When attempting to synchronize these large changes from our new server the speed of dropped as low as 25 rows per second, even when we ensured that only one synchronization was running at a time and there was low activity on the publisher and no other processing on the subscriber.
Because we still have the old 2008R2 server on our network we have been able to test replicating large changes from that server as well, but we do not see the same issue. We have been able to verify that the 2014 server's publication and article settings exactly match those of the 2008R2 server it replaced. We have also checked to ensure that the Agent Profile settings for each replication agent are the same between old and new servers.
While we recognize that such a high update volume is not an ideal scenario for merge replication, we do not see the same behavior when replicating from 2008R2 to 2008R2 machines, only when replicating from 2014 to 2008R2. Therefore we are wondering if this issue should be reported as a bug? If that is the case, how would one go about doing that?
How do I grant "create index" on any table to a user.
Is it "grant create index to <USER1>
Hi there, i want to know if it is possible publish the samearticle, with twoo distinct kinds of publication.
We have this strange issue with CDC and replication. Let me explain
1. We have a database on write server and we replicate some tables to the read server. There are 15 tables that we replication and 8 of them have computed columns that are persisted.
2. We also have CDC enabled on the same database where we have transactional replication enabled. I know that both CDC and replication uses replication log reader. Some how, all the time we see the log_reuse_wait says replication
3. If I add around 100-200 MB into these tables, with these persisted columns, it will be around 500 MB of data. But the replication is queuing up 10-15 GB of data.
4. I checked CDC tables, and the updates are in cdc tables. Also, I don't see CDC capture job. Is this because there is already replication enabled?
What might be the issue that's causing the log to hold for a very long extended periods of time? We don't see any issue with log reader and CDC.
Had some issues with replication on a SQL2008R2 box so I decided to delete any publishers and their associated subscribers. What I now find puzzling is that the replication monitor shows a publisher that does not exist. I've attached a screenshot but had to blur the instance and publisher names.
If I have removed all replication objects should this monitor box not just be blank?
I am pulling my hair out somewhat with replication. We have been using it for years without making too many changes to it. Four publications with between three and four subscribers to each publication. Latency has been around 2 seconds to 5 minutes as the years have passed. Every six months or so we probably recreate the publications and subscriptions.
This last week the log reader has been having issues. The latency issues are between the publisher and the distributor where latency is up currently at 1h46m, between the distributor and the subscriber latency is a few seconds.
Where do I go to troubleshoot this? So much of it is "under the hood". I do not know what stats to look at, let alone where or how to collect them.
We did make some changes that resulted in one of the publications breaking. We added a varchar(max) field to our database but did not set the option to "Convert MAX datatypes to NTEXT" which seems to be the requirement. (With this version of the database varchar(max) is stored as text and this option has to be set to replicate such fields around.)
We couldn't get replication to get going again so had to shut down the website (has about 9,000 visitors at any one time), to recreate the publications and subscriptions. This took about an hour and eventually the latency returned to normal.
Upon checking this morning though it was back up at 1 hour. After reading we removed an article that was replicating a lot of records with text fields and again latency seemed to return to normal. We looked at other ways of replicating this information but in the meantime the latency crept back up again to where we are now. Using tracer tokens also confirms the latency and where it is between.
I have spent days trying to figure this out whilst balancing the need for the Site to be available to the membership. Trying to do any publication creation or snapshot building pretty much fails if we allow the users to be on the Site. Timeouts, deadlocks ... that kind of thing.
We are performing transaction log backups every 30 minutes. This causes truncation delays as the reader is struggling to read all of the commands/transactions it needs.
CPU usage on the distributor is very low, single %s. Plenty of disk space.
How can I find out which updates/commands are generating so much activity that the log reader cannot keep up?
Many thanks in advance.
We are running transaction replication, with a publisher and a single subscriber located in different data centres. The distribution database is located with the subsciber.
We get high replication latency regularly, and during those times I have identified the bottleneck as the execution of sp_MSget_repl_commands by the distribution reader. Monitoring this thread in the DMV dm_exec_requests, it is consistently getting long waits for wait_type ASYNC_NETWORK_IO.
Why would distribution reader by waiting on network? The thread and distribution database are all located on the same server. Is there something else that the distribution reader thread does that requires accessing the publisher?
Been having issues with this for a while so I thought to test the whole procedure in a sandpit project. Below are the steps I've taken, however the problem I have is that after a restore my publication has disappeared and therefore there is no replication between the two databases.
Is it not common practice to have a published database that gets restored and you wish replication to continue?
There are now no publications, should there be?
A separate issue. From a previous post I was under the impression that I needed to execute a sp_repldone command, this does not work as it says the database is not published - fits in with their being no publications in the \Replication folder of SSMS.
USE aaa EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time= 0, @reset = 1
Any ideas anyone?
Running SQL 2008 SP4 Cluster , but when I'm on second node the queries are extremely slow and noticed that the SQL is not caching properly the data after the first warmup run. any thoughts and suggestions? have you had this problem before?
I created a drop replication script which works when you run it manually on SQL Server.
When my colleagues are doing a database deployment the dropping of replication fails.
it gives error SQL72035 the full error is as follows
C:\Windows\system32>"C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\Sql Package.exe" /a:script /SourceFile:"D:\DBFiles\**********.dacpac" /Profile:"D:\DBFiles\*******\SysTest.Update.publish.xml" /op:"D:\SQLScripts\update_tracke r.sql" Generating publish script for database '********' on server 'TESTDTASQL01.FOXTEST .PROG'. *** The object [********] exists in the target, but it will not be dropped even t hough you selected the 'Generate drop statements for objects that are in the tar get database but that are not in the source' check box. *** The object [Tracker_log] exists in the target, but it will not be dropped ev en though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box. *** Verification of the deployment plan failed. Warning SQL72012: The object [*******] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box. Warning SQL72012: The object [******_log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects t hat are in the target database but that are not in the source' check box. Error SQL72035: [dbo].[EventHandlerWorkflows] is replicated and cannot be modifi ed. Error SQL72035: [dbo].[Teams] is replicated and cannot be modified.
From searching it is due to the DACPAC which can't handle replication - the error message above does seem to look at a DACPAC
Can anyone explain if that seems to be correct?
last few i was getting general network error....
In our environment configure replication between 3 servers
1 server configuration: 32 GB RAM, 8 core processors, 1 GB NIC card (2 NIC card), Publishers for 32 databases
2 server configuration: 16 GB RAM, 8 core processors, 1 GB NIC card (2 NIC card), Publishers for 3 databases
3 server configuration: 16 GB RAM, 8 core processors, 1 GB NIC card (2 NIC card), distributor and subscriber, pull subscription for 35 databases.
now we getting error from last 3 months when i'm stop sql server services / shut down server everything working fine... DBA team and network team finding the solution but still not getting anything.
What is the problem exactly. Is problem related to server configuration ?
If anyone find the solution related to my problem please suggest me...
We have transactional replication enabled and there are 15 tables that are replicated. Out of 15 there are 6 tables where we have computed columns that are persisted. When ever there are several writes, if the actual transaction size is 100 MB on the publisher, the log reader agent is queuing up almost 30-40 GB of data and the latency is significantly increasing and the transaction log is getting held up by REPLICATION in log_reuse_wait.
An example schema for a table is
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[address]( [address_id] [int] IDENTITY(1,1) NOT NULL, [crm_entity_id] [int] NOT NULL, [address_title] [varchar](600) NOT NULL, [address1] [varchar](300) NULL, [address2] [varchar](300) NULL, [address3] [varchar](300) NULL, [city] [varchar](300) NULL, [state_name] [varchar](15) NULL, [state_non_roman] [varchar](300) NULL, [postal_code] [varchar](60) NULL, [district] [varchar](15) NULL, [country] [varchar](15) NULL, [country_non_roman] [varchar](150) NULL, [non_roman] [char](1) NOT NULL, [is_primary] [char](1) NOT NULL, [parent_address_id] [int] NULL, [vat_supply_to] [char](1) NOT NULL, [created_by] [char](8) NOT NULL, [created_time] [datetime] NOT NULL, [modified_by] [char](8) NOT NULL, [modified_time] [datetime] NOT NULL, [address_title_uni] AS (case when [address_title] IS NULL then NULL else CONVERT([nvarchar](200),[dbo].[udfVarBinaryToUTF16](CONVERT([varbinary](600),[address_title],0)),0) end) PERSISTED, [address1_uni] AS (case when [address1] IS NULL then NULL else CONVERT([nvarchar](100),[dbo].[udfVarBinaryToUTF16](CONVERT([varbinary](300),[address1],0)),0) end) PERSISTED, [address2_uni] AS (case when [address2] IS NULL then NULL else CONVERT([nvarchar](100),[dbo].[udfVarBinaryToUTF16](CONVERT([varbinary](300),[address2],0)),0) end) PERSISTED, [address3_uni] AS (case when [address3] IS NULL then NULL else CONVERT([nvarchar](100),[dbo].[udfVarBinaryToUTF16](CONVERT([varbinary](300),[address3],0)),0) end) PERSISTED, [city_uni] AS (case when [city] IS NULL then NULL else CONVERT([nvarchar](100),[dbo].[udfVarBinaryToUTF16](CONVERT([varbinary](300),[city],0)),0) end) PERSISTED, [state_non_roman_uni] AS (case when [state_non_roman] IS NULL then NULL else CONVERT([nvarchar](100),[dbo].[udfVarBinaryToUTF16](CONVERT([varbinary](300),[state_non_roman],0)),0) end) PERSISTED, [postal_code_uni] AS (case when [postal_code] IS NULL then NULL else CONVERT([nvarchar](20),[dbo].[udfVarBinaryToUTF16](CONVERT([varbinary](60),[postal_code],0)),0) end) PERSISTED, [country_non_roman_uni] AS (case when [country_non_roman] IS NULL then NULL else CONVERT([nvarchar](50),[dbo].[udfVarBinaryToUTF16](CONVERT([varbinary](150),[country_non_roman],0)),0) end) PERSISTED, CONSTRAINT [pk_address] PRIMARY KEY CLUSTERED ( [address_id] 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 SET ANSI_PADDING OFF GO ALTER TABLE [dbo].[address] WITH CHECK ADD CONSTRAINT [fk_address] FOREIGN KEY([crm_entity_id]) REFERENCES [dbo].[crm_entity] ([crm_entity_id]) GO ALTER TABLE [dbo].[address] CHECK CONSTRAINT [fk_address] GO ALTER TABLE [dbo].[address] WITH CHECK ADD CONSTRAINT [fk_address2] FOREIGN KEY([parent_address_id]) REFERENCES [dbo].[address] ([address_id]) GO ALTER TABLE [dbo].[address] CHECK CONSTRAINT [fk_address2] GO
I am using SQL 2012 SE and implementing transactional replication. I need to insert the rows from publisher database tables to new tables, drop the old tables and rename the new tables with the old table names.
Publisher database tables that are being replicated:
and I am going to create new tables in publisher database
Move data from
Drop constraints from and then tables (does this require articles to be removed from replication?)
Table1_new to Table1
Table2_new to Table2
Table3_new to Table3
Does this require replication to set up from scratch or add the three articles only to replication? Is there a way this can be done without pausing or reinitializing replication or without removing articles and adding them back?
I have an application built in VB.NET 2010 that is connecting to MSSQL Server 2008 R2 Express. I'm trying to do the replication between the Express sever and Standard server. It works fine on the developer machine (Windows 7) and on the Terminal Server 2003 R2 machine.
However, there is one machine, running Windows 7 that gets this error when I run the sync function.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Replication.dll' or one of its dependencies. The specified module could not be found.
File name: 'Microsoft.SqlServer.Replication.dll'
The file 'Microsoft.SqlServer.Replication.dll' is located in the same folder where the executable file is. I've searched everywhere and cannot find a reason why this is happening...
I tried installing Microsoft SQL Server 2008 Replication Management Objects x86 and x64, but that didn't help.