关于MSSQL2005的架构删除问题.

[复制链接]
查看11 | 回复3 | 2005-10-30 17:05:33 | 显示全部楼层 |阅读模式
我有一个数据库,里面的表都不是采用dbo.tablename,而是采用tt.tablename,所有从备份里面恢复出来的也是这样,以前用2000的时候直接修改系统参数,就可以在SYSUSER里面删除这个tt这个用户.然后在新建一个tt用户就可以使用了,但是现在在2005里面来了一个架构,死活赖活就是删除不了这个用户.
我都不知道怎么搞.高手发话吧.
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
难道就没有人知道如何解答?
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
可否试试修改ID号解决master数据库中syslogins表里的sid与数据库sysusers表中的ID对应
master数据库中:select sid,name from syslogins
恢复数据库中:select sid,name from sysusers
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
You can create a temp schema under any user, and change the owner of your tables from tt to this schema.
e.g. ALTER SCHEMA temp TRANSFER tt.myTable1
you can see your table name changed from tt.MyTable1 to temp.MyTable1
Make sure tt no longer owns any object;
then delete your 'tt' schema;then delete your tt user;

After you re-create your tt user, then change all the tables owner to your new tt schema;
then delete the temp schema.
Good luck!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行