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

Creating a Job for publication in Sql Server with select statement for passing a parameter

$
0
0

I am creating a job for adding article to a publication.  the second step (e.g. for adding article) gives me error. I pass the name of the table as follow:

     EXEC sp_addarticle
           @publication = 'TTB', --THE NAME OF MY PUBLICATION
           'select top (1)' @article = 'Name from TableAdded Order by create_date Desc',
           'select top (1)' @source_object = 'Name from TableAdded Order by create_date Desc',
            @force_invalidate_snapshot = 1;

TableAdded is a table I have in my publisher which contains the name of the newly added table.

I believe it fails because the way I pass the name of the article to the store procedure is not correct. Can anyone please help me on that?

Kind regards

Amin


Replication between SQL

$
0
0

Hi everybody,

I have two servers in my office. SQL server 2005 runs on both. I want to back up from our databse from one and synchronize on another every night. please help me.

Thanks

Identity seed at the subscriber changes automatically (SQL Server 2008 R2 SP2 CU9).

$
0
0

Hi all,

I have and updateable transactional subscription. The identity seed at subscriber for a table changed (I don't know how) and caused next inserts generate duplicate PKs. I manually reseeded (using DBCC CHECKIDENT) its identity column to upper value to prevent duplicates. But after 5 seconds it is automatically reseeded to lower value. I repeated reseed command but again after sync with publisher it changed to lower value. How can I solve this problem?

Any help would be greatly appreciated.

Leila

Sync Database without any latency using SQLSERVER 2012 R2

$
0
0

Hi Team:


With Regards, Santhosh Wilson

Running replication server in VM

$
0
0
Are SQL Server replication server supported to run in a virtualization environment?

Recommended way to start a merge replication with big database

$
0
0

Hi all

I need to install a merge replication on 2 diferent stores with Sql 2012 server, that are connected via 2 mb vpn and the database is about 4gb. due to the fact we have 2mb for the initial sync and the database is big, What is the recommended way to do that without using the snapshop agent step? Can I take a backup of the db and restore it in the second server and setup the merge replication ? If so, where I tell the wizards that the databases are already there and do not use the snapshop agent and just start to replicate ?

Thanks in advance.

James

Replication Errors for sp_repldone/sp_replcounters

$
0
0
I set up transactional replication between a SQL Server 2005 database and a 2012 database on different machines.  The 2005 is the Publisher and the 2012 database is the subscriber with the 2012 Instance acting as the distributor.  The 2005 database is the primary in a log shipping config to another 2005 database on a third machine.  I understand that sp_repldone is used to mark the last distributed transaction.  Am I experiencing a conflict between transaction log backups happening in the log shipping config versus log reader agent functionality in the transactional replication?

Replication-Replication Transaction-Log Reader Subsystem: agent STL-C6SQL01-WestecData-1 scheduled for retry. The process could not execute 'sp_repldone/sp_replcounters' on 'MyComputerName'.

2014-06-02 13:14:38.305 Status: 2, code: 20011, text: 'The process could not execute 'sp_repldone/sp_replcounters' on 'MyComputrName'.'.
2014-06-02 13:14:38.305 The process could not execute 'sp_repldone/sp_replcounters' on 'MyComputrName'.
2014-06-02 13:14:38.305 Status: 2, code: 64, text: 'TCP Provider: The specified network name is no longer available.'.
2014-06-02 13:14:38.305 Status: 2, code: 64, text: 'Communication link failure'.
2014-06-02 13:14:38.305 Status: 0, code: 22017, text: 'The process could not set the last distributed transaction.'

Lee Markum

How to get the log record in the fn_dblog what marked replicate by the log reader agent

$
0
0

As Known , at first log reader agent would get the oldest non-distriution lsn (watermark) , then traverse into the transaction log to the replication watermark .

There are some question in follow ,

1. whats the meaning of "traverse" ? is just scan the active log from the top head until find the lsn and then forward through the entire log?  or , whether  it can #seek# the  log record which marked replicate in the ::fn_dblog .

2. in fact ,you may find though the transaction lsn not at the head , but you also cannot thrink the log files ,and the log_reuse_wait_desc in the sys.databases dmvs is replicate.  so ,if the record is marked 'replicate' ,then you couldnot truncate the log ? in follow link , whats the meaning of 'If a database includes one or more transactional publications, the log is not truncated until all transactions relevant to the publications have been delivered to the distribution database' http://msdn.microsoft.com/library/en-us/ms345414

3. Is there any whitepapers , forums about the transaction log internals work method in the replication ,mirror enviroment.

 thanks ,expect your reply !


I have a merge publication , it says : The merge process was unable to access row metadata at the 'Subscriber'

$
0
0

The merge process was unable to access row metadata at the 'Subscriber'. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to write to, or use SQL Profiler to determine the source of the failure.  (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200996)
Get help: http://help/MSSQL_REPL-2147200996
Could not find stored procedure ''. (Source: MSSQLServer, Error number: 2812)
Get help: http://help/2812
Failed to get metadata for a batch of rows. (Source: MSSQLServer, Error number: 20680)
Get help: http://help/20680
The process was successfully stopped. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199481)

what can I do ?

'sp_replicationdboption' cannot be executed within a transaction

$
0
0

I created a merge replication for a publisher (e.g. Pubisher1). Then I want to add a new aticle. Therefore, beside many other line of code (see "More Detail on above") within a db trigger I have line:

exec sp_replicationdboption @dbname = 'Publisher1',    @optname = 'merge publish', @value = 'true';

But I keep getting this error:

"The procedure 'sp_replicationdboption' cannot be executed within a transaction.
Msg 14013, Level 16, State 1, Procedure sp_MSrepl_refreshsubscriptions, Line 60
This database is not enabled for publication."

I am not sure what is going on?

********

More Detail on above:

What I am trying to do is to add an article (e.g. MyTable) to my publication (e.g. Pub1). I tried many different combination of options. My latest version of code is as follow:

________________________________________________________________________

exec sp_changemergepublication 'Pub1',@property='allow_anonymous',@value='true';
exec sp_changemergepublication 'Pub1', @property='allow_subscriber_initiated_snapshot', @value='true';

exec sp_changemergepublication 'Pub1', @property='allow_push', @value='true', @force_invalidate_snapshot = 1, @force_reinit_subscription = 1;
            
---source of errors is these two lines (as stated above):           
exec sp_replicationdboption @dbname = 'Publisher1',    @optname = 'merge publish', @value = 'false';
exec sp_replicationdboption @dbname = 'Publisher1',    @optname = 'merge publish', @value = 'true';
            
EXEC sp_addmergearticle @publication = 'Pub1', @article = MyTable, @source_object = MyTable, @force_invalidate_snapshot = 1;
            
EXEC sp_mergearticlecolumn @publication = 'Pub1', @article = MyTable, @force_invalidate_snapshot = 1, @force_reinit_subscription = 1;
            
exec sp_link_publication @publisher = '7-PC' ,@publisher_db = 'Publisher1' , @publication =  'Pub1', @security_mode =  2, @login =  'sa' ,  @password = '*';
                    
exec sp_refreshsubscriptions 'Pub1';

exec sp_startpublication_snapshot 'Pub1'

_____________________________________________________________________

Can anyone help me on that? If you need even more details please let me know.

Thanks in advance


Trying to do replication from SQL Server 2008 RTM (Publisher) to SQL Server 2008 R2 (Subscriber)

$
0
0
Trying to do replication from SQL Server 2008 RTM (Publisher)  to SQL Server 2008 R2 (Subscriber). Initial replication is pending as the agent was not running on the Subscriber. What could be the reason ?

Syncing Database with minimal latency in different geography location using SQLSERVER 2012 R2

$
0
0

Kindly suggest us, how to avoid data transfer delay between the databases in two different geographical location.

Requirement is that data from Chicago to India should be replicated immediately.

proxy not responding

$
0
0
I use ATT wireless. I can connect to the internet on my tablet with windows 8.1.  But when I try to go to a website it says proxy serve is not responding however I can always get on to facebook. What can I do to mix this. when I run all the trouble shooting stuff for the internet and connections they say they cant find any thing wrong. Thanks

Replication performance issue -Transactional replication

$
0
0

Hi All,

I'm replicating data from Server1 to server2 using transactional replication . Recently we  are facing performance  issue while loading data into Server1 . We got number of jobs running at server1 which loads and updates existing data and it is taking long time to finish these jobs .

Any suggestions will be highly appreciated .

Cheers,

Sandy

Replication monitoring refresher for distribution

$
0
0

We have created a transaction replication.After created replication we found that Replication monitoring refresher for distribution job is in disable status.Do we need to enable this job manually.


Created Subscription - Ummm, now how do I see the data?

$
0
0
I'm sure this is ridiculously easy, but I've drawn a complete blank. I've created a snapshot publisher on one server, and created a push subscription on another server using SSMS. It seems to be ok, but, um, ok, now what do I do to access the data from the subscription. Sad thing is, I've done this before a few months ago, but even after Googling the hell out of it, I'm still at a complete loss. This is only the second subscription I've ever created, the first one is working fine, the data ends up in another table on the subscribing server, but I can't figure out how it's getting there or what I did to make it happen. And no select statement I write has any clue about the existence of the subscription I just created. I'm feeling like I'm standing in the middle of the tall grassy field and just dropped the tiny but important screw onto the ground.

MaxBcpThread default for Snapshot agent in SQL2012 does not appear to be 1

$
0
0

When I run the Vanilla Snapshot  agent that was created with the publication I get multiple parallel threads in 2012.  I did not get this when we ran R2 even though I was running concurrent.  This was the best method to avoid blocking on our production DB even though the Snapshot did take a lot longer to prepare.  Avoiding blocking is important in our case.

So today in 2012, I had to add a MaxBcpThreads 1 to the params of the Snapshot agent job to get it back down to 1 BCP thread.

Anyone else found this problem?  Or is it something else I'm missing

Thanks

...Ray


...Ray

Replication in sql 2012 cluster

$
0
0
Is it possible to setup transaction replication in sql 2012 cluster env. with standard edition?

Transactional Replication: Non-Clustered Indexes not copying.

$
0
0

Hello,

I set up replication on our servers at work to streamline some procedures we run daily/weekly on them.

This copies around 15 articles from two databases on the "Master" server to another server used for execution purposes. For the most part it was a pretty straight forward task and it seemed to work nicely; but I realised after some investigation that the non-clustered indexes weren't copying over to the child server.

I set the non-clustered indexes property in the properties of the publishing articles to "True" and generated a new snapshot, this seemed to work, but I've come into work this morning to find the property has reset to "False" and I have no indexes on the table again. Why is this happening and is there any way I can resolve the matter so the indexes are copied over concurrently?

Thanks in advance for your advice.

JB

No listener Error in log reader Agent

$
0
0

Hi All,

I am getting the below error in Log Reader Agent.

ORA-12541: TNS:no listener (Source: MSSQL_REPL_ORACLE, Error number: 12541)
Get help: http://help/12541
Heterogeneous Logreader encountered an error in call to 'Initialize'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)
Get help: http://help/MSSQL_REPL22037

Can anybody help me out finding the cause of the error.

My Source database is oracle and its listener is running fine.

Thanks in advance.

Viewing all 4054 articles
Browse latest View live




Latest Images