12
返回列表 发新帖
楼主: alexsenfei

无法删除用户

[复制链接]
论坛徽章:
4
参与WIN7挑战赛纪念
日期:2009-11-06 16:05:252010新春纪念徽章
日期:2010-03-01 11:19:072012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20
11#
 楼主| 发表于 2007-3-29 10:21 | 只看该作者
Server Message:  Number  18033, Severity  16
You cannot drop user because user 'test' owns thresholds in database.
(1 row affected)
(1 row affected)
(return status = 1)

Segment name                   Free pages  
------------                   -----------
logsegment                          270016

使用道具 举报

回复
论坛徽章:
4
参与WIN7挑战赛纪念
日期:2009-11-06 16:05:252010新春纪念徽章
日期:2010-03-01 11:19:072012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20
12#
 楼主| 发表于 2007-3-29 10:22 | 只看该作者
sp_helpuser test
Users_name ID_in_db Group_name  Login_name
---------- ----------- ---------- ----------
test                 23                 public         sa

使用道具 举报

回复
论坛徽章:
4
参与WIN7挑战赛纪念
日期:2009-11-06 16:05:252010新春纪念徽章
日期:2010-03-01 11:19:072012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20
13#
 楼主| 发表于 2007-3-29 10:24 | 只看该作者
应该是LOGIN 为SA的原因.但不知道怎么解决.
斑竹是否能帮忙呢,..

使用道具 举报

回复
论坛徽章:
4
参与WIN7挑战赛纪念
日期:2009-11-06 16:05:252010新春纪念徽章
日期:2010-03-01 11:19:072012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20
14#
 楼主| 发表于 2007-3-30 08:12 | 只看该作者
不要沉

使用道具 举报

回复
论坛徽章:
0
15#
发表于 2007-3-30 09:27 | 只看该作者
用sp_helpdb看一下有那些db,然后每个db都检查一下,有没有sa建过的thresholds存储过程,找到后删除掉就可以把test用户删除了

使用道具 举报

回复
论坛徽章:
4
参与WIN7挑战赛纪念
日期:2009-11-06 16:05:252010新春纪念徽章
日期:2010-03-01 11:19:072012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20
16#
 楼主| 发表于 2007-3-30 10:49 | 只看该作者
怎么查有没SA建过的threshold存储过程.这个删掉后再建需要重起SYBASE么?

使用道具 举报

回复
论坛徽章:
0
17#
发表于 2007-3-30 11:03 | 只看该作者
sa登录后
use dbname
go
select name from sysobjects where name='sp_thresholdaction'
go
如果有,用sp_helptext sp_thresholdaction
看看内容,然后drop procedure sp_thresholdaction
各个db都看过了,就可以drop user了,当然drop user后最好把前面删除的sp_thresholdaction再重建一下,脚本就是前面helptext看到的

使用道具 举报

回复
论坛徽章:
4
参与WIN7挑战赛纪念
日期:2009-11-06 16:05:252010新春纪念徽章
日期:2010-03-01 11:19:072012新春纪念徽章
日期:2012-01-04 11:50:44ITPUB 11周年纪念徽章
日期:2012-10-09 18:06:20
18#
 楼主| 发表于 2007-3-30 11:17 | 只看该作者
每个库都没有.

是不是要DROP THRESHOLD.

使用道具 举报

回复
论坛徽章:
0
19#
发表于 2007-3-30 17:19 | 只看该作者
官方网站的解释
Error 18033
Severity

0

Error message text
You cannot drop user because user '%1!' owns thresholds in database.

Explanation
The user who created a threshold or last modified a threshold is the threshold owner. A user who owns a threshold cannot be dropped. Error 18033 occurs when you use sp_dropuser to try to drop a user who owns a threshold.

Action
You have three options:


Drop the threshold procedure owned by the user. Then you can drop the user.

Have another user with appropriate privileges modify the threshold. Then you can drop the user.

If you want to inactivate the user Adaptive Server login while leaving the threshold active, use sp_locklogin to prevent use of the login.

应该是还有存储过程没有删除,检查一下你的sql拼写是否正确,或者你用select * from systhresholds
看一下,有没有记录

使用道具 举报

回复

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

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表