Wednesday, March 7, 2012
delete unnecessary agents
there are many "dead" agents (snapshot, protocoll,distribution) in my
enterprise manager of deleted replications ... how can i delete these
agents as well?
thx for help
Alex
has nobody an answer?
"Alexander Widera" <awid@.hrz.tu-chemnitz.de.invalid.de> schrieb im
Newsbeitrag news:e6QVJs7eFHA.3836@.tk2msftngp13.phx.gbl...
> hello,
> there are many "dead" agents (snapshot, protocoll,distribution) in my
> enterprise manager of deleted replications ... how can i delete these
> agents as well?
> thx for help
> Alex
>
Saturday, February 25, 2012
DELETE transaction with SNAPSHOT isolation level - conflicts another table
Hi,
we are executing the following query in a stored procedure using snapshot isolation level:
DELETE FROM tBackgroundProcessProgressReport
FROM tBackgroundProcessProgressReport LEFT OUTER JOIN
tBackgroundProcess ON
tBackgroundProcess.BackgroundProcessProgressReportID =tBackgroundProcessProgressReport.BackgroundProcessProgressReportID LEFTOUTER JOIN
tBackgroundProcessProgressReportItem ON
tBackgroundProcessProgressReport.BackgroundProcessProgressReportID =tBackgroundProcessProgressReportItem.BackgroundProcessProgressReportID
WHERE (tBackgroundProcess.BackgroundProcessID IS NULL) AND
(tBackgroundProcessProgressReportItem.BackgroundProcessProgressReportItemID IS NULL)
The query should delete records from tBackgroundProcessProgressReport which are not connected with the other two tables.
However, for some reasone we get the following exception:
System.Data.SqlClient.SqlException:Snapshot isolation transaction aborted due to update conflict. Youcannot use snapshot isolation to access table 'dbo.tBackgroundProcess'directly or indirectly in database 'RHSS_PRD_PT_Engine' to update,delete, or insert the row that has been modified or deleted by anothertransaction. Retry the transaction or change the isolation level forthe update/delete statement.
The exception specifies that we arenot allowed to update/delete/insert records in tBackgroundProcess, butthe query indeed deletes records from tBackgroundProcessProgressReport,not from the table in the exception.
Is the exception raised because of the join?
Has someone encountered this issue before?
Thanks,
Yani
Hi,
it looks like this forum is not the best place to ask, since it's dedicated to asp.net
So anybody with idea where i could ask for a solution for my problem?
Thanks in advance!
Friday, February 24, 2012
Delete Snapshot Replication
When I try to drop the publication in this order:
exec sp_dropsubscription @.publication = @.publicName, @.subscriber = @.servName, @.article = N'all'
exec sp_droppublication @.publication = @.publicName
I am getting the following error after dropping the publication
Msg 16943, Level 16, State 4, Procedure sp_MSrepl_changesubstatus, Line 1271
Could not complete cursor operation because the table schema changed after the cursor was declared.
Msg 16943, Level 16, State 4, Procedure sp_MSrepl_changesubstatus, Line 1271
Could not complete cursor operation because the table schema changed after the cursor was declared.
Could anyone give me a suggestion about how to avoid this error?
Thanks!
Which if the above two stored procs is raising the error, and what version of sql server are you running?|||The error is raised when trying to delete the publication with:
exec sp_droppublication @.publication = @.publicName
I am working with SQL Server 2005, service pack 1.
I hope with this information you can help me, or else please let me know.
Thanks!
|||this is a dumb suggestion, rather a shot in the dark, but can you stop/start the sql server service, and then try it again? Something about transactions/cursors that may be stuck/lingering somewhere?|||I tried that already. I finally got to work the deleting of the publication, but the error remains as reported earlier. I am thinking this is a 'MS bug' that has not been totally fixed since SQL Server 7... pretty sad, huh? If still anyone has any idea what to do, please let me know.
Thanks!
|||If you can provide a full repro of the problem, it would help us tremendously. If you can reproduce it from scratch, please post the TSQL code, otherwise this issue has been intermitent throughout the years, nothing solid for us to fix.
Other questions - are you wrapping this in a transaction? What's the db compat level? How many subscriptions are there?
Delete Snapshot Replication
When I try to drop the publication in this order:
execsp_dropsubscription @.publication = @.publicName, @.subscriber = @.servName, @.article = N'all'
exec sp_droppublication @.publication = @.publicName
I am getting the following error after dropping the publication
Msg 16943, Level 16, State 4, Procedure sp_MSrepl_changesubstatus, Line 1271
Could not complete cursor operation because the table schema changed after the cursor was declared.
Msg 16943, Level 16, State 4, Procedure sp_MSrepl_changesubstatus, Line 1271
Could not complete cursor operation because the table schema changed after the cursor was declared.
Could anyone give me a suggestion about how to avoid this error?
Thanks!
Which if the above two stored procs is raising the error, and what version of sql server are you running?|||The error is raised when trying to delete the publication with:
exec sp_droppublication @.publication = @.publicName
I am working with SQL Server 2005, service pack 1.
I hope with this information you can help me, or else please let me know.
Thanks!
|||this is a dumb suggestion, rather a shot in the dark, but can you stop/start the sql server service, and then try it again? Something about transactions/cursors that may be stuck/lingering somewhere?|||I tried that already. I finally got to work the deleting of the publication, but the error remains as reported earlier. I am thinking this is a 'MS bug' that has not been totally fixed since SQL Server 7... pretty sad, huh? If still anyone has any idea what to do, please let me know.
Thanks!
|||If you can provide a full repro of the problem, it would help us tremendously. If you can reproduce it from scratch, please post the TSQL code, otherwise this issue has been intermitent throughout the years, nothing solid for us to fix.
Other questions - are you wrapping this in a transaction? What's the db compat level? How many subscriptions are there?