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

merge replication, retrying records

$
0
0

A lot of changes were made on the publisher on a table that really shouldn't be being replicated (but it is, and right now i can't remove it from replication).

So i am seeing the message that the process is retrying a failed operation made to article 'XXX' - reason: the merge process was unable to synchronize the row.

i know the rows that were changed we from a log table we have that doesn't need to be pushed out, so i want it to stop retrying those records.

Any idea how to remove those records from being "retryed"?


darin


DBCC CHECKDB on UNC patch db SQL2014 Error 17204

$
0
0

Running dbcc checkdb on sql 2014 (12.0.2000.8) db on UNC SMB 3.0 Netapp :

SidePageTable::Init() DeviceIoControl() : Operating system error 1(Incorrect function.) encountered.
Error: 17204, Severity: 16, State: 1.
FCB::Open failed: Could not open file \\CIFS\servername_Data\db_name.mdf_MSSQL_DBCC21 for file number 1.  OS error: 1(Incorrect function.).
DBCC CHECKDB (ops) WITH all_errormsgs, no_infomsgs, data_purity executed by domain\user found 0 errors and repaired 0 errors. 
Elapsed time: 0 hours 0 minutes 1 seconds.  

Much like sql 2008 r2 article:

https://blogs.msdn.microsoft.com/psssql/2010/09/22/error-17953-sidepagetableinit-deviceiocontrol-operating-system-error-1incorrect-function-encountered/

Any suggestions? Thanks


Paula


Database Mirroring + Replication

$
0
0

For SQL 2008 R2 we need to configure transactional replication on a mirrored database and configure replication to failover if the database fails over. This appears to be supported:https://msdn.microsoft.com/en-us/library/ms151799(v=sql.105).aspx  and https://www.pythian.com/blog/how-to-configure-transactional-replication-mirroring-failover/  .

My test setup is:

Serv1- Remote distributor

Serv2 - Principal

Serv3 - Mirror

Serv4 - Subscriber

So we

  • Made Serv1 the distributor for both Serv1 and Serv2
  • Created a publication on Serv1
  • Created a subscription on Serv3.
  • Changed the snapshot and log reader agents on Serv1 to use the -PublisherFailoverPartner [Serv2] parameter
  • Restarted Serv1 instance

Replication works fine until we fail over the mirror to serv2.  At that point replication stops when we enter data on serv2.  

  • During this time we see login failures for the log reader agent on serv1. Replication agents appear to be ignoring the -PublisherFailoverPartner parameter.  
  • Failing back to Serv1 restarts replication.

Any ideas why the -PublisherFailoverPartner is being ignored? Troubleshooting tips? We did try changing the default agent profiles - no happiness there either.

thanks

Peter

Change file location and log location for distribution database

$
0
0

hi there:

  We have a snapshot replication running in production and going to deploy a transactional replication to production.  We've discovered that our distribution database currently sits in drives that are too tight for both files and log for distribution database.

We  plan to add more files to distribution database. Will this operation have any impact on the existing snapshot replications? 

Thanks

Hui


--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

Merge replication performance problem after adding a new publication

$
0
0

Hi All,

I have a couple of merge replications, all bidirectional, and it works fine.

Yesterday I created a new publication for two articles (tables are empty at the moment) and a new subscription for the new publication. After a couple of hours I saw that all the merge replications were very slow. The new articles are still empty.

I had the same problem a couple of months ago. When I removed the articles from that new publication and added them to another existing publication, one where regular updates happen, all works fine.

So it seems that I encounter this problem when the articles are not updating regularly (few insert/update).

Does anybody know any solution or fix to this problem?

Setup detail:
Publisher, Distributor and all subscribers are SQL Server 2008 R2

Thanks,
Ganendran

need help on the transactional replication ( NOT trasactional replication with updable subscriptions)

$
0
0

hi folks:

  I've created a transactional replication ( using transactional publication )  on testing environment and happy with the result. Now, we are planning to push to prod env. Here are a few questions :

1. Snapshot agent: we want to schedule to run off peak time , how to do it?

2. Log Reader Agent:  We dont want this agent to run continuously during business hours,  off peak time and run once should be enough to satisfy out needs as we only want to capture committed changed data once per day.

3. Distribution agent: we also want to schedule to run instead of realtime as it's gonna impact prod server

Any help will be appreciated.

 Thanks

Hui 



--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

will transnational replication made changes to the source tables?

$
0
0

hi all:

  Here is the situation: We want to replication a few big tables TabA, B, C from Server 1 to Server 2.  We are thinking about using Transactional Replication but have a few concerns about the schema changes it's gonna make on the articles. 

My questions:

  1. Will transactional replication add new tracking columns to the source Tables TabA,B,C?  We can't tolerate this production schema changes. 

 Thanks

Hui


--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

Replicate table changes after replication is configured

$
0
0

I have SQL Replication 2012 setup and has been running for several months now.  I realize I did not enable the process to replicate any table changes (ex: adding or dropping columns).  The Replicate schema changes is currently set to FALSE.  If I change this value to TRUE, will it start replicating table changes after that time?  Can someone advise before I actually make this change?

Thanks!


TDE key storage

$
0
0

In using TDE we have to restore the encrypted db over to another serve on a frequency. What's the best way to store the key so its safe and readily available to be used by a sql agent restore job on the destination server? I mean.. I don't want to have the passwords and encryption keys in plain text. I can keep the keys on files and what about the passwords? Is there a best practices for security?

Thanks


Paula

On Demand Synchronization - Time Semantics

$
0
0

In our organization, having daily cut-off data is important. We are planning a database for as system that collects data from external systems and will be committing transactions throughout the day.  For our analysts we would like to set up a replicated mirror.  We would like the mirror database to be refreshed once per day at exactly midnight such that all transactions committed before 12:00:00.000 AM midnight are included and all transactions committed on or after 12:00:00.000 AM midnight are excluded.

We expect the amount of data in the database to grow to a point where snapshot replication would end up taking too long to synchronize each night.  So, we are looking at setting up transactional replication with a scheduled (or maybe on demand) push distribution agent that runs once per day at midnight.

My question is about the data cut-off for the distribution.  Let's say that the push distribution agent is started at 12:00 AM midnight and runs for 10 minutes until 12:10 AM.  Meanwhile a transaction commits in the publisher database at 12:05 AM.  Will that transaction be pushed to the subscriber?  In my case I hope not.  But if so, I can program the data collection to pause for the distribution period.  I just need to know which way I need to do it.

Is there some other way to do this, like maybe informing the distribution agent to not go past a certain time or transaction ID?


Dan Jameson
Associate Director of IT/DBA
Children's Oncology Group
www.ChildrensOncologyGroup.org


Transactional Replication - Subscriber Identity Seed?

$
0
0

Hey

Hoping someone can put a bit light on this for me and help me out, I have a single Publisher and single Subscriber set-up on Transactional Replication with continuous updating.

But I want the scenario where, if the Publisher fails then the Subscriber can take over as the main database
Then the Subscriber DB will be restored back and used as the main publisher again once the main server is back up.

The problem I have is the Subscriber database does not retain its identity seed against the Primary Key Columns on any table and it appears to be reset to (1)
Therefore creating new records, creates a Primary Key Conflict.

Is this because of the "NOT FOR REPLICATION" setting,
If I want to let the Subscriber continue the increment the identity ID should this be set to YES or NO

Thank you,
Barry


Identity management in Transaction replication with updatable subscription

$
0
0

I have migrated my publisher DB to new server yesterday. For migration what I did was

  1. removed subscriptions and publication completely
  2. backed up DB on which publication was configured
  3. restored DB to new publisher server
  4. Ran sp_removedbreplication on newly restored DB to give a clean start
  5. recreated publication and subscribers on my respective servers

I was able to setup replication properly and it came in sync normally. But when user tried to insert new records at subscriber I got primary key violation errors for some tables. Primary key is on identity columns for most of my tables and have not for replication true on both publisher and subscriber end. Upon checking the identity check constraint on subscriber I saw that it had old ranges than my current max values. It wasn't getting the new ranges even though it had automatic identity range management set. I had to manually RESEED the identity on subscriber to make it work and had to go through manual process of reseeding it for all tables. My environment is :

Replication type: Transaction replication with updatable subscription with immediate updating

  1. 1 publisher -- SQL server 2008 R2 + SP2
  2. 1 distributor -- SQL server 2008 R2 + SP2
  3. 2 subscribers -- SQL server 2008 R2 + SP2

I have below questions:

  1. What could be the reason for automatic identity management not working?
  2. How to fix this problem permanently? Is there a script available which can check my max values on publisher and subscribers and then RESEED it accordingly?
  3. What is the fastest way to fix this?

Add the NOT FOR REPLICATION Option to Existing Tables

$
0
0

 

Hello,

 

How to add the NOT FOR REPLICATION Option to Existing Tables( IDENTITY column,FOREIGN KEY constraints  )- TSQL.

 

Thanks,

 

Kanna.

 

 

merge rep - dynamic snapshot job name overflow

$
0
0

morning all

Merge rep - it's a bitter sweet experience. Sometimes I really admire it and other times I'm tearing my hair out.  The source of my latest frustration is that I have hit an overflow error when SQL tried to generate the dynamic snapshot job. 

The stored proc involved , sp_MSadddynamicsnapshotjobatdistributor, has a variable defined as nvarchar(100). Had this been sysname, as it arguably should have been, I wouldn't be enduring an angst ridden Monday morning.

It's so tempting to edit the proc, but , of course , I won't.

It galls me
a) that the variable was so slackly defined
b) that there is no prior guidance as to how long-ish db and publication names can lead to this overflow once they are assembled together by the system SP to generate  the job name.

That's the end of my rant but to leave with a question ... has anyone ever editied the Replication SPs to quickly get around an issue and did you live to regret it ?

SQL Replication errors (Snapshot Agent)

$
0
0

Im trying to configure a new replication with sql server 2012 - i configured the distribution - while configure the publication it asked for a user to run the snapshot agent, i set a strong user with the right permission to the snapshot folder

Im getting the following error:

"A required privilege is not held by the client. The step failed. – SQL Job Fails with error"

I tried to change the sql agent account to local system and the snahpshot worked.

For security reasons i need to run the SQL agent with a specific windows account.

So i changed back to the windows service account and getting the error:

The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Di

How can i resolve this issue?

Thanks !



Merge Agent Reporting "The Directory Name is invalid"

$
0
0

Our replication Agent is failing stating the "The Directory Name is Invalid"  Any Ideas what directory it is talking about.  I confirmed the snapshot directory is accessible and setup correctly in the publication.  This agent has been working fine previously until this weekend.  Not sure what its looking for.

Added Verbose Logging to the run step but it doesn't look like its even making it that far.

 

James A. Brown

Cannot drop the table ... because it is being used for replication. (Microsoft SQL Server, Error: 3724)

$
0
0

 

Hi, it is little different to other problemas with the same title.

 

(SQL2005)

My problem is that i romoved Replication in the server, but the tables who used to be part of one article, cant be droped or changed. It server was used like source (distribuitor not suscriber and there is other like coordinator)... i search (SSMS) "visually" and I found nothing about replication... my questions is about, what system tables should i look, maybe it wasn't clean with the remove replication and i have to do by my self.

 

I found this in web from Microsoft http://support.microsoft.com/kb/326352 but it doesn't work... any other advise?

 

Thanks

Delayed query on Always On on SQL Server Entrerprise 2012

$
0
0

Hello

I have SQL Server 2012 Enterprise SP3 as the Principal Server of an Always On Schema on four databases replicating to a unique secondary Server, with Asynchronous-commit mode, forced manual failover and the Secondary Replica configured with Yes option to allow all connections to the secondary databases. The problem is that executing a big query on the primary server, it takes five minutes but when the same query is executed on the secondary server, it takes twenty minutes. The hardware of both servers are the same as well the resources and the conditions for the tests in both SQL Server instances. I have executed the query in the second server with all the useless services down, just in case, and with the same time result for the query running alone, without any other jobs or querys at the same time. Is there a known issue for this situation on the secondary server with an Always On Schema? Any suggestion to fix the problem? Thanks in advance.

SQL Server Transactional Replication and WF

$
0
0

Hi All, 

I am writing a WF based application with out-of-the-box SQL persistence and Tracking services running, the MS SQL database version is 2014.

I've been told that the DR version of the application will be held on another box, and they will be using  SQL Server Transactional Replication to manage this. I've been led to believe that in order for this replication to run, the tables that are to be replicated must have "primary keys" defined. Looking at the tables generated by the Persistence and Tracking Service SQL creation scripts, it doesn't appear that all the tables that are used have PKs defined (they have unique keys, but they are not set as "Primary Keys") - the [InstanceState] table for example.

Is there any work arounf for this?

Replication Error: Conversion failed when converting from a character string to uniqueidentifier

$
0
0

We received the following replication error on our production system.  This is transactional replication. 

Command attempted:

if @@trancount > 0 rollback tran
(Transaction sequence number: 0x000F039C0000F6FC001600000000, Command ID: 1)

Error messages:

  •          Conversion failed when converting from a character string to uniqueidentifier. (Source: MSSQLServer, Error number: 8169)

In order to quickly resolve the issue we re-initialized the snapshot at the publisher followed by re-initializing the subscription on the far end.  Which was successful.  Please advise as to the possible root cause.

 
Viewing all 4054 articles
Browse latest View live




Latest Images