Solved

Replication error

Posted on 2013-01-04
6
868 Views
Last Modified: 2013-01-15
Hi,


I have a scheduled SQL ETL job which has a stored procedure ,but it keeps on failing due to below error.

Message
Executed as user: domain/user. Schema change failed on object '[dbo].[tablename]'. Possibly due to active snapshot or other schema change activity. [SQLSTATE 42000] (Error 21386).  The step failed.

This table is also getting replicated(transactional replication) to our reporting server.

Please advise....
0
Comment
Question by:Sonali Paradkar
  • 3
  • 2
6 Comments
 
LVL 42

Accepted Solution

by:
EugeneZ earned 500 total points
ID: 38745493
can you please post your replication topology? is it using sql2000?

if yes

http://www.microsoft.com/technet/support/ee/transform.aspx?ProdName=SQL%20Server&ProdVer=2000.80.760.0&EvtID=21386&EvtSrc=MSSQLServer&LCID=1033

Explanation
For certain replication operations, such as adding or dropping a column, the replication process must ensure that no snapshot process is performing work on the specified publication. This message indicates that the attempt to get an application lock via sp_getapplock on the specified publication for the exclusive operation failed because either a Snapshot Agent is working on the specified publication or another schema change is being performed from another connection.
   
User Action
Before executing the replication process, stop all Snapshot Agents for the specified publication. Verify that no one else is currently executing sp_repladdcolumn or sp_repldropcolumn for the specified publication.
0
 

Author Comment

by:Sonali Paradkar
ID: 38745632
The replication is between two  servers on SQL 2008 .
The ETL logic is in the form of a stored procedure which is scheduled to run every hour..
0
 
LVL 42

Expert Comment

by:EugeneZ
ID: 38745649
did you check my post?
btw: in what compatibility mode your replicated DB? 2000 or 2008?
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:Sonali Paradkar
ID: 38745702
Compatibilty level is 100 both on publisher and subscriber end
0
 
LVL 42

Expert Comment

by:EugeneZ
ID: 38746045
ok - it is time to post the code\ changes are you doing to this table
as you should know --replicated tables have some limitations ..
0
 
LVL 15

Expert Comment

by:Anuj
ID: 38750487
Did you made any schema changes at the subscriber? the changes at subscriber could cause replication to fail.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server 2012 - Merge Replication Issue 1 23
date diff with Fiscal Calendar 4 31
Help in Bulk Insert 9 35
Rename a column in the output 3 14
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question