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

distribution cleanup jobs cannot work

0
0

hi ,

i have one question about replication. it is sql server 2008 R2+sp3.

we have built a huge replication architecture, i found the size of one instance's distribution database grown to 70 GB.

it shows that the distribution clean up job doesnot work properly, and the job runs normally, but removes 0 records all the time.

it should have some orphaned data in msrepl_commands or msrepl_transactions.

my question is:

how can I find out the orphaned records, and then I can remove them,at last the distribution cleanup job can run normally.

and another question is : ;how did the issue come out?

thanks

 btw, the immediate_sync and allow_anonymous are both 0

I need to replicate between tables with different structure SQL 2008

0
0

I have a single table with the same number of columns with all the same column names that I need to replicated. I have a column that is a INT data type that needs to be changed to a BIGINT data type.  The column is a identity column that is reaching upper limits and part of the PK.  The table has 250 million records and very little downtime.  I was thinking of replicating the table to reduce the needed downtime to change the data type.

Help.

Concurrency Issue

0
0

Hi,

I have a system running transnational pull subscription. At some point the system is supposed to stop subscription job, and then start using the local replicated database tables. Procedure sp_stop_job succeeds, but my code then occasionally generates concurrency errors as if publisher on the other machine is still updating local database. Any clues why this is happening and what to do about it?

Any thoughts would be appreciated.

Thanks.

Peter


PMBT

Migrate SQL 2005 Merge Replication to SQL 2016 without Intialization

0
0

I will restore all the necessary  SQL 2005 database to a new SQL server 2016 from backups, both publisher and subscribers. Server name and instance will be the same. Windows server 2003 will be updated to Windows 2012 R2.  I am planing to regenerate snapshot at the new server. Most subscribers are wireless sync using https . My question is will it be possible to operate the new replication without re-initializing/initializing the replications?

P.S. Will reinitializing re-assign the new ID range to subscribers? The ID ranges are automatically assigned by the replication.

Thanks,

John

SQL Server software on RHEL Cluster

0
0

Dear Team,

we are implementing one Data Base server. so, i have clarification on this pls clarify how it is possible to implement.

we have one RHEL Cluster. it is Active-Passive mode,Active mode- has Linux OS with HP NMS Application and Passive mode has Linux OS with HP NMS Application.

so, we want to do dual boot on this RHEL Cluster(Active-Passive) existing linux OS( with HP NMS Application) and Windows Os(With SQL DB Application) for both active side server and Passive side server.

so, we want to purchase MS SQL Enterprice 2016 version for this.

Could you please suggest me, is it possible to interconnect Linux Os with HP NMS application to windows OS with MS SQL DB Application in RHEL Cluster? or any other Like Cluster agent require for this implementation?. Could you pls suggest me in this implementation.

Thanks&Regards

Umma Reddy

Replication doesn't work after installed SQL 2012 SP3 to SQL 2005

0
0

Hi Sir/Madam,

I installed SQL 2012 SP3(Enterprise Edition,Microsoft SQL Server 2012 (SP3) (KB3072779) - 11.0.6020.0 (X64) ) in a prodcution database server, in which we are using transactional replications to

1). SQL 2012 database server , it works fine;

2). SQL 2005 database server(Standard Edition, Microsoft SQL Server 2005 - 9.00.4340.00 (X64) ), it doesn't work;

The error message is,

Message: declare @event_type SMALLINT = 0, @distributor_major_version SMALLINT = 11, @distributor_minor_version SMALLINT = 0, @distributor_build_number SMALLINT = 6020 if object_id(N'sys.sp_repl_generate_subscriber_event') is not null
exec sys.sp_repl_generate_subscriber_event @event_state = @event_type, @distributor_major_version = @distributor_major_version, @distributor_minor_version = @distributor_minor_version, @distributor_build_number = @distributor_build_number
2016-01-22 19:22:02.180 Category:NULL
Source:  Microsoft SQL Server Native Client 11.0
Number:  139
Message: Cannot assign a default value to a local variable.
2016-01-22 19:22:02.180 Category:NULL
Source:  Microsoft SQL Server Native Client 11.0
Number:  137
Message: Must declare the scalar variable "@event_type".

I couldn't found any solution to fix it.

Please advise,

Thanks,

sql an error was raised during trigger execution sp_MSsetartprocs

0
0

the snapshot is failing to create. how do I get it to complete? sql 2008. I have deleted and recreated the replication but it did not help

Error messages:
Message: An error was raised during trigger execution. The batch has been aborted and the user transaction, if any, has been rolled back. 
Command Text: sp_MSsetartprocs
Parameters: @publication = broadcasts2
@article = schedule_lto_backup

Stack:    at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)
   at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteNonQuery(SqlCommand command, Int32 queryTimeout)
   at Microsoft.SqlServer.Replication.AgentCore.ExecuteDiscardResults(CommandSetupDelegate commandSetupDelegate, Int32 queryTimeout)
   at Microsoft.SqlServer.Replication.Snapshot.CreateArticleProceduresWorkItem.MakeArticleProceduresTransaction(SqlConnection connection)
   at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen)
   at Microsoft.SqlServer.Replication.Snapshot.CreateArticleProceduresWorkItem.CreateArticleProcedures(SqlConnection connection)
   at Microsoft.SqlServer.Replication.WorkerThread.NonExceptionBasedAgentThreadProc()
   at Microsoft.SqlServer.Replication.AgentCore.BaseAgentThread.AgentThreadProcWrapper() (Source: MSSQLServer, Error number: 3616)
Get help: http://help/3616
Server TV-SQL1, Level 16, State 2, Procedure MSmerge_ins_sp_4C30C61EEECA40ED9403C5EC19B94537, Line 114
An error was raised during trigger execution. The batch has been aborted and the user transaction, if any, has been rolled back. (Source: MSSQLServer, Error number: 3616)
Get help: http://help/3616


???


Replication with Availability group issue

0
0

Hello,

Need some help troubleshooting an issue with replication.  This is my environment.   Server1, Server2 and Server3 all have SQL Server Ent 2014 installed.  Server 1 and 2 are in a cluster with AG called "MyAG".  Server3 is configured as a remote distributor standalone SQL Server.  MyAG has two databases, called PubDB and SubDB.  As you can guess, PubDB is the publishing database and SubDB is the subscriber database.  The Initial Publishing/Subscribing Server is Server1, using Server3 as the remote distributor.  All said and done, the replication works even if a failover occurs to Server2.  However, if I shut down server1 or stop the SQL Server services on Server1, the replication doesn't seem to work anymore.  Is there a reason that replication requires Server1 be up, even though the AG " MyAG" is on Server2?

Thanks,

Peter


HOW TO LOAD FILES WITH BCP EXTENTION INTO SQL SERVER TABLE

0
0

Hi All,

I am getting the files with .bcp extention. Please find the example below. How i need to load this bcp extention files into sql server table?

EX: Test.bcp

Please suggest.

Regards,

Shiva Reddy

Merge replication subscriptions are repeating the same actions endlessly

0
0

We have a merge publication set up on SQL Server 2008R2, with several subscribers. Synchronisation is done through the internet.

Over the last few days, some subscribers are unable to synchronise.

In case it's relevant: This seems to have begun on a day where the disk containing the database's log files had filled up completely, and as a result no subscribers could sync.
I resolved that by shrinking the log file for this database, and of other databases on the same server.

  • There is no error message; synchronisation can go on for several hours (usually it takes up to 30 minutes; an hour in rare cases) until it times out, runs into a connection issue or has its process killed.
  • Reinitialising a subscriber (or initialising a new one), either with the existing snapshot or a new one produces the same result.
  • Other subscribers seem to work as normal. There is no difference between those that work and those that don't that I've been able to pinpoint so far.

The replication monitor on the publisher side simply shows the same few messages repeating endlessly:

  • Retrieving subscription information.
  • Enumerating changes in filtered articles using Subscriber's assigned partition ID.
  • Downloading data changes to the Subscriber
  • Merge completed with no data changes processed.*

*There might be some changes processed, depending on subscriber, but the numbers don't seem to go up.

Messages generated at the subscriber are also repeating:

  • The upload message to be sent to Publisher 'PUBLISHER' is being generated
  • The merge process is using Exchange ID '2EE5080F-2F28-4EA6-A0FA-7DA11F97B945' for this web synchronization session.
  • Uploading data changes to the Publisher
  • No data needed to be merged.
  • Request message generated, now making it ready for upload.
  • Upload request size is 7026 bytes.
  • Uploaded a total of 1 chunks.
  • The request message was sent to 'https://WEB_SYNC_SERVER/replisapi.dll'
  • Downloaded a total of 7 chunks.
  • The response message was received from 'https://WEB_SYNC_SERVER/replisapi.dll' and is being processed.
  • The changes contained in the message downloaded from Publisher 'PUBLISHER' will be applied after having collected and displayed the upload statistics.
  • Downloading data changes to the Subscriber
  • Web synchronization progress: 97% complete.

I upped the log verbosity, and the sync log on the subscriber also shows repeating parts. This is quite big, so I put it in pastebin: http://pastebin.com/GV2N0Lys
(This shows only one instance of the repeating part)

I've been trying to find similar reports for a day and I'm unable to find anything relevant.

Is there anything I'm missing?


Error message when we are runnning the Snapshot Agent for a transactional replication that uses an Oracle 12c publisher in SQL Server 2008 R2: "Msg 21613, Level 16, State 1, Procedure sp_IHsyncmetadata, Line 223"

0
0

Hi All,

I am getting an Error message when we are running the Snapshot Agent for a transactional replication that uses an Oracle 12c publisher in SQL Server 2008 R2: "Msg 21613, Level 16, State 1, Procedure sp_IHsyncmetadata, Line 223"

Got a solution from below link from microsoft to install cumulative update package 3 for Sql server 2008.

https://support.microsoft.com/en-us/kb/960574

but the solution was for 11g and currently we are having 11g publisher and we are not facing any issue but we got this error on 12c publisher and also while installing the Cumulative update package 3 its giving error as "There are no SQL Server instances or shared features that can be updated on this computer.

Seems like our environment already has the fix but still we are getting this error.Below is the version details of our server

10.50.2500.0    SP1    Enterprise Edition (64-bit)

Thanks in advance.

Slow snapshot transfer, even with compressed FTP file

0
0
I have a transactional pull replication running.

The publisher and the distributor are both SQL server 2012. The subscriber is a SQL express 2012.

I have setup the server to get the initial snapshot from a compressed FTP file. The data transfered is already filtered to the minimum required. Those parts work fine.

Where it seems to have a problem is when the subscriber tries to apply the snapshot. On a high bandwidth network, the snapshot is applied in less then one minute. On a low bandwidth network, the snapshot can take up to 20 minutes to apply.

On the 20 minutes, downloading the FTP snapshot from the low bandwidth subscriber takes 2 minutes.After this, applying the decompressed local files is taking the other 18 minutes.

The ftp snapshots are not supposed to be run locally ?

Why applying local file on the local server takes 18 minutes on a low bandwidth network subscriber and only takes few seconds on high bandwidth network subcriber ?

Thanks !

Merge replication changing rowguid

0
0

Hi,

Does anyone have ever seen this problem? 

On Merge replication, it happens a lot. We insert the row at subscriber, and somehow it shows at publisher with exactly the same values and pks, but with different rowguid. The gen_status is always 1, saying that the row is created there, but it isnt.

We search all over web and didnt find out what the problem is.

Somebody can help us?

Thank you.

Cannot insert duplicate key row in object

0
0

The following quote is the exact error message that I get when I attempt to create a pull subscription.  The STAppointment is one of a 15 databases that need to replicate inorder for the application SalonTouch to run properly.

What is causing this error?  Is it user rights? Is it a problem with sql2005?  Am I missing a step?  Is there a problem with the database I am working with?  What else?

TITLE: New Subscription Wizard
------------------------------

SQL Server could not create a subscription for Subscriber 'D6LHWQ91\PORTSUN9'.

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

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

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

Cannot insert duplicate key row in object 'dbo.MSmerge_replinfo' with unique index 'uc1MSmerge_replinfo'.
The subscription could not be created.
The subscription properties table 'MSsubscription_properties' does not exist in the current database.
Changed database context to 'STAppointment'.
The statement has been terminated. (Microsoft SQL Server, Error: 2601)

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

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

OK
------------------------------

Modify tables and columns on a replicated database

0
0

Hi,

Is it possible to "pause" a replication and change/add/remove tables/columns?

We have a database that is replicated and sometimes we need to change columns and tables but we can't do this when the database is replicated. The only solution I've found so far is to remove the replication, do the updates and configure the replication again.

This "breaks" the software when the end-user (of the software) updates the software by them selves (which they are supposed to do) and can't update the database and we have to manually remove the replication, update the database and add the replication again and Then let the user login again.

Is there no other way of doing this than removing the replication?

The reason is that there is a web application that the end-users customers can logon and we need to use "live" data but don't connect to the "hot" database.

We thought we could solve this with replication so the web application connects to the replicated database and the software still use the "hot" database.


After Submit winner , Data conflicts fixed by submit winner is come back.

0
0

Hi friends.

I have some a problem from  SQL2014 Server STD Edition , I config to Merger replicate two server  and after merge agent finished i see a Conflicts data  and i fixed " Submit winner " any row one by one and finished . And then after new replicate start next time old data is fixed is comeback.

please help me

sorry i have limited english.

Morguias.

SQL Server 2012 SP3 Replication components wrong version

0
0

Due to several issues with merge replication between SQL Compact 3.5 SP2 subscribers on Windows Mobile Pro 6.5.3 and SQL Server 2012 SP3
I found that some SQL Server 2012 Database Services Core Shared files included on SQL Server 2012 Standard Edition with Service Pack 3 (x64) - DVD (English)
are RTM version 11.0.2100 (like mergetxt.dll, Replagnt.dll ...).
Some of them were correctly updated in 11.0.6540.0 version with Cumulative Update Package 4 for Microsoft SQL Server 2012 Service Pack 3 (SP3) version but not
the file "Microsoft.SqlServer.Replication.BusinessLogicSupport" (the last known version is 11.0.5655.0 with Cumulative Update Package 13 for Microsoft SQL Server 2012 Service Pack 2 (SP2)).
How can I get and upgrade the right version of this file ?


Unable to shrink log file due to transactional replication

0
0

I have a transactional replication configured as per below:

ServerA.DBA (pub) --> ServerB.DBB (Sub)
ServerB.DBB (pub1) --> ServerC.DBC (Sub)
ServerB.DBB (pub2) --> ServerD.DBD (Sub)
ServerB.DBB (pub3) --> ServerE.DBE (Sub)
ServerB.DBB (pub4) --> ServerF.DBF (Sub)
ServerB.DBB (pub5) --> ServerG.DBG (Sub)

Today, I got an alert saying that my replication ServerA.DBA (pub) --> ServerB.DBB (Sub) is failing with below error:

Replication-Replication Distribution Subsystem: agent failed. The transaction log for database is full due to 'REPLICATION'.

Upon investigation, I found that my log file was capped at 100GB on ServerB.DBB which was causing the issue. To fix this, I added a new log file as I was unable to extend the existing log file due to same error. This fixed my issue and replication caught up in some time. However, now I am unable to shrink the log file and it always shows my log file utilization as 99% and increasing. This raised some doubts in my mind whether my replication from Server B to C,D,E,F and G is actually running or not and why I am unable to shrink the log file.

Log_reuse_wait_desc on my ServerB.DBB always shows 'REPLICATION'. I ran DBCC OPENTRAN on my ServerB.DBB and it shows below:

Replicated Transaction Information:
Oldest distributed LSN     : (0:0:0)
Oldest non-distributed LSN : (10417370:9406:1)

This value is not changing since many hours now. Does it mean my replication from Server B to C,D,E,F and G is not working? However when I see in replication monitor it shows everything as fine. i.e. logreader, all distributor agents are running and moving transactions for all publications. Why I am unable to shrink the log file and what should I do to shrink the log file?

Also, want to add that CDC is not enabled on any of my DBs involved in replication. DBCC LOGINFO shows all my VLFs in use.  

Help With Replication

0
0

Good Afternoon Forum

Last week most of our Replication was compromised as someone set up a new Publication/Subscription with the incorrect Account Details, resulting in the Service Account being locked out and all of our Replication grinding to a halt.

I've managed to restore most of the Subscriptions save one; I tried to reinitialise the Subscription in Question without success, I then deleted the subscription and recreated it, but the Subscription kept on failing.  finally I deleted the Subscription and the Replicated Database and attempted to recreate the Subscription with a new database and yet it is still failing.  The Subscription is failing to create the Tables in the Publication Article List and it is failing to create the necessary Stored Procedures for the Replication.

Note that the same Service Account is being used on the Publication, Distribution and Subscription Points, with Sys Admin access across the board.

Can anyone please offer any advice?  Note also that the Database is being replicated to another Subscription Database without any issue.

Many Thanks.

Ps  The Replication Processes etc are owned by our BI Team, not by us DBA's, this is why this mess all happened in the first place.


Please click "Mark As Answer" if my post helped. Tony C.

Conflict on publication with only one subscriber?

0
0

What conditions would create a conflict on a publication when there is only one subscriber?

Publisher is SQL Standard 2012 r2 sp3 with merge replication. Subscriber is SQL 2012 r2 sp3 express.

Issues appeared in last few months. Only change was that an article (table) was added 3 months ago.

How would a person trouble shoot this?

Viewing all 4054 articles
Browse latest View live




Latest Images