SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Invalid object name 'syssubscriptions'- when running sp_removedbreplication 'dbname'


Invalid object name 'syssubscriptions'- when running sp_removedbreplication 'dbname'

Author
Message
mike-306849
mike-306849
SSC Journeyman
SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)

Group: General Forum Members
Points: 81 Visits: 118
First off, I'll say that I'm not sure who did what to this server before I got called about this - all I know is they were trying to remove transactional replication. I'm trying to run sp_removedbreplication on one of our databases and I keep getting this error back.

.Net SqlClient Data Provider: Msg 208, Level 16, State 1, Procedure sp_MSpublishdb, Line 110
Invalid object name 'syssubscriptions'.

I've tracked this down - I think - to this area of sp_MSpublishdb

EXEC @retcode = dbo.sp_dropsubscription @publication = 'all',
@article = 'all', @subscriber = 'all',
@ignore_distributor = @ignore_distributor

so I tried running sp_dropsubscription myself with @ignore_distributor = 1
And I think that is failing here

DECLARE hCdrop_subscription1 CURSOR LOCAL FAST_FORWARD FOR
SELECT DISTINCT srvname
FROM master..sysservers a, syssubscriptions b
WHERE srvstatus & @subscriber_bit <> 0
AND a.srvid = b.srvid

Now when I first started looking at this, syssubscriptions was gone. I had a an old backup of the database though with that table in there, no rows but the structure was right. So I created the table and am still getting this message that Syssubscriptions is missing. I can run this

SELECT DISTINCT srvname
FROM master..sysservers a, syssubscriptions b
WHERE srvstatus & @subscriber_bit <> 0
AND a.srvid = b.srvid

just fine. I get no rows back, but it runs no problem.

Has anyone run into this?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search