方法先删除再重新建立
if exists (select * from dbosystypes where name = Ndt_ac_area)
exec sp_droptype Nssn
GO
setuser 默认是DBO
GO
EXEC sp_addtypeNdt_ac_area Nchar () Nnot null
GO
方法直接通过数据库全部山删除SRX的 User Defined Data Types:
USE master
go
EXEC sp_configure allow updates
go
RECONFIGURE WITH OVERRIDE
go
use t database name
go
begin transaction
delete systypes where uid=user_id(srx)
if @@rowcount<>
commit transaction
else
rollback transaction
go
use master
go
EXEC sp_configure allow updates
go
RECONFIGURE WITH OVERRIDE
go
还忘记一点如果你不想删除你可以用第二种方法直接更新为DBO
USE master
go
EXEC sp_configure allow updates
go
RECONFIGURE WITH OVERRIDE
go
use t database name
go
begin transaction
UPDATE systypes SET UID= where uid=user_id(srx) 直接更新
if @@rowcount<>
commit transaction
else
rollback transaction
go
use master
go
EXEC sp_configure allow updates
go
RECONFIGURE WITH OVERRIDE
go