I am trying to get rid of a table that a former employee created... it is li
sed as a system table. When I try to delete it I get an error telling me I
cannot drop a system table. How can I get rid of it?
Thanks for your help.I assume the table in question was change to xtype 'S' by hacking the
sysobjects table. If you are certain this is a user table, you can change
it back to 'U' and drop it using a script like the example below:
EXEC sp_configure 'allow',1
RECONFIGURE WITH OVERRIDE
GO
UPDATE sysobjects
SET xtype = 'U'
WHERE name = 'MyTable'
GO
DROP TABLE MyTable
GO
EXEC sp_configure 'allow',0
RECONFIGURE
GO
Hope this helps.
Dan Guzman
SQL Server MVP
"dev@.mycompany.com" <devmycompanycom@.discussions.microsoft.com> wrote in
message news:86FCAF98-480C-424B-A281-BF56625B7C2C@.microsoft.com...
> I am trying to get rid of a table that a former employee created... it is
lised as a system table. When I try to delete it I get an error telling me
I cannot drop a system table. How can I get rid of it?
> Thanks for your help.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment