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

The procedure 'sp_replicationdboption' cannot be executed within a transaction

$
0
0

Hi

I trying to do a merge replication of my DB.

When I execute this command:

use [xxx]


exec sp_replicationdboption @dbname = N'xxx', @optname = N'merge publish', @value = N'true'
GO


I'v got this messages:

Msg 15002, Level 16, State 1, Procedure sp_replicationdboption, Line 94
The procedure 'sp_replicationdboption' cannot be executed within a transaction.

What is a solution? I looking in this forum and google and still haven't the answer. Can anybody help me?


Remove Transactional Replication

$
0
0

Pub,sub & distr in same server : ServerA

Database :  DB1   (pub)

Database : DB2     (sub)

publication name: firstPub   (contains 50 articales)

Type:  transactional replication

can you pls  , show how to remove existing replication setup?

Scenario:

DB1 & DB2 -- refreshed month on month ( Restore using Prod database backup file )

  • so existing Transnational replication needs to remove
  • refresh those database by restore database script.
  • recreated transnational replication.

 

Problen when try new database diagram

$
0
0

When I try restore my database backup file, I can... But I can't make new database diagram, and show the problem, below ::::

that file has copied by my university, I restore on my pc but show problem

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

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. (Microsoft SQL Server, Error: 15517)

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

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

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

Pleasee help me fix it ???

SQLServer 2014 replication pull subscription fails to initialize

$
0
0

Hi 

trying to setup replication for 6 large tables, ~ 20m rows,  between 2 x SQL 2014 sp2 servers.

Publication is ok.

Distribution is ok.

Initial snapshot created ok.

Tried both push subscription and pull subscription. In each case the subscriber does not initialize.

The pull subscription job just runs without producing any result.

Has anyone run into this or similar problem ? I have removed and recreated the entire replication twice, with both push and pull configuration. No progress. Advice  would be much appreciated .

SQL Replication Batch File Encryption

$
0
0

Currently, when setting up a new replicated subscriber, we set up a batch file to get the subscription to replicate back to the main publisher. This batch file contains a username and password for the SQL server instance on both the server and the subscriber.

Is there an alternative method of getting the subscriber to replicate back without having to run a batch file? I am looking to remove the passwords from the batch file entirely.

I believe you used to be able to use ActiveSync but this program is not found in Windows 10.

Any help would be greatly appreciated.

Replicate to a second database

$
0
0

Hi,

I have the following setup:
2 publication server\database
1 distributor server\database
2 subscribers 2 servers\2 databases

There is some extra background info:
First of all there was 1 subscription replicating to both servers\databases. So changing the selection of articles changed the content of both databases as well. Now I have removed one of these entries and the other one is still operating. And I also remove the database on that server.
I have setup a second publication outside the first one so it is possible to have 2 independent replications of articles. When I look in ReplicationMonitor the second subscription doesn't want to initialize\validate. And I think what the reason is, but I do not know (yet) how to fix this. I think there has to be a second Log Reader Agent which is pointing as well to the (same) source databases but transfers the data to the other target database.
Or do I need a second distribution database to be configured? Is this possible?

I hope this is clear enough.

Can somebody help me out?

kr
Marco


Snapshot replication issue

$
0
0

Hi All,

I am working on snapshot replicatoin with pull subscription on WAN, i am surprised that it applies snapshot paritally (only generate schema) but it does not apply data into tables on subscriber. I would like share the follwoing error message which i am getting on subscriber :-

2010-05-19 06:23:39.838 Agent message code 10054. TCP Provider: An existing connection was forcibly closed by the remote host.
2010-05-19 06:23:40.932 Category:NULL
Source: Microsoft SQL Server Native Client 10.0
Number: 10054
Message: TCP Provider: An existing connection was forcibly closed by the remote host.
2010-05-19 06:23:41.244 Category:NULL
Source: Microsoft SQL Server Native Client 10.0
Number: 10054
Message: Communication link failure
2010-05-19 06:23:41.526 Category:NULL
Source: Microsoft SQL Server Native Client 10.0
Number: 10054
Message: TCP Provider: An existing connection was forcibly closed by the remote host.
2010-05-19 06:23:41.807 Category:NULL
Source: Microsoft SQL Server Native Client 10.0
Number: 10054
Message: Communication link failure
2010-05-19 06:23:42.104 Category:NULL
Source: Microsoft SQL Server Native Client 10.0
Number: 10054
Message: TCP Provider: An existing connection was forcibly closed by the remote host.
2010-05-19 06:23:42.104 The agent failed with a 'Retry' status. Try to run the agent at a later time.


I think it is not a network issue becuase same replication is working perfectly on test server which uses the same network.

If anyone has idea about the issue then please let me know.

Raj


**Vote it if it is helpful. **Mark as answer if it solves your problem. Raj_79

use t-sql to kick off snapshot replication from publisher to subscriber

$
0
0

If I have setup snapshot replication one database from publisher to the subscriber and replication schedule is on demand,

I want to add T-SQL script to run replication from publisher to subscript. So kick off that T-SQL script when need to replicate.



How to write this T-SQL script??




[Help!] SQL replication is synchronized only partial rows from source database

$
0
0

While I was doing the SQL table A -> SQL table B replication setting, there was no error on replication monitor but count of rows of A and B are different.... 

Which option should I check? :( 

Replication issue

$
0
0

Hi All,

Getting below error, during transaction replication setup. GoldenGate replication and CDC enabled for publication databases.

Please help to resolve the issue.

Error messages:
The process could not execute 'sp_replcmds' on 'XXXXXXXXXXXX'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)
Get help: http://help/MSSQL_REPL20011
Failed to insert rows into Change Data Capture change tables. Refer to previous errors in the current session to identify the cause and correct any associated problems. (Source: MSSQLServer, Error number: 22863)
Get help: http://help/22863
The statement has been terminated. (Source: MSSQLServer, Error number: 3621)
Get help: http://help/3621
The process could not execute 'sp_replcmds' on 'XXXXXXXXXXXX'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)
Get help: http://help/MSSQL_REPL22037


Vinai Kumar Gandla

Processed 701 pages for database

$
0
0

Hi All,

I am getting the below error, 

BACKUP LOG OPCSA TO DISK = ''

Processed 701 pages for database 'OPCSA', file 'sparcsn4_log' on file 1.
The log was not truncated because records at the beginning of the log are pending replication or Change Data Capture. Ensure the Log Reader Agent or capture job is running or use sp_repldone to mark transactions as distributed or captured.
BACKUP LOG successfully processed 701 pages in 0.093 seconds (58.845 MB/sec).

Thank you,

JP

missing rows in transaction replication

$
0
0

Hi everyone,

We just migrated our databases to AWS.In  environment, periodically we have started missing records in some subscriptions. We don't have any delete against those articles in subscription(confirmed by adding delete triggers for these articles, and did not catch delete). For one particular publication that I am working on , the  insert and update happened in short period of time, and because of missing rows, the update statement causes the distributor agent to fail(complaining not found rows).

Is this something related to deferred update,although we don't update our unique key?how can I find what has happened to those missing inserts,since we don't have failure on publication.

I would appreciate if someone help me on this issue.


A.G

Restarting Merge Replication after a few months break

$
0
0

I have Merge Replication running on a central Distributor with two push subscriptions. Due to IT issues, the two 2 subscriber merge agent jobs have been disabled for some months. During this period one of the subscriber databases has been constantly updated but the other has been static. Obviously the replicated database on the distributor is also a few months out of date too.

Can I simply re-enable the subscriber merge agent jobs? I would have thought that Merge Replication should be able resume this way, albeit with a rather large merge to start with. I don't want to trigger a new snapshot as the database on the Distributor is months out of date.

If a new snapshot is required I imagine that I would have to backup up the current Subscriber (i.e. currently active) database and restore it to the Distributor before creating a new snapshot. That in turn probably require removing the subscriptions (after scripting them of course) and recreating them.

Restarting the existing agent jobs sound much simpler, if it will work.


R Campbell

incremental identity columns

$
0
0

Hi all,

sorry for my englisch. We replicated table with primary keys is identity incremental value. But  in the publisher the columns have another values.. After initial snapshot is all ok, but new record have autoseeded values and not same values from publisher... We use transactial oneway replication without modificattion in subsriber.... pls how change replication to replicate identity columns to subscriber ?


Falcon

Database warehouse

$
0
0

I want to create a single database that has a read version of all the separate databases we have to be used by PowerBI.

What is the best method to kinda Concatenate the databases into a single database, and keep it up to date "lets say every 15 minutes or so".

I was thinking about trying to create a job that generates scripts of the changes, but I lack the knowledge to setup myself, and I cannot seem to find the right solution in google for what I am attempting to do.

Any help would be appreciated.


previous command did not replicated to subscriber, but the next command got replicated

$
0
0
In Transactional Replication, previous command did not replicated to subscriber, but the next command got replicated. How to fix this

Kiran

Is the any way to avoid updates over articles on subscriptor of a Transactional publication.

$
0
0

We need to asure data is not modified on the tables on subscriber, is there any way to do that "into the box"?

We know to block updates by instead of triggers on tables on the subscribers but we are looking for a cleaner way, because maintainign this "by hand" in a future could be a problem, you know, someone can forget something and boom! 

Thx in avance J. Regal.


Deception is a right.

Is there any way to avoid updates over articles on subscriptor of a Transactional publication?

$
0
0

We need to asure data is not modified on the tables on subscriber, is there any way to do that "into the box"?

We know to block updates by instead of triggers on tables on the subscribers but we are looking for a cleaner way, because maintainign this "by hand" in a future could be a problem, you know, someone can forget something and boom! 

Thx in avance J. Regal.


Deception is a right.


Windows 2016/SQL WSFC - cluster failover occurs when FSW is offline

$
0
0

We have a two node cluster - both nodes are Server 2016 Standard to provide HA SQL.  The cluster is configured with a FSW on a third server that does not have WSFC installed.

Whenever the server holding the FSW is rebooted for maintenance, the cluster fails over to the other node.  Should this happen?  Is there a way to configure the cluster so it does not?

I understand the cluster object can no longer write to the FSW so it sees it as offline, which is why it fails over after 60 seconds but how is this useful then?  I thought the point of an FSW is to make sure the cluster does not fail over since both nodes are up.

Thanks in advance for your thoughts and help! 

Parallel batches to replicate

$
0
0

Hi,

We have a transactional replication with 1 publisher and 10 subscribers.

Normal use is that from time to time, some records (sometimes, 1, 10, 100 maybe 200) are updated/inserted on each subscriber. They are replicated to the publisher (and after that, to the other subscribers, depending on the value of some row-columns). Replication is done within a acceptable timeframe (a minute, to about half an hour or so).

This works well.

But now, I would like to do a mass-update on 1 of the subscribers. (approx 200.000 records).

I did this in a test-environment, and the mass-update took about 1 week to be fully replicated to the publisher.

My question now is:

* Suppose that I start the mass-update now, and after that, a normal user does a record-update. Will the update of this one record have to wait to be replicated, until the mass-update has been replicated fully? Or is there some kind of parallellisme.
Thinking logically, I would say: yes, it has to wait, as possibly this one record is also in the batch. What to do with the batch if the one (newest version) of the record had been replicated already. But maybe SQL has some clever way of doing this?

My goal is to do the mass-update, without really disturbing the 'normal' replication. 

Thanks in advance for any answer!

Viewing all 4054 articles
Browse latest View live




Latest Images