I have a publication on Sql Server 2012 that uses transactional replication to 7 subscribers (these are a mix of Sql Server 2008R2 and Sql Server 2012). Last night I scheduled the Snapshot job to run to "re-publish" the database to the subscribers. I had a few new table to push down. Unfortunately the snapshot job became the deadlock victim. Now updates to the publisher are not being sent to the subscribers.
Short of rerunning the snapshot job, is there a way to repair the replication so the updates to the publisher are pushed to the subscribers? The "re-publish" can only be run overnight when there is very little impact to users.
Bill Soranno
MCP, MCTS, MCITP DBA
Database Administrator
Winona State University
Maxwell 143
"Quality, like Success, is a Journey, not a Destination" - William Soranno '92
We have two SQL Server 2005 production DB at remote sites. Due to network bandwidth issue, we need to replicate these DBs (publishers and distributers) to central corporate SQL 2000 DB (subscriber for backup and possible reporting (and in rare case as a failover server).
We would start out with backup from SQL 2000 db restored on remote SQL 2005 DBs. When we have DB issue on remote 2005 DB, we want to restore it from central corp. 2000 DB backup. Since two DBs are replicating to central DB, we DO NOT want combined db back up data on restored remote 2005 db. We can restore the db and delete unwanted data before we turn on replication from this restored server. So, this is not a problem.
The real problem is how to avoid snapshot replication (during initialization) when we create a transaction replication on this restored server to avoid over writing data on the central subcriber sql 2000 DB???
I'm converting an existing production replication process to SQL 2005 for testing. My snapshot for a merge replication is failing.
Environment: Single XP server, no filters, @schema_option = 0x000000000C034DD1
I have several snapshot jobs in my process, 2 for transactional replication and 2 for merge replications. In both types, I'm replicating from A to B and then from B to C. In the failing job, I'm merge replicating from B to C. In this failing snapshot job, the error messages are:
2006-03-01 18:42:17.22 [58%] Bulk copying snapshot data for article 'MyName1' 2006-03-01 18:42:17.34 [58%] Bulk copied snapshot data for article 'MyName2' (0 rows). 2006-03-01 18:42:17.41 [58%] Bulk copied snapshot data for article 'MyName1'(195 rows). 2006-03-01 18:42:29.84 [61%] Discovering dependencies among article objects in the specified publication 2006-03-01 18:42:33.66 [61%] The replication agent had encountered an exception. 2006-03-01 18:42:33.66 Source: Unknown 2006-03-01 18:42:33.66 Exception Type: Microsoft.SqlServer.Management.Smo.FailedOperationException 2006-03-01 18:42:33.66 Exception Message: Discover dependencies failed. 2006-03-01 18:42:33.66 Message Code: Not Applicable 2006-03-01 18:42:33.66
Does anyone have an idea what I could look for to try and fix this?
The A to B snapshot obviously uses the same tables. My snapshot for merge job (which worked) messages for the A to B snapshot are:
Message 2006-03-01 18:40:24.98 Time spent analyzing foreign key references (seconds): 0.00 2006-03-01 18:40:24.98 Time spent analyzing check and default constraint references (seconds): 0.19 2006-03-01 18:40:24.98 Time spent analyzing non-article object dependencies (seconds): 0.42 2006-03-01 18:40:24.98 Time spent preparing snapshot generation (seconds): 35.49 2006-03-01 18:40:24.98 Time spent generating merge replication procedures (seconds): 41.39 2006-03-01 18:40:24.98 Time spent generating merge replication stored procedure scripts for subscribers (seconds): 20.66 2006-03-01 18:40:24.98 Time spent bulk copying data (seconds): 1.25 2006-03-01 18:40:24.98 Time spent copying/compressing generated file (seconds): 0.00 2006-03-01 18:40:25.00 Time spent adding rowguid columns/creating merge triggers (seconds): 1.38 2006-03-01 18:40:25.00 Time spent posting snapshot commands (seconds): 25.97 2006-03-01 18:40:25.00 *******************************************************************************
I kicked off the job again and got a different error message:
Message 2006-03-01 19:17:30.32 --------------------------------------------- 2006-03-01 19:17:30.32 -BcpBatchSize 100000 2006-03-01 19:17:30.32 -HistoryVerboseLevel 2 2006-03-01 19:17:30.32 -LoginTimeout 15 2006-03-01 19:17:30.32 -QueryTimeout 1800 2006-03-01 19:17:30.32 --------------------------------------------- 2006-03-01 19:17:30.32 Connecting to Publisher 'xxx-xxxxxxxx' 2006-03-01 19:17:30.34 Publisher database compatibility level is set to 90. 2006-03-01 19:17:30.36 Retrieving publication and article information from the publisher database 'xxx-xxxxxxxx.xxxxxxxxx' 2006-03-01 19:17:30.54 [0%] The replication agent had encountered an exception. 2006-03-01 19:17:30.54 Source: Replication 2006-03-01 19:17:30.54 Exception Type: Microsoft.SqlServer.Replication.ReplicationAgentSqlException 2006-03-01 19:17:30.54 Exception Message: Data is Null. This method or property cannot be called on Null values. 2006-03-01 19:17:30.54 Message Code: 52006 2006-03-01 19:17:30.54
Process to create snapshot failed (twice per day snapshot of the database is being created for some people to work on). Morning snapshot worked fine but the afternoon one failed. The snapshot is being created from Mirror database. I used this code:
CREATE DATABASE [DB_snapshot] ON (name = N'DB',filename = N'D:SnapshotDB.SQLSnapshot' ) ,(name = N'indexes',filename = N'D:SnapshotDB_indexes.SQLSnapshot' ) AS SNAPSHOT OF DB
And the error message i get
Msg 1823, Level 16, State 6, Line 1 A database snapshot cannot be created because it failed to start. Msg 1823, Level 16, State 7, Line 1 A database snapshot cannot be created because it failed to start. Msg 3456, Level 21, State 1, Line 1 Could not redo log record (202011:19306:2), for transaction ID (0:0), on page (1:1823948), allocation unit 281474979397632, database 'DB_snapshot' (database ID 6). Page: LSN = (201954:220201:1), allocation unit = 281474979397632, type = 1. Log: OpCode = 4, context 18, PrevPageLSN: (202010:23679:1). Restore from a backup of the database, or repair the database. Msg 3313, Level 21, State 1, Line 1
During redoing of a logged operation in database 'DB_snapshot', an error occurred at log record ID (202011:19306:2). Typically, the specific failure is previously logged as an error in the Windows Event Log service. Restore the database from a full backup, or repair the database.
What might be causing this error? Mirroring seems to be working OK. status is "Synchronized"
I built a number of publications on a SQL Server 2005 box to replicate to a SQL Server 2012 subscriber. All the publications except one are fine. During the snapshot phase of schema script generation I get Script Failed for Table 'dbo.MediaDisplayLibraryFileData'. From the Replication monitor for the Snapshot Agent on the Publication I get, "Column FileData in object MediaDisplayLibraryFileData contains type VarBinaryMax, which is not supported in the target server version, SQL Server 2000." This message makes no sense since the target server version is 2012. I have even checked that the compatibility level was set to 110 before I started the process of setting up replication. How do I resolve this error?
We have a vendor that is exposing our database via a High Availability replica. They are geographically far away from us though so we would like to extract portions of the database over to our side for our reporting /warehousing purposes. I was curious if it is possible to setup snapshot replication on a high availability group?
We had a siutation last night in our production environment that forced us to revert back to an earlier version of the database (before a major code rollout that failed). After restoring the days full backup (with NORECOVERY), and then restoring a DIFF backup (FULL RECOVERY and had checked Preserve Replication Settings)...the transaction replication failed.
Message #1 The replication agent has been successfully started. See the Replication Monitor for more information.
Message #2 2011-03-04 15:07:17.566 Copyright (c) 2008 Microsoft Corporation 2011-03-04 15:07:17.566 Microsoft SQL Server Replication Agent: logread 2011-03-04 15:07:17.566 2011-03-04 15:07:17.566 The timestamps prepended to the output lines are expressed in terms of UTC time. 2011-03-04 15:07:17.566 User-specified agent parameter values:
[code]....
I've tried reinitializing the publication/subscription and while that took brand new snapshots and copied it over to the replicated data server, it did not fix the problem.I read from a different post that I could try running "sp_replrestart" but that ran for about a half an hour and didn't appear to do anything but fill up our log files...did I not wait long enough?
The only thing I know to do at this point is to drop the publication on the production server and rebuild it completely (and with all the tables we're replicating that would take quite a bit of time.
I wanted to schedule the transaction replication. How do I do it? Currently I have set up a transaction replication which runs continuously and synchronizes the changes with immediate effect.
I need to configure a replication which will gather logs from the publication once in a day.
Database is in simple recovery mode, and published with transaction replication push subscription, just one subscriber but the database is huge. I don't want to overwrite the schema at the subscriber either.
I had to run an alter database command on a published database, it created so many logs that an extra drive had to be added along with an extra log file to accommodate all the logs.
The problem I have is I'd like to know clear the file of logs so I can drop the temporary log file, and give the drive back, but I cannot.
I have tried dbcc shrinkfile with the emptyfile option but it never clears, I have also tried it with notruncate and truncateonly options (mainly out of desperation).
I do not need to worry about point in time restore as a full backup is taken before and after the operation. After which the database will be put back into Full recovery mode.
I have looked at log_reuse_wait_desc and the file says 'Replication', so I am now thinking the file cannot empty because replication is keeping one of the VLFs active. I tried dropping and recreating the subscription hoping it might free something up and I could get somewhere, but it made no difference.
Do I have to remove replication completely to get round this? Surely not.
I have also tried putting the database back into full recovery mode, doing a full DB backup, and a transaction log backup, but its made no difference, which is also what makes me think a portion of the log is still active because of replication, and perhaps the transactions have not gone through to the subscriber, which raises another question, why not?
I have not tried restarting SQL server, as I'd like to know a way out of this without having to do that, plus I do not think it would make any difference anyway.
I have a setup of transaction replication between one publisher and subscriber in the Same server.Now, I need to add a new subscriber to the existing publisher. So publisher database name is DB_A and Subscriber 1 name is DB_B. So the new subscriber will be DB_C. Is this kind of setup possible on one server?
If yes then at the time of reinitialization is it going to apply the snapshot on DB_B as well as DB_C?Also let say if due to disk error DB_B gets corrupted then will data be still replicated between DB_A and DB_C? (Assuming publisher, subscriber 1 and 2 are sitting on individual disks).
Setting up Transaction Replication in test environment. I am willing to bet that most of you take a production backup (if so, how, and using what?), restoring the database to your test environment, then running a snapshot to your subscriber and away you go.
But perhaps you take a backup of your publisher and subscriber, if so, how do you know there are no inconsistences because there were transactions sitting on the distributor?
What do you do if you have additional indexes on the subscriber for reporting, that are not on the publisher?
Here at work we are having issues with getting consistent databases set up with T Rep, missing rows, duplicate keys at subscriber etc. How to avoid these issues.
I'm using SQL Server 2012 Analysis services in Tabular mode and connected to Oracle Database and while importing, I'm getting below error after importing some rows.
OLE DB or ODBC error: Accessor is not a parameter accessor.. The current operation was cancelled because another operation in the transaction failed.
HI, I'm currently playing with snapshot replication between two 2k sql boxes. When the database is pushed to the subscriber the publication is applied it is possible to query the database between the data being dropped and being replaced.
Is it possible to have this process enclosed in a transaction so all selects on the subscriber are queued until it's complete?
I'm trying to start a new publication. When the snapshot agent runs, it stops on a table with the error "Bulk Copy Failed". If I remove the table from the publication, it just moves the error to the next table it tries to copy. What could cause a bulk copy to fail during a snapshot?
I am running RS 2005 and Analysis Services 2005. I was able to get RS to connect to the OLAP database (via stored credential) when generating snapshot. However, it failed when processing MDX script in the report dataset. The same report works fine in browser and VStudio, but only failed during snapshot or cache generation. Below is the error message and the affected MDX script. Any help would be appreciated!
An error has occurred during report processing. (rsProcessingAborted) Get Online Help Get Online Help
Query execution failed for data set 'PU_Floorcovering'. (rsErrorExecutingCommand) Get Online Help
Incorrect syntax near '{'. Incorrect syntax near 'Business Type'. Incorrect syntax near 'Facility'. Incorrect syntax near 'Production Units Reporting UOM'.
I'm finalizing our merge replication apps but we encountered some problem with the setup. We need to create a parameterized filter publication of 30+ articles. Most of the articles/tables contains large amount of existing data. One of them contains more than 20 millions records. during the creation of snapshot, the snapshot agent runs for a while and it will hang the process. The whole system cant seem to response anymore.
I tried on the other 25 articles with less data, everything was fine. is 20 million too much for snapshot?
When running the snapshot agent for a new publication I get the message:
Message: Query for data failed Stack: at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.ThrowNativeBcpOutException(CConnection* pNativeConnectionWrapper) at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.BcpOut(String strBcpObjectName, String strBcpObjectOwner, String strBaseBcpObjectName, Boolean fUnicodeConversion, String strDataFile, String strLoadOrderingHint, String strWhereClause) at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.BcpOut(String strBcpObjectName, String strBcpObjectOwner, String strBaseBcpObjectName, Boolean fUnicodeConversion, String strDataFile, String strLoadOrderingHint) at Microsoft.SqlServer.Replication.Snapshot.SqlServer.NativeBcpOutProvider.BcpOut(String strBcpObjectName, String strBcpObjectOwner, String strDataFile) at Microsoft.SqlServer.Replication.Snapshot.MergeContentsBcpOutWorkItem.DoWork(MergeSnapshotProvider snapshotProvider, IBcpOutProvider bcpOutProvider) at Microsoft.SqlServer.Replication.Snapshot.MergeContentsBcpOutThreadProvider.DoWork(WorkItem workItem) at Microsoft.SqlServer.Replication.WorkerThread.NonExceptionBasedAgentThreadProc() at Microsoft.SqlServer.Replication.WorkerThread.AgentThreadProc() at Microsoft.SqlServer.Replication.AgentCore.BaseAgentThread.AgentThreadProcWrapper() (Source: MSSQLServer, Error number: 0) Get help: http://help/0 Message: COLV_90_TO_80: Cannot convert parameter param1: Resulting colv would have too many entries. Stack: (Source: MSSQLServer, Error number: 20005) Get help: http://help/20005 Message: The statement has been terminated. Stack: (Source: MSSQLServer, Error number: 3621)
The database has another publication, that was created prior to upgrade to sql server 2005 from sql server 2000 sp4. This publication is working ok, and there are no problems when running the snapshot agent for this publication.
The publications are using filtered articles, and all properties for the publications are the same.
Any help to solve this problem will be much apreciated.
Create jobs to copy database and restore database in destination servers
------------ Robert at 5/7/2002 11:00:30 AM
Yes and I would rather not use dts to accomplish this task.
------------ Ray Miao at 5/7/2002 10:02:15 AM
Do you have direct network connection to remote server? Did you try dts?
------------ Robert at 5/7/2002 9:08:06 AM
I've been trying to replicate a database to an off site server using snapshot replication. It is scheduled to run every hour but I've noticed when data is changed at the source it never gets replicated to the destination. Does anyone know why?? I can't use transactional replication beause not all the tables have primary keys and they can't be added due to code. Some tables have id colunms and have been created with the Not for Replication option on the subscriber. Any help will be appreciated.
I can set up snapshot replication for those tables without foreign key constraints. But if there are foreign keys in the table, there will be error message indicating that this object can not be dropped because it is referenced by ....
1) In snapshot replication, can the subsciber send info back to the publisher (even in a manual process)
2) In snapshot replication, do we need a distributor set up between the publisher and subscriber if there will only be a single subscriber, or can we write directly to it?
We have a production server in East Coast (SQL Server 2000 SP2 - Database size is around 30 Gig). We have a reporting server is the West Coast. We need to replicate (transactional replication every one hour) from East coast to West coast. Is there any way that I can take a backup and restore upto the last transaction backup and then start replication agent on the production (by saying schema and data already exist). Basically we don't wan't to snapshot using FTP or bcp through WAN because it is going to be very slow.
If this is possible, will there be any validation problem.
Suppose i want to replicate data from server A to server B I am using snaphot replication.I did the snapshot replication for the first time and server B got a snapshot of server A.
Next time i run snapshot i want the incremental data to be replicated and not all..Is this possible in snapshot replication? If not which type of replication should i use?
Hi All,I have set up a snapshot replication, and schedule it to run everynight. The snapshot run successfully, and data get replicated to thesubscribed server. However, data do not get transfer as the second dayand there after. I check the job history, the job (distribution) runsuccessfully. I start the snapshot agent again, then data gettransferred. I can schedule the snapshot agent to run every night, butthis is just not the way it's supposed to be. Is there anyone out therecan give me some help. Thanks.
I am using SQL SERVER 2005 snapshot wizard to create snapshot. But as soon as i create a snapshot it takes away all the indexes and constraint for the tabels on the subscription end although i have this indexes and constraint on Publisher side.
Can someone help me in finding if their is some setting to create a snapshot without losing indexes and constraints or if their is some other way to do this.
Hi is that possible to configure replication in the following situation.
server A is built by snap of server B. Because i am able to create publisher on server B but i am unable to create same on server A.
could any one explain the situation, why it is happening this way.
any help is appriciated.
if you are curious what kind of error i got.
TITLE: Publisher Properties
------------------------------
An error occurred connecting to Publisher 'SERVER A'.
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.PubshrPropertiesErrorSR&EvtID=CantConnectToPublisher&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, 'SERVER B'. (Replication.Utilities)
I am looking forward at performing a SNAPSHOT REPLICATION between a 2000-Publisher and a 2005-Subscriber. But on following the wizard the latter is unable to recognize the publisher.
Could anyone help to let me know the possible reason or if there is some setting which i may have missed out?