SQL数据库用户无法删除的处理

SQL数据库用户无法删除的处理

Use <database>
sp_configure 'allow updates',1 -- To permit alter system tables
go
reconfigure with override
go
delete from sysusers where name='guest'
go
sp_configure 'allow updates',0 -- To deny alter system tables
go
reconfigure with override
go

数据库的修复

USE MASTER
GO
sp_dboption ’你的数据库名’, ’single user’, ’true’
Go
DBCC CHECKDB(’你的数据库名’, REPAIR_REBUILD)
Go
USE 你的数据库名
go
exec sp_msforeachtable ’DBCC CHECKTABLE(’’?’’,REPAIR_REBUILD)’
go
sp_dboption ’你的数据库名’, ’single user’, ’false’
Go

一次性更改数据库中某一个字段的长度


sp_configure 'allow updates',1

RECONFIGURE WITH OVERRIDE

update syscolumns set length='13' where name='icno'

你可能感兴趣的:(sql,Go)