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

Initialize from a backup from another server?

$
0
0

Greetings. 

  • Server 1 = 2014 OLTP
  • Server 2 = 2016 OLTP/ Publisher
  • Server 3 = 2016 replication subscriber from Server 2.

I want to take a backup from Server 1, restore to both Server 2 AND Server 3, then initialize replication from backup:

exec sp_addsubscription @publication = N'BS', @subscriber = N'myInstance', @destination_db = N'backupSync',  
@sync_type = N'initialize with backup', @subscription_type = N'push',  
@update_mode = N'read only', @backupdevicetype = 'disk',  
@backupdevicename = '\\backupShare\replSnap\bs.SQLB'  
GO 

However, I get the following error:

Msg 18782, Level 16, State 1, Procedure sp_MSextractlastlsnfrombackup, Line 207 [Batch Start Line 0]
Could not locate backup header information for database '[myInstance].[backupSync]' in the specified backup device. Specify a backup device that contains a backup of the Publisher database.


I see why what I'm trying to do I wouldn't wouldn't work (LSN's, etc) , and it make sense. However, I thought I'd see if anyone knows of a way around this?

So I'd need to restore to only Server 2, then back that up and restore to Server 3. I'd like to avoid that if possible.


Thanks in advance! ChrisRDBA


replication inquiry

$
0
0
I have tow win 7 pcs (server -client) i have a fixed ip on the server> can i make a replication between them without using an active directory domain account  or not

Distribution Database -Compatibility mode

$
0
0

hi,

there is one replication setup  @ sql 2016.

while i query distribution property 

USE master
EXEC sp_helpdistributor;
GO

getting error:

Msg 207, Level 16, State 1, Procedure sp_helpdistributor, Line 272 [Batch Start Line 1053]

Invalid column name 'deletebatchsize_xact'.
Msg 207, Level 16, State 1, Procedure sp_helpdistributor, Line 273 [Batch Start Line 1053]
Invalid column name 'deletebatchsize_cmd'.

while check on Distribution Compatibility  is 90, shall i change this Compatibility mode to 130 ? is it affects current Replication Setup?

 

transac replication keeps expiring

$
0
0

Hi,

I keep getting: The subscription(s) have been marked inactive and must be reinitialized. NoSync subscriptions will need to be dropped and recreated.

I've tried setting the retention value to 0 (indefinite) using: exec sp_changepublication @publication = <publication>', @property = 'retention', @value = 0

It is a bi-directional transactional replication, the replication that fails is the one having no traffic at the moment due to how the application currently works.

The funny thing is, I use the same version of servers in test, staging and production and my replication scripts are the same for all 3 environments outside of the server names and passwords. And only the production environment keep getting inactive subscriptions. 

Also, test and staging can see zero traffics for years and they have no issue with the subscription expiring. Only prod which is 100% weighed on one side keeps expiring on the side without traffic.

Searching for the error message only provides way to fix it. And all the trouble shooting on the agent, history, etc... does not really help.

So, question is, any idea? Should I just bump the retention value to the max value instead of 0?

Thanks

SQL HA and DR

$
0
0

Dears,

We have a customer with SQL 2014 and we need to configure SQL Replication between two sites.

Below are our concerns:

  • Can we configure SQL AlwaysOn with SQL 2014 ?
  • If SQL AlwaysOn isn't supported can we configure Failover cluster between the two sites?
  • What are the best practices for this kind of deployment taking into consideration that we are using 2014 standard edition.

Best Regards,

LogReader will not start "The remote server "Servername" does not exist, or has not been designated as a valid Publisher ... "

$
0
0

Replication has been working fine for months.  Publisher, remote distributor and three subscribers.  All of a sudden the distribution database became corrupted and no DBCC fixing or restoring from backups get get it back.  So we installed from fresh.

We had replication working this morning and we were trying to concentrate on why the log wouldn't truncate.  Seems the LSNs that had been recorded as distributed and not distributed would not update, so the truncation was always waiting on replication.  So a few backups and truncates performed manually etc. and we come round to recreating publications.  We've used all the same logins/credentials as before but all of sudden they just stopped working....

 

Date  15/09/2011 17:27:40
Log  Job History (VSAW01-MyDB-1)

Step ID  2
Server  HVAW10
Job Name  VSAW01-MyDB-1
Step Name  Run agent.
Duration  00:00:00
Sql Severity  0
Sql Message ID  0
Operator Emailed  
Operator Net sent  
Operator Paged  
Retries Attempted  0

Message
2011-09-15 16:27:40.450 Copyright (c) 2008 Microsoft Corporation
2011-09-15 16:27:40.450 Microsoft SQL Server Replication Agent: logread
2011-09-15 16:27:40.450
2011-09-15 16:27:40.450 The timestamps prepended to the output lines are expressed in terms of UTC time.
2011-09-15 16:27:40.450 User-specified agent parameter values:
   -Publisher VSAW01
   -PublisherDB MyDB
   -Distributor HVAW10
   -DistributorSecurityMode 1
   -Continuous
   -XJOBID 0x34C25A24E09FFD4CA127D01BF04C22B7
   -XJOBNAME VSAW01-MyDB-1
   -XSTEPID 2
   -XSUBSYSTEM LogReader
   -XSERVER VSAW01
   -XCMDLINE 0
   -XCancelEventHandle 0000000000000184
   -XParentProcessHandle 0000000000000718
2011-09-15 16:27:40.497 Status: 0, code: 20015, text: 'The remote server "VSAW01" does not exist, or has not been designated as a valid Publisher, or you may not have permission to see available Publishers.'.
2011-09-15 16:27:40.497 The remote server "VSAW01" does not exist, or has not been designated as a valid Publisher, or you may not have permission to see available Publishers.

I don't want to fudge anything using sa, admins or sql server agent - why would it just stop working!?!?  Driving me crazy.

How do I remove a publication when the subscribers are already removed at the subscriber server?

$
0
0

When I right click on the replication and choose delete I get:

TITLE: Microsoft SQL Server Management Studio
------------------------------

Are you sure you want to delete publication "TS02-Repl" in database "TS02"?

All subscriptions to this publication will also be deleted except records at Subscriber which have to be deleted at Subscriber.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22&EvtSrc=Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Replication.ReplicationMenuItem&EvtID=DeletePublicationConfirmation&LinkId=20476

------------------------------
BUTTONS:

&Yes
&No
------------------------------

When i click Yes:

TITLE: Microsoft SQL Server Management Studio
------------------------------

Could not delete publication 'TS02-Repl'.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22&EvtSrc=Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Replication.ReplicationMenuItem&EvtID=CantDeletePublication&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

'DPSS2K8SQL1' is not defined as a Subscriber for 'DPSS2K8SQLPROD1'.
Could not update the distribution database subscription table. The subscription status could not be changed.
Changed database context to 'TS02'. (Microsoft SQL Server, Error: 20032)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=20032&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------
What can I do?

I'm using SQL Server Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)   Mar 29 2009 10:11:52   Copyright (c) 1988-2008 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )

Thanks

Replication Monitor Performance Critical, how to get true latency for transactional replication

$
0
0
I am working to upgrade our environment from very old servers running SQL 2000, initially to SQL Server 2008 R2 then up to a supported version. I have moved the distributor to a newer 2008 R2 sql server, the publisher is still SQL 2000, with SQL 2000 and SQL 2008 subscribers. Prior to this move, when I ran replicaiton monitor from the old SQL 2000 distributor, rarely did I see the "performance critical" status for the subscribers. Now most of the time replication monitor indicates 1:00 to 4:00 minutes of latency. When  I run sp_replcounters the latency is rarely over 3 seconds. I have an agent job set up to run frequently and notify me of any undistributed commands on the distributor but the job has yet to find any. I have seen a few posts indicating to ignore this warning from replication monitor...but that is hard to do when it is the main tool for working with your publications/subscriptions. Is this what is being done, just ignore the warning by most? I am looking for other monitoring suggestions outside of what I have noted here. I am thinking of running sp_replcounters ever minute or 2 and putting the results in a table, then checking that to see if it exceeds a threshold. Any comments or suggestions appreciated. I would also appreciate any links to any scripts people suggest for monitoring TR. Thank you

fault code

$
0
0
trying to download yamaha synth programme goes o.k until finish then i get error20051 no  device connected it is, the download is from Yamaha. Any help appreciated Acer laptop  Windows 10 64 bit

Subscription deleted

$
0
0

Hello,

We are supporting one of the legacy system (SQL 2008 R2). Transaction replication was set up by vendor long time back for couple of very big articles. By mistake, someone deleted subscription for that publication. Publication still exist, i just need to add subscription and sync data with publication. I can just add the subscription but it will take longer to sync data. What would be the best possible way to add subscription and keep data in sync with publication? Thanks for help in advance.

Publication contains 2 articles.

Both table contains rows (Publication): 1052052161

Table rows in subscription:1051240671

Can't get code to get to my account

$
0
0
very frustrated.  Spoke to agents 2 times then get disconnected.  codes you send don't work.  I already reset my password that works BUT NO CODES.  Not willing to spend much more time on this.  Please call me again at 719-510-2141. 

Table not synchronized on Subscriber

$
0
0

Hi All,

We have configured transaction replication with pull subscription on SQL 2012 R2 stand , Yesterday we wrere facing the issue that data in one of table was sync with publisher  6 record missed , when we check the replication using replication monitor ,it showing excellant all Jon Log reader and distribution agent running properly , we had not found any error in replication.

Please suggest me what action i have to taken to resolve the issue 

Thanks and Regards

Vijay Tripathi

subscriber Server - servicepack update

$
0
0

hi,

I want to update SQL SP2 on one of my subscription server (which is in Replication Process) .

can you show me the step by step procedure? 

publica + distribu  on one server  (same server

Subsci on another server

Merge Replication - Insert large number of rows

$
0
0

I have a database from which 500.000 rows were unintentionally deleted on one subscriber with the deletions duly replicated to the publisher on  to another subscriber. I found a recent backup, restored it to a temporary database then copied the deleted rows back to the table on the publisher, using an insert results query.

That was successful and I sat back waiting for replication to occur. Merge Replication however seems unable to cope with a 500,000 rows insert. Instead of taking say 5 seconds, each attempt to replicate runs for about 30 minutes then fails with an error"MSSQL_REPL-2147200994". On most occasions less than a 100 rows are inserted.

I assume that Merge Replication simply can't process that many rows that inserted in one transaction. Is there any way to get the replication to complete successfully? Should I have done something different with the inserts, broken them up into smaller transactions for example.

I am beginning to think that the only option left now is to restart replication with a new snapshot from the publisher and re-insert the past few days records from the the active subscriber (having backed it up first).


R Campbell

Identify replicated indexes on the subscriber

$
0
0

One of our reporting database on SQL Server 2016 is replicated and we have added a few indexes on top of already existing indexes for a few replicated tables. Now the problem occurs when the replication breaks, regardless of the reason of the failure, and when it is reinitialized, we lose the indexes which we had created on the subscriber end.

We thought about implementing a solution where we back up subscriber-side indexes daily but I can't find figure out how to tell whether the index is from the distributor or the subscriber.

Is there a way to achieve this?

Thank you


Sohi


Error: 28005, Severity: 16, State: 2...An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impe

$
0
0

I've seen some similar questions, but want to make sure I can get an answer quickly and how to fix.

Thanks,

Paul

spid24s     Error: 28005, Severity: 16, State: 2

spid24s     An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.


Merge replication SQL 2016 publisher & distributor SQL 2008 R2 subscriber

$
0
0

Hi,

I am looking to upgrade my merge replication topology servers and am a little confused by the document https://blogs.msdn.microsoft.com/sql_server_team/upgrading-a-replication-topology-to-sql-server-2016/

It states that:

A Subscriber to a merge publication can be any version less than or equal to the Publisher version.

But further down in the merge replication matrix, it shows that 2016 publisher will support only 2016, 2014 & 2012 subscriber.

Can anyone confirm if a 2016 publisher/distributor <->2008 R2 subscriber is supported?

thanks,

Lesley

sp_addarticle error You cannot specify schema_option 0x4 (script identity as identity rather than the base data type) for article

$
0
0
I am upgrading a server from SQL 2000 to 2008 r2 which is being replicated.  The original replication set up had sql 2000, sql 2008 and sql 2014 and had set up had table a on publisher 1 (sql 2000) replicated to table a subscriber 1 (sql 2008 r2 in 8.0 compat), then subscriber 1 would publish table a to subscriber 2 (sql 2014). This was done due to the version requirements of replication. Now, I am upgrading publisher 1 from sql 2000 to sql 2008 r2 and subscriber 2 will subscribe directly from publisher 1 eliminating subscriber 1. 
I have generated the replication scripts to recreate this and run into the above error 21830 noted above when I run the sp_addarticle for one of the tables. The problem is with the identity columns and the schema options. When I look at the schema options for publisher 1 it is set to 0x00000000000080A3, and when I look at schema options for subscriber 2 where I created the scripts it is set to 0x000000000803509F causing the error. My testing is restricted due to the fact that subscriber 2 (sql 2014) is not on our domain and I have no access to it. Looks like I need @identityrangemanagementoption set to 'none' but that is what is causing the error. 

Can anyone offer a sugguestion here? Thanks

Deferred Update of MSreplication_monitordata

$
0
0

Hello,

for monitoring reason I query daily the system table MSreplication_monitordata like this:

 

 select last_distsync from distribution.dbo.MSreplication_monitordata where publication ='Publ_Prod_TAGDR01'

 

Unfortunately it seems that the whole table is not updated automatically after the subscriber jobs finished run. Though after starting the Replication Monitor of the Management Studio and running again the same query, then it shows the current information of the last run.

 

My environment: SQL Server 2005 Standard Edition on distribution side, where the monitoring runs, and Express Edition at the Subscriber. We implemented Snapshot distribution with push subscription because of Express Edition. The 137 Subscriber Jobs runs every morning in a period of approx. one hour.

 

Any suggestions why the system table doesn't show the current data automatically? Did I traped in a bug?

 

Regards

Peter

Distributor Publisher Consolidation, Multiple Linked Servers to same Subscriber

$
0
0
We are combining the distribution and publicaiton functions to a single server. Originally we had them on separate servers. Under the original scenario the publisher had a linked server to subscriber1 created thru replication, and the publisher had a linked server to subscriber1 one in order for the applicaitons to run stored procedures and functions on the subscriber both the original distributor and publisher had the server named subscriber1.The applications use a specific sql user to access procs and functions from the publisher. Now, when we combine the distributor and publisher, replication creates a linked server named subscriber1 so I can't create the linked server named subscriber1 now. What would be my options here, setting up a 2nd linked server to the same server subscriber1 on the new combined dist/pub since access has to be done via different accounts? Anyone aware of options or issues I will encounter here? Thanks
Viewing all 4054 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>