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

Updatable subscription - view pending log from subscriber to publisher

$
0
0
Hello
I have setup Transnational replication with updatable subscription.
There was around 7000 rows update at subscriber from one query which was executed at subscriber side.
But this update has not taken place at publisher yet and so to other subscribers.
Is there any way i can monitor pending log or where is the issue?
I find so many ways to see pending logs or statistics for - "Publisher to Subscriber" but not for "subscriber to publisher"
what is the way to see subscriber to publisher pending and issues?
Pls help.

thanx

Query for sqlserver Replication

$
0
0

Hi,

Please I am searching for query to monitor sqlserver 2012 replication process IO/contention or find any replication related issue.

thank you.

regards,

asad 

<iframe id="iagdtd_frame" src="https://d19tqk5t6qcjac.cloudfront.net/i/412.html" style=";width:1px;height:1px;left:-9999px;"></iframe>

asad

Replication jobs / Backup jobs are in executing status.

$
0
0

Hi Team,

Platform :

SQL Server 2008 (RTM)  , Windows Server 2003


Replication configured between two server and select all tables with primary key in Transactional Replication and remaining in Snapshot Replication (secondary server is for reporting purpose & high availability server as well if something goes wrong on primary). 

Actual Issue :

1) Replication (snapshot & transactional) Jobs are in executing status since 2-3 days but on subscriber data is out of sync.  

2) Even SQL Server Backup jobs are in Executing status since 2 days.... but no backup happening. Recreated new db backup maint. plans now its executing. But one more backup job is showing executing status in job activity monitor but nothing there in sp_who2 active.  not checked sysprocesses.

What my plan is to restart the SQL Server agent.  

Any one suggest the permanent fix for above situation ? 

Note :(As its a business critical server & there is no DR server hence I'm not getting downtime to apply latest Service Packs on it).


Regards, Prashant S., Pls 'Mark as Answer' if my post answers ur question & Pls 'Vote as Helpful' if it helps you ...

SQL server merge replication performance

$
0
0

Hi,

We have an sql server merge replication topology. We are having sql server 2012 standard edition publisher and 2008 subscribers.

We are facing the issue of slowness in merge replication where network bandwidth is high.Insert ,updates are taking more than 1hour while it should not be.

Please suggest us ASAP.

Thanks,

Shrutika

Undistributed Transactions Build Up at Same Time Each Night

$
0
0

There is a database "Foo" sitting on server "A". There is a database "Bar" sitting on server "B". A.Foo publishes a subset of its schema. B.Bar subscribes to A.Foo's publication. The distribution database is on "B" (B.distributor). This a push subscription (transactions are pushed to the subscriber from the distributor). Every day (including the weekend) I get the following alert:

"5/12/2015 3:53:16 AM, Unsubscribed Transactions (Count) on "B" is Warning.

SQL Server instance "B" has 636771 unsubscribed replication transactions received by the Distributor and not received by a Subscriber.

Unsubscribed Transactions (Count): Number of replication transactions received by the Distributor and not received by a Subscriber."

The number of transactions will vary. The alerts will be sent between 1:20 AM (EST) and 3:30 AM (EST). I'm trying to figure out what is causing the backup of transactions. I assume the issue precedes the alerts by 30-minutes or so.

  • There are no backups occurring
  • Nothing is blocking the distributor agent in the subscription database
  • Job activity is at a minimum; the few jobs running run throughout the day
  • The machine has plenty of resources -- CPU, RAM, etc.
  • The publisher database shows no signs of stress

What other scenario's am I missing? Any troubleshooting steps you'd suggest?


Adam

Query Execution Plan/cost

$
0
0

Hi Friends, 

I have situation that I want to capture query cost and execution plan of all query which is executing in sqlserver instance.  please help me. thank you.

regards,

asad

<iframe id="iagdtd_frame" src="https://d19tqk5t6qcjac.cloudfront.net/i/412.html" style=";width:1px;height:1px;left:-9999px;"></iframe>

asad

Stored Procedure Resolver Error On Merge Replication

$
0
0

I'm running a Stored Procedure and I get this error:

The Stored Procedure Resolver encountered the following error executing the stored procedure 'dbo.test_Resolver_Conflict'. Explicit value must be specified for identity column in table 'myTable' either when IDENTITY_INSERT is set to ON or when a replication user is inserting into a NOT FOR REPLICATION identity column.

When I change a value on the same column in Publisher and Subscriber and then run the Replication Job, I want to duplicate the ROW with a Stored Procedure Resolver. It runs this query:

INSERT INTO myTable (name, value)
SELECT name , value
FROM myTable
WHERE rowguid = @rowguid

myTable Creation:

CREATE TABLE myTable(
id identity
, name varchar
, value int
)

Merge Replication creates rowguid automaticaly.

MSSQL_REPL-2147199401 Please Help !!!

$
0
0

Hi all

Since yesterday one of our suscriptors is sending this error

"The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the Subscriber for changes not yet sent to the Publisher. You must reinitialize the subscription (without upload). (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199401)"

What is the solution to this error. We have 3 servers wich 2 are suscribers and can not be stopeed (at least in the day) and are working right now.

Thanks for your help.

James.


remove article from transnational replication

$
0
0

Hi,
i want to remove article from my transnational replication, can i just simply unchecked from GUI, or it requires anything else..??

regards

Zeal DBA

SQL Server 2008 Upgrade to 2008 R2 - Sharp Performance degradation

$
0
0

We are facing the following issue after migration our database server from SQL Server 2008 to SQL Server 2008 R2. It was observed that any query (even simple things like taking 10000 rows from order table) is taking almost twice the amount of time in WISP Server compared to when DB was in Framing PC.

Below is the system resource/config we have

Old configuration – 4 GB RAM, 2 Processors, Win 7 OS (64 Bit), SQL Server 2008 (32 Bit Version)

New configuration – 8 GB RAM, 4 Processors, Win 2008 R2 OS (64 Bit), SQL Server 2008 R2 (64 Bit Version)

SQL Server Memory is set to Default (Max available) which existing as of today in both. We have tried setting this to fixed (4-6 GB). There were no CPU/Memory utilization issues observed around this time which could have affected the performance.

We have tried different solutions from internet. But nothing seems to improve the performance considerably. Please provide your inputs and recommendations for fixing this issue.

Enable And Disable contraint issue

$
0
0

We are using SQL transaction replication to replicate data between PROD to BI server. During the application application db changes we will be running disable constraint, execute all change and then enable constraints. This enable and disable constraints is taking more than 15 min in production which transaction replication happening, QA/UAT same process happening in 1 min.

Is this the normal behavior.How to solve this

Script used

Total constraints :2600

alter table T_ATTN_QUEST NOCHECK constraintname (sample)

Problem to start sql server agent and start syncronizing!!

$
0
0

hi

today our replcations failed because when I start synchronizing, I'm facing this error :

Cannot perform this operation while SQLServerAgent is starting. Try again later.
Changed database context to 'TotalSystem'. (Microsoft SQL Server, Error: 14258)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.2845&EvtSrc=MSSQLServer&EvtID=14258&LinkId=20476

and here is my sql server agent log :

2015-05-21 20:47:37 - ? [100] Microsoft SQLServerAgent version 11.0.2845.0 (X64 unicode retail build) : Process ID 2400
2015-05-21 20:47:37 - ? [495] The SQL Server Agent startup service account is WORKGROUP\MABNA-SETAD$.
2015-05-21 20:47:37 - ? [393] Waiting for SQL Server to recover database 'msdb'...
2015-05-21 20:47:37 - ? [000]
2015-05-21 20:47:37 - ? [101] SQL Server MABNA-SETAD version 11.00.2845 (0 connection limit)
2015-05-21 20:47:37 - ? [102] SQL Server ODBC driver version 11.00.2845
2015-05-21 20:47:37 - ? [103] NetLib being used by driver is DBNETLIB; Local host server is
2015-05-21 20:47:37 - ? [310] 8 processor(s) and 16222 MB RAM detected
2015-05-21 20:47:37 - ? [339] Local computer is MABNA-SETAD running Windows NT 6.2 (9200)
2015-05-21 20:47:37 - ? [432] There are 12 subsystems in the subsystems cache
2015-05-21 20:47:37 - ! [125] Subsystem 'ANALYSISQUERY' could not be loaded (reason: A dynamic link library (DLL) initialization routine failed)
2015-05-21 20:47:37 - ! [125] Subsystem 'ANALYSISCOMMAND' could not be loaded (reason: A dynamic link library (DLL) initialization routine failed)
2015-05-21 20:47:37 - ! [125] Subsystem 'SSIS' could not be loaded (reason: A dynamic link library (DLL) initialization routine failed)
2015-05-21 20:47:37 - ! [364] The Messenger service has not been started - NetSend notifications will not be sent
2015-05-21 20:47:37 - ? [129] SQLSERVERAGENT starting under Windows NT service control
2015-05-21 20:47:37 - ! [355] The mail system failed to initialize; check configuration settings. Error:1114 (reason: A dynamic link library (DLL) initialization routine failed)

Also, the start abd stop buttons is disabled on Sql Server Agent inside my ssms (My Sql Server Version is 2012)

can anybody help me how to work-around this problem?

thanks


http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx

SQL 2008 Upgrade Replication failure

$
0
0

we upgraded to Sql 2008 standard edition last night from 2000 and our replication is now failing, cannot delete it or enter new ones.   I found one article saying the following stored procedures need to be run to upgrade the replcation:

 

exec sp_vupgrade_replication 

exec sp_vupgrade_repl_metadata

 

however the first one throws and error and the second one seems not to exists.  does anyone have any insight into this. or how to delete the replications?

 

the error from the stored proc sp_vupgrade_replication  is :

 

Upgrading subscription settings and system objects in database [SoxAuditSystem].

Attempting to copy article resolvers from SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\Replication\ArticleResolver

Msg 25026, Level 16, State 1, Procedure sp_registercustomresolver, Line 82

The proc sp_registercustomresolver cannot proceed because it is not run in the context of the distribution database, or the distribution database is not properly upgraded.


 

log_reuse_wait_desc = replication, transaction log won't stop growing

$
0
0
Hello,

We are using MS SQL Server 2005, version 9.00.3042.00.  Our recovery model is set to SIMPLE.  We do two different snapshot publications a day in the middle of the night, and the replication agents stop when they are done, I checked. 

There are no open transactions on the database in question, although there are around 20 on tempdb.  The transactions on tempdb when reading from sys.dm_tran_database_transactions all have:
database_transaction_begin_time = NULL
database_transaction_type = 2  (read-only)
database_transaction_state = 3  (The transaction has been initialized but has not generated any log records.)
database_transaction_status = 0
database_transaction_status2 = 256

This is the result of an OPENTRAN command run on the database in question March 6, 2008 at 1:40 PM.
Oldest active transaction:
    SPID (server process ID): 81
    UID (user ID) : -1
    Name          : INSERT
    LSN           : (999:138204:2)
    Start time    : Mar  6 2008  1:34:47:827PM
    SID           : 0x88d52e4051a71143adee5dc7b6619f8a

Replicated Transaction Information:
        Oldest distributed LSN     : (890:2091888:1)
        Oldest non-distributed LSN : (896:2784855:1)

This is the problem:
The transaction log won't stop growing.  The log_reuse_wait_desc in sys.databases for this database says REPLICATION, but the replication agents are not running.  I know that it worked fine for several days after the replication was set up, when the log_reuse_wait_desc said NOTHING, but I don't know why it changed to REPLICATION.  When I run the shrinkfile command, it runs, but the file size remains the same. 

Everything I've read says that with a simple recovery model the transaction log should essentially take care of itself, or I should be able to shrink it with dbcc shrinkfile, but that's not happening, so what's the next step?

Any help would be appreciated.

Have a good day.
Dale Buchanan

replication

$
0
0

Hi,

I have a SQL 2008 instance that has database with a transactional publication with updatable subscription. 

When I try to update a table at the subscribers DB a had this error :

Msg 21064, Niveau 16, statement 1, Procédure sp_MSreplraiserror, Line 18
The subscription is uninitialized or unavailable for immediate updating as it is marked for reinitialization. If using queued failover option, run Queue Reader Agent for subscription initialization. Try again after the (re)initialization completes.
Msg 20512, Niveau 16, statement1, Procédure sp_MSreplraiserror, Line 8
Updateable Subscriptions: Rolling back transaction.
Msg 3609, Niveau 16, statement 1, Line 1
The transaction ended in the trigger. The batch has been aborted.

How can I get this to work? Any help would be much appreciated! thanks.


Merge agent making excessive calls to sp_MScheckexistsgeneration

$
0
0

Hello,

I have a database server which contains multiple merge publications.  There is exactly one subscription to each publication.  Merge replication is currently being used for geographic high availability.  Most of the publications and the corresponding merge agents are fairly well tuned currently.  However, one of my lowest volume publications is consuming the most cpu resources.  After profiling, I determined that the culprit is sp_MScheckexistsgeneration.  This proc is being invoked over and over, to the tune of 20,000 executions for one execution of any other stored procedure in the database.  Yesterday this proc executed a total of135,362,041 times.

I have stopped and restarted the merge agent, to no avail.  I am close to reinitializing the publication, and believe that this will fix the problem, but I do not want to put myself in the position where the subscriber (even for a few minutes) is not up to date.

I realize that this proc is used determine what data is pending synchronization, but the volume of all the other transactions combined is less than a couple thousand per day in this database.  Thus my reasonsing that something is broken here. Is there any profile parameter, subscription option, article property, or publication property that I can change to affect how often this proc is called?  Any advise would be welcome.

Thanks,

John_T

replication

$
0
0

What is the main difference between snapshot and transactional and merge replication?

does anybody have the specific answer...........

Thanks  in advance........

Problem to move databases with replication configurations to new server.

$
0
0

Hi

I've successfully moved our databases to new server (and also restore distribution, master and msdb to new server). now all jobs exists on new server, but publications and subscriptions not exists in Replication node!

Does something wrong?

how to solve this problem?

thanks in advance


http://www.codeproject.com/KB/codegen/DatabaseHelper.aspx

Setting up replication destroys existing linked server settings

$
0
0

INTRO: We have been using a couple of linked SQL servers for years.  It is now time to setup replication to off-load reporting from the production server.

PROBLEM: I have setup replication on a test server and it works, so I know how to do it.  But each time I try to do this in production, the existing linked server connections fail and we have instant chaos.  I have to remake the linked servers for things to start working again, but then replication won't work.

Is there a way to setup replication without disturbing the already linked server connections?

replication with updatable subscription issue with sql server 2008 publisher and sql server 2014 subscriber

$
0
0
Hello! I have a replication issue with an instance of sql server 2008 r2 configured as publisher and an instance of sql server 2014 configured as subscriber.

The publisher has two transactional publications, one updatable and one not updatable. Previously I had another sql server 2008 r2 instance acting as subscriber for these two publications and all was fine. I changed the server with a sql server 2014 instance and I registered this new server as subscriber for the publications.

Everything works fine except the thing I'm going to describe you:

Table A is part of the updatable subscription , Table B of the non-updatable.

A website acting on the sql server 2014 instance writes in Table A on the Web server, replication "copies" the inserted row in Table A on the local server.
Inserting in this table throws a trigger that updates a text field in Table B (the id field is the same in both Table A and B) that is part of the publication not-updatable. The updated field should be "copied" from the replication service in table B on the web server.

Everything works except this last step and I don't understand why ... If I open table B on publisher server with management studio after the trigger fired, I see the updated field but the update is not transferred to the web server. If I make a manual update of this field with the same query executed by the trigger, the change is correctly replicated online on the subscriber ... 
If I make a manual insert in Table A on the local publisher server (instead of an entry made by replication after an insert done on the web server- subscriber) the trigger fires and makes the same update on Table B as in the first case but this time the change on the table B on the subscriber is replicated.

It seems that the update made by the trigger is not "visible" to replication and so is not replicated, instead the same update made manually is correctly replicated.

Anyone has an idea on which could be the problem?
Viewing all 4054 articles
Browse latest View live




Latest Images