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

Merge Replication with SQL Server 2012 and 2008 R2 Express

$
0
0

Hello,

I have a standard SQL Server installation of 2012 with a Merge Publication on a server (win2008).  I have a laptop with sql 2008 R2 express installed.  When trying to create a subscription to the 2012 publication, I get an error message "For merge publication, the version of the subscriber must not exceed the version of the Publisher".  However, I am not.  The subscriber is 2008 R2, and the publisher is 2012.  Any ideas?


Cannot insert explicit value for identity column in table TABLENAME when IDENTITY_INSERT is set to OFF.

$
0
0
MY PUBLISHER/DISTRIBUTOR SERVER

Microsoft SQL Server  2000 - 8.00.2039 (Intel X86)
 May  3 2005 23:18:38
 Copyright (c) 1988-2003 Microsoft Corporation
 Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
SERVER NAME = A

MY SUBSCRIBER
Microsoft SQL Server  2000 - 8.00.194 (Intel X86)
 Aug  6 2000 00:57:48
 Copyright (c) 1988-2000 Microsoft Corporation
 Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4)

PROBLEM -

I have implemented Transactional Replication with push subscriber

Distribution Agent FAILS with error

Cannot insert explicit value for identity column in table 'Tbl_ReceiptInterface' when IDENTITY_INSERT is set to OFF.

Kindly Suggest ASAP.

Thanks in advance

Deleting a publication hanging

$
0
0

I am trying to delete a publication and it is hanging. It has its subscriptions deleted already. I am using SQL Server 2005. When I check in the activity monitor, I see that it has a wait type of 'OLDEDB". Can anyone please let me know what might be the reason it is hanging?

Thanks



Raj

Replicate data from multiple databases to a single database

$
0
0

This is the first time I am working on SQL replication (without an expert). I plan to replicate multiple tables from multiple databases/servers to a single database as lookup resource (one way replication). I want to do that because this will simplify our application development. We only need one connect setting to access all tables. However, I do not know if this is doable. If answer is “Yes”, what is the best (or simple approach). Please provide details if it is possible.

Many thanks.

Server Replication from different locations to Central Database

$
0
0

Hi,

I Have a web based system deployed in 3 different locations(Areas) and a Central Database. Currently all 3 areas are connected to my central database. Currently I'm having issues with my network to other areas time to time.

I'm planning to setup different DB servers on my other areas and allow area workstations to work on area DB while the network is down and replicate data back to my central DB when the network is up.

My system is developed using asp.net and my database is a MS SQL 2005 DB.

currently I'm not having good knowledge regarding replication. pls help me with this issue.

Thanks and Regards,

Chama

spAddMergeSubscription fails with subscription already exists

$
0
0

When executing sp_addMergeSubscription it fails with the error 

    exec sp_addmergesubscription @publication = 'ArizonaCASH_Pub'
	    , @subscriber = 'BALE-S1'
	    , @subscriber_db = 'ArizonaCASH'
	    , @subscription_type = N'Push'
	    , @sync_type = N'None'
	    , @subscriber_type = N'local'
	    , @subscription_priority = 75
	    , @description = null
	    , @use_interactive_resolver = N'False'
	    , @hostname = 'some_guid'
	    ;

Msg 14058, Level 16, State 1, Procedure sp_addmergesubscription, Line 381
Cannot create the subscription because the subscription already exists in the subscription database. Only one subscription to the same publication is allowed in each subscription database. Drop the subscription and add it again if necessary. If the problem persists, replication metadata might be incorrect; see Books Online for troubleshooting information.

Tried to run sp_dropmergesubscription with the proper parameters (tried ignoredistributor = 1 ), it completes instantly without error. 

exec dbo.sp_dropmergesubscription 
	  @publication = 'ArizonaCASH_Pub' 
	, @subscriber = 'BALE-S1'
	, @subscriber_db = 'ArizonaCASH'
	, @subscription_type = 'All' 
	, @ignore_distributor = 1 

At the subscriber I already ran sp_removeDbReplication in the subscriber database, there appear to be no replication objects left there. A select from sysobjects returns nothing like msmerge% 

At the publisher, the failed attempt at sp_addMergeSubscription appears to write lines in sysmergesubscriptions (for this subscriber). I removed those lines manually and retried to add the subscription with the same result. 

Any ideas why this is happenning ? This is a prod box, of course none of this garbage ever happenned in test :( 

The ultimate solution for me would be to drop all subscribers, nuke the publication, recreate it and re-add all the subscribers. I know there is powershell for that but if it can be avoided... 

Forgot to mention both publisher and subscriber are 2008R2, Enterprise for the Publisher, Workgroup for the subscriber.




SQL Server replication question

$
0
0
Hello, I have a SQL database on which mirroring is already setup to get mirrored on to another server. Now I want to setup transactional replication on the Principal db to a different server, can I set up transactional replication on a Principal db which is already getting mirrored to another server? Thanks. 

sqldev

secondary database status out of sync in Log shipping 2008?

$
0
0

Hi All,

In my environment we have a logshipping configured database .

Issue : I have  checked the logshipping configured servers ,Backup,copy and restore jobs are running fine with out failure but database was in out of sync .

please help me on above issue....

Thanks in Advance....


RAM


Trying to figure out Merge Replication using SQL Server 2008r2 Express

$
0
0

I am trying to create a duplicate copy of seven tables in a database.  The destination database will reside on a different server in another city of the state and the database will have a different name and is running SQL Server 2008 R2 Enterprise Edition.  One of the purposes of the destination database is to keep historical data so the source database can have old data deleted to free up space (The source database is a SQL Server 2008 R2 Express edition).  The source database has an application that inserts statistical data all day long (I believe 24 hours - 3 shifts).  They want current data but not necessarily real time in the destination, maybe backuped or refreshed every hour or less.  I believe an hours worth of data that is added to each source table is between 1000 and 2000 records.  There may be some updates (changes to existing data).  Currently, each source table has around 2,000,000 records.

I have been trying to get Merge Replication to work with no success or limited. I have set up the publisher and distributor on SQL Server 2008r2 Developer Edition on a Windows 2008r2 Server.  The subscriber is set up on Window 7 workstation with SQL Server 2008r2 Express edition.  I got it to work once and it copied the records on the workstation(subscriber) to the server(publisher) as desired.  When I try to insert more records in the workstation(subscriber) database I get the error: 

Msg 20092, Level 16, State 1, Procedure MSmerge_disabledml_07E55899B2884365B7E0F3A2ED1761F4, Line 8

Table '[dbo].[Ci_Results]' into which you are trying to insert, update, or delete data is currently being upgraded or initialized for merge replication. On the publisher data modifications are disallowed until the upgrade completes and snapshot has successfully run. On subscriber data modifications are disallowed until the upgrade completes or the initial snapshot has been successfully applied and it has synchronized with the publisher.

Msg 3609, Level 16, State 1, Line 10

The transaction ended in the trigger. The batch has been aborted.

I have run sp_adjustpublisheridentityrange,  the snapshot agent, and the merge agent.  I still get the same error.

Thanks for any help,

Fred


Fred Schmid

Access Denied to SQL Replication Snapshot folder

$
0
0

 I have a SQL server 2008 installed, Transactional(PULL) Replication has been implemented der,everthng was working fine but suddenly snapshots are failing to generate.When I execute the snapshot agent it shows me error that,

Access to the path 'path of a snapshot folder' is denied.

snapshot folder is shared to everyone with all securities,I can access the path through run.Folder is shared to SQL agent and main SQL service.

ANY HELP........?

Detach published database from one server and attach to another

$
0
0

Hello,

I need to move the replicated database from publisher to another server. It is on SQL 2008 Ent Edition. The server name will be different.

Do I have to drop publications (they will refer the old server name)?

Do I stop distribution agent and log reader agent?

Do I migrate Distribution database?

Do I disable database for replication to be able to detach and attach?

Please help

Thanks,


Reinitialize a Merge subscription without uploading first

$
0
0

Hi,

We had many conflicts and I did multiple article changes. I wanted to reinitialize all the subscriberswithout uploading data from subscribers first. I created a new snapshot and every time I reinitialize a subscriber I leave the "upload changes" textbox unchecked. But as soon as the process start I see subscribers uploading data on the server (there are a few bidirectional articles in the database but most are download only).

Anyone has a clue on how this can happen? Unless I missed something I couldn't find anything in the BOL and when I try to search here and on the web I get result from people having the opposite effects (uploads doesn't work).

Regards,

Michel

Merge replication issue

$
0
0

Hello all,

Error:

The merge process was the unable to deliver to the snapshot to the subscriber. If using web synchronization. the merge process may have unable to create write to the merge file when troubleshooting restart the synchronization with verbose history log

Error: 14151, severity: 18, State 1.

Please suggest me how to resolve this issue

 

Transactional replication issue

$
0
0

SQLServerAgent Error: Request to run job SG4-SQLSYMPSCR-Symphony_Reporting-symphony_reporting_21-WPCSQLSVR01\M1SQL-266 (from User EMRSN\SG4FFSQL.Service) refused because the job is already running from a request by User sa.
Changed database context to 'Symphony_Reporting'. (Microsoft SQL Server, Error: 22022)

How do I restore cluster database using a backup file(.bak)

$
0
0

I have a clustered database(sql server 2008 and sql server 2008 r2) that is in production environment(data is updated in both database at the same time)

I would like to restore the data from the backup file to both databases with minimal downtime

How do I go about doing this?



' CDC_capture ' job failed to capture converted ntext to nvarchar(max) columns

$
0
0

Hi Everyone..,

my sql server version is 2008r2 RTM package running on Windows machine 2008R2

I have enabled CDC on a Database with selected tables, it was perfectly working fine,today due to some reason i converted Ntext column to Nvarchar(max) using Alter command , the same it got reflected to CDC table.

After that i inserted some records into that Changed schema table but couldn't get reflected into CDC table.for reason then i checked up with CDC_capture Job 'View History' and getting the following error.

Following is the Error Log :

10/30/2013 18:24:17,cdc.Live_ProdDB_CDC_capture,In Progress,,,cdc.Live_ProdDB_CDC_capture,,,In progress,00:09:38.8330000,,,,,,

10/30/2013

18:23:08,cdc.Live_ProdDB_CDC_capture,Retry,2,HOME\SQL08R2,cdc.Live_ProdDB_CDC_capture,Change Data Capture Collection Agent,,Executed as user: NT AUTHORITY\SYSTEM. Could not locate text information records for the column "ResumeConvertedText"<c/> ID 29 during command construction.[SQLSTATE 42000] (Error 18773)  The Log-Scan Process failed to construct a replicated command from log sequence number (LSN) {0019e6fb:0000091b:01b9}. Back up the publication database and contact Customer Support Services. [SQLSTATE 42000] (Error 18805)  Log Scan process failed in processing log records. Refer to previous errors in the current session to identify the cause and correct any associated problems. [SQLSTATE 42000] (Error 22859),00:00:01,16,22859,,,,9

10/30/2013

18:14:04,cdc.Live_ProdDB_CDC_capture,Error,2,HOME\SQL08R2,cdc.Live_ProdDB_CDC_capture,Change Data Capture Collection Agent,,Msg 22859<c/> Level 16<c/> State 2<c/> Log Scan process failed in processing log records.

Refer to previous errors in the current session to identify the cause and correct any associated problems. For more information<c/> query the sys.dm_cdc_errors dynamic management view.,00:00:00,16,22859,,,,0

10/30/2013

18:22:08,cdc.Live_ProdDB_CDC_capture,Retry,2,HOME\SQL08R2,cdc.Live_ProdDB_CDC_capture,Change Data Capture Collection Agent,,Executed as user: NT AUTHORITY\SYSTEM. Could not locate text information records for the column "ResumeConvertedText"<c/> ID 29 during command construction. [SQLSTATE 42000] (Error 18773)  The Log-Scan Process failed to construct a replicated command from log sequence number (LSN) {0019e6fb:0000091b:01b9}. Back up the publication database and contact Customer Support Services. [SQLSTATE 42000] (Error 18805) 

Log Scan process failed in processing log records. Refer to previous errors in the current

session to identify the cause and correct any associated problems. [SQLSTATE 42000] (Error

22859),00:00:00,16,22859,,,,8

10/30/2013

18:14:04,cdc.Live_ProdDB_CDC_capture,Error,2,HOME\SQL08R2,cdc.Live_ProdDB_CDC_capture,Change Data Capture Collection Agent,,Msg 22859<c/> Level 16<c/> State 2<c/> Log Scan process failed in processing log records. Refer to previous errors in the current session to identify the cause and correct any associated problems. For more information<c/> query the sys.dm_cdc_errors dynamic management view.,00:00:00,16,22859,,,,0

10/30/2013

Following things i troubleshooted :

1.Disable & enabled CDC_capture.

2.restarted sql server agent. (running fine)

Can anyone tell me is there problem in capturing Nvarchar(max) columns for the CDC. and please suggest me some ways and

Thanks in advance & highly appreciated with feedback.

VSS SQLWriter Fails with Non-Retryable Error

$
0
0

Hi,

I'm running 3rd party backup software (AppAssure) on a SQL Server of mine running SQL Server 2008 R2 64 bit. 

The backups keep failing telling me I have a VSS Writer error, specifically the SQLWriter, I have checked the machine and the SQLWriter is reporting a failed state with a Non-Retryable error. I don't want to disable it as I have read that the SQLWriter enables the 3rd party software to gather the required SQL info for backup and if I have a backup of a SQL Server with no SQL information on it then it could be pretty useless.

Is there a way that I can fix the SQLWriter and keep it enabled?

Thanks in advance.

Cody

Applying initial snapshot, primary key violation

$
0
0

Hi,

I'm setting up transactional replication on SQL 2008 to another SQL 2008 instance.  It is a push subscription.  I've gotten two smaller databases to work, but the two large databases are giving me trouble.  There is a large table that is getting this error on the last .bcp file:

2013-11-12 21:35:24.041 Agent message code 20037. The process could not bulk copy into table '"dbo"."FACT_TABLE"'.
2013-11-12 21:35:24.106 Category:NULL
Source:  Microsoft SQL Server Native Client 10.0
Number:  
Message: Batch send failed
2013-11-12 21:35:24.114 Category:NULL
Source:  Microsoft SQL Server Native Client 10.0
Number:  2627
Message: Violation of PRIMARY KEY constraint 'PK_FACTX'. Cannot insert duplicate key in object 'dbo.FACT_TABLE'.
2013-11-12 21:35:24.116 Category:NULL
Source:  Microsoft SQL Server Native Client 10.0
Number:  20253
Message: To obtain an error file with details on the errors encountered when initializing the subscribing table, execute the bcp command that appears below.  Consult the BOL for more information
 on the bcp utility and its supported options.
2013-11-12 21:35:24.118 Category:NULL
Source:  
Number:  20253
Message: bcp "DataWarehouseDatabase"."dbo"."FACT_TABLE" in "X:\repl\xxx\FACT_TABLE_142#48.bcp"
 -e "errorfile" -t"\n<x$3>\n" -r"\n<,@g>\n" -m10000 -DestServer -T -w

As you can see, this is the 48th .bcp file.  1-20 or so are about 60MB, then 20-47 are 0KB.  I thought seemed odd.

I tried to run the bcp command and get no errors, no error output to file and 0 rows copied.  

I then ran the .pre script, and the .sch script and then tried to run the #1.bcp file - same result with 0 rows.  

I checked the article properties to make sure it is dropping the object before creation and it seems to be set correctly.  I didn't modify anything from default settings.

I have the same behavior for another large table in another similar database.  Any suggestions?  Thanks!!!



Replication does not work

$
0
0

I am not a SQL guy and with only with limit knowledge of SQL. I have two servers with MS SQL 2008 R2 installed. I need to replicate:

      table X                TO         table X           

      database I                        database J

      server A                           server B

I created distribution database and a publication in server A. Then created a subscription in server B. Use the same AD account with "sysadmin" role in both servers for both publication and subscription. There is no error in all processes. In the "View Synchronization Status" window in server B, there is a message "Job ........ started successfully". However, it is 0% in the "Synchronization in Progress" bar after about a hour? There is no table X created in database J in server B. I know there is an option to create a new database instead of select a existing database during the subscription set up. Do I need to manually create table X in the existing database J or select "Create new database" to create a new database I in server B?

I really appreciate any help. Many thanks.

Snapshot replication drop indexes SQL 2008R2

$
0
0

hi,

  I setup snapshot replication for table. In article properties I set copy for indexes to false. After executed synchronization in subscription table indexes were drop. Is it possible to save indexes? Indexes are different then in publication table.

I can write short script and execute it after synchronization but I'm looking for another solution.

Regards

Jacek


Best regards Jacek

Viewing all 4054 articles
Browse latest View live




Latest Images