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

Distributor database has application objects

$
0
0

I am working on a replication issue where the distribution database has been set to point to the Publisher database. I am attempting to remove all replication and start again.

I have run sp_dropdistpublisher on all the publishers that refer to the database as the distributor, but if I run

exec sp_replicationdboption @dbname = N'xxxx', @optname = N'publish', @value = N'true'
(where xxxx is the name of the publisher database that has also been configured for distribution)

then it fails with:

Msg 20028, Level 16, State 1, Procedure sp_MSpublishdb, Line 56
The Distributor has not been installed correctly. Could not enable database for publishing.

If I generate the drop commands for all replication objects these involve running sp_dropdistributiondb, however this would attempt to drop the database. I don't want to do this - I just want to (ideally) remove all distribution objects from it and 'unmark' it as a distribution database.

This is a production environment, so I need to tread with care!

Any help appreciated.


SQL Server takes 6 minutes to read data from a table that has.... 0 rows!

$
0
0

Hi,

Everything is in the title, if I run a select count(1) from table, I get a result of 0 rows. If I do a select * from table it takes forever to read and finish the query. Also disk is reading the DB files at speed of 330 MB/sec while doing that query.

So.... WTF ? Any one got an idea on how I fix that ?

Thanks

------

a 115 GB of data for 0 rows................. wtf :)

TableNameSchemaNameRowCountsTotalSpaceKBUsedSpaceKBUnusedSpaceKB
msgdbo011571398411569728016704

------

Edit 2: truncate would be nice but the table is replicated ... hahaha

Replicating - .BAK vs .MDF/.LDF

$
0
0

Hi,

I am tasked to replicate an SQL Server database to a different machine. From SQL Server 2005 (Win Server 2003) to SQL Server 2012 (Win Server 2012).

From the server I saw there is a *.bak file being generated daily as a backup, is *.bak an Online backup? But I am thinking to perform an offline copy of *.mdf and *.ldf files.

I would like to know what is the difference if I were to:

1) "Restore" the DB using the .bak file?

2) "Attach" the DB using .mdf and .ldf file?

Which is the "better/correct" way to replicate the DB, without data lost?

Thanks in advanced!



Difference between running a snapshot agent and full reinitialize of subscriptions

$
0
0

Could anyone help explain the below as it's been on my mind for some time.

When we add a new article to a publication what is the difference in running the snapshot agent in replication monitor to kick start a new snapshot to deliver all tables v.s. why/when would you right click a publication and 'Reinitialize All Subscriptions' then right click the snapshot agent and run it?  Is it all down to the snapshot retention/expiration date set?  If so I can't say I've ever had an issue with not doing a full reinitialize.

How to get Configuration info in replication

$
0
0

Hi

I want to get all of information about replication for example is push or pull , is transactional or merg ... , and others.

thanks

What is the logic regarding the number of BCP Threads

$
0
0

I have a publication of 4 tables, two of which are huge.

I can't seem to get the Snapshot agent to break up its work 

I have tried Native and database snapshot Sync Methods and manually added a -MaxBCPThreads 12 parameter to the SQL Agent Job. The defaults for the Snapshot(1) and Distribution(4) agent profiles have been set to 10.

I don't know what else to do.   Because I am replicating to Azure I need the distribution to be multi-threaded in order for the Snapshot to be applied in a reasonable amount of time over multiple WAN threads.

How do I get SQL Server to cooperate here?

Thanks

...Ray


SQL 2016 Replication Deprecated

$
0
0

I'm reading that Replication has been deprecated and will be removed in future versions. 

We are setting up a new Data Warehouse on 2016 and were planning to use replication, however we don't want to go through all the work to setup Replication if it will be removed in the next version.

Merge agent taking more time, even there are no upload and download changes?

$
0
0

We have merge replication config between two servers, we scheduled merge agent to run for every 1 minute. merge agent taking 20 mins to merge the changes and even there are no changes its taking 18 mins. how to troubleshoot this issue?

Thanks in advance.




Transactional Replication

$
0
0

Hello All,

We had a weekend maintenance for Transactional replication where we tried to move 800Gb of data from sql 2012 to sql 2008, Where i broke down the publications in to three sets, One of the publication has a table with 53Millions row counts on top of it we had the indexes also, data got moved fast but the index operation is taking long time , I have verified the wait stats on the server looks like i have all the CXPacket waits but verified the MaxDOP Option too 

Memory : 45Gb

CPU : 8 processors

Any suggestions please?

Thanks 

xxxxxx


vamshi

Clustering across a geographical location

$
0
0
Hello,

I'm fairly new to MSSQL, but I was wondering...

I want 2 nodes

One in location A, one in Location B (about 9 miles apart over a 20Mb pipe).

Can I set up a cluster between them? Do they have to have shared storage or does MSSQL have a way to mirror/replicate over?

If anyone else has a similar setup I would greatly appreciate your advise.

Log Shipping

$
0
0

I have configured log shipping as replication ,after few days it got error out on primary backup of transaction log was not happening then I took full backup after transactional log backup  was happening on  primary, but still copy and restore is failing on secondary, its saying but error message ,

The process could not be created for step 1 of job 0x49157E5B17C28348B372DA08BB1A7F99 (reason: The system cannot find the file specified).  The step failed.

Replication problems MSSQL_REPL-2147199363

$
0
0

Hello everyone

We have setup merge replication: Distributor/Publisher are on the same Server with Sql Server 2012 RTM (11.0.2100). Subscribers are on notebook with Sql Server 2012 Express SP2 (11.0.5058).

Time to time, user reports that synchronisation fails with the following error:

The merge process failed because it detected a mismatch between the replication metadata of the two replicas, such that some changes could be lost leading to non-convergence. This could be due to the subscriber not having synchronized within the retention period, or because of one of the replicas being restored to a backup older than retention period, or because of the publisher performing more aggressive cleanup on articles of type download-only and articles with partition_options = 3. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199363) Get help: http://help/MSSQL_REPL-2147199363

Le filigrane de création commune n'est pas valide dans ce réplica, parce qu'il n'existe pas ou que les métadonnées relatives aux modifications qui n'ont pas encore été propagées ont peut-être été nettoyées. (Source: MSSQLServer, Error number: 21800) Get help: http://help/21800

Untill recently we always thought the reason of the failure was the first one. (User didn't synchronize during the retention period). So everytime invalid subscription were reset on both side (notebook and server) with upload_first = 'false'. Sometimes It was not enougth and the only solution was to drop the subscription and recreate it on the notebook.

But now we facing the same problem with a new notebook installed for a less than a month (although subscription expiration périod is set for 90 days). 

We checked Database on server: Upload_options is set to 0 on sysmergearticles for every article and partition_options is set 0 on sysmergepartitioninfo. Database server were never restored and notebook was installed recently (less than a month)

So none of the three reasons provided by the error message seems to suits.


Does anyone have a clue on why this happen ?

Thank you very much

Replication Malfunctioned - Distribution Missing

$
0
0

Hi All,

I have configured the Replication in SQL Server 2008 R2 among 3 instances. Let's say INSTANCE1 as Publisher, INSTANCE2 as Distributor and INSTANCE3 as Subscriber. All the three instances are in separate VM's. Unfortunately the Hard Disk got corrupted which caused the INSTANCE2 to be down. Later it was decommissioned. 

We had lost the Distributor Database. So we tried the delete the Publication and Subscription and to reconfigure it. And while deleting, the distributor information's which are available in the INSTANCE1 are not deleted. It throws the following error while disabling the publication and distribution wizard:

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

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

Named Pipes Provider: Could not open a connection to SQL Server [53].
Changed database context to 'MyDatabase '.
OLE DB provider "SQLNCLI10" for linked server "repl_distributor" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "repl_distributor" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.". (Microsoft SQL Server, Error: 53)

------------------------------
Is there is any way to delete all and to reconfigure it again from the start?

Vinesh Senthilvel

my subscriptions cannot sync

$
0
0

hi

I recently created replication and some of subscriptions are in error state and when i want to sync :

TITLE: View Synchronization Status
------------------------------

The agent could not be started.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.0.5058.0&EvtSrc=Microsoft.SqlServer.Management.UI.ReplUtilitiesErrorSR&EvtID=CantStartAgent&LinkId=20476

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

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

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

SQLServerAgent Error: Request to run job C******-*****ting(from User ***\r*****) refused because the job is already running from a request by Start Sequence 0.
Changed database context to '*****'. (Microsoft SQL Server, Error: 22022)

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

Replication agents and primary keys

$
0
0

Dear experts,

Let's assume I have 3 different SQL Server instances set up to participate in transactional  replication, Instance A will be a subscriber to instance B and C (B and C are the publishers). If transactional replication are set up as Pull subscription does it mean there will be 3 replication agents running on Instance A?

Also, to avoid conflict in primary keys I am evaluating the use of GUIDs with the Uniqueidentifiers data type...those anyone has experience in using this fields within transactional replication or what are the options to avoid primary key conflict in transactional replication.

Thanks


Transactional Disaster Recovery for VLDBs

$
0
0

Dear Expert,

I am looking for an effective approach for disaster recovery transactional replication for the given scenario below

We have 3 separate geographical sites (site 1(Publisher), site 2(subscriber) and site 3 (subscriber))connected via a WAN Link with One publisher and 2 subscribers.

Let's assume there is a storage issue on the Publisher (SAN busted), after getting back the SAN online and reconfigured the transactional replication set up on site 2 subscriber, but not able to reconfigure transactional replication on Site 3 because the network connectivity between site 1 and site 3 is down. Now the subscriber on site 2 has received new data in from the publisher, My question is, is site 3 able to catch up on the existing data from the publisher after getting back network access to site 3 or a faster method would be to do a back up and restore of the database from the publisher to site 3 to that it can in sync?

Also, the size of the database in is Terabytes.

Bidirectional Transactional Replication random loopback detection issues

$
0
0

Hi,

we have 2 sql server 2012 (one sp1 and another sp2) in bidirectional replication with loopback detection enabled. We have used server names (configured in Alias) for the subscriptions. Every replicated table has different identity range to avoid conflicts.

It works fine most of the time but randomly on the server with less activity the loopback detection fails and the server tries to replicate back the transactions and obviously causing some conflicts. This doesn't happens consistently but we have noticed that the last time happened after network issues (replication warnings tcp semaphore timeout).

On the distribution database where the issue happens i can see that suddenly the replicated commands doesn't have an originator and after some time it reappears but in the meantime the transactions without originator already caused some conflicts

Query to change the replication Article properties

$
0
0

Hi,

I need a sample SQL query or script to change the article properties in SQL server transnational replication tables.

I have attached the sample page for reference where the changes need to be done.

Could you please help me with the query ?



Thanks,

Vinodh Selvaraj


The process could not execute 'sp_MSadd_replcmds' on 'dbname'

$
0
0
I ran a huge delete statement and replication went into critical mode... When I tried to restart the logreader I got the following message

The process could not execute 'sp_MSadd_replcmds' on 'dbname'

HELP!!! There is plenty of room on the disk... I have even tried to reinitialize the subscription, but still get the same message...

configuring the central subscriptions from 7 publications ?

$
0
0

Hi Team,

We got request to configure central subscription from 7 publishers with same columns. We tried different ways with out using the sanpshot and initialize from backup. Nothing helped.

Please guide me how can i create the replication.

Thanks in Advance for your time and efforts,


rup

Viewing all 4054 articles
Browse latest View live




Latest Images