the database principal owns a service in the database -- can't drop a user
来源:互联网 发布:对项羽的评价 知乎 编辑:程序博客网 时间:2024/05/16 13:41
There are two options here.
1. You map orphan user to login if user is required. sp_change_users_login
2. Run below code and check which service user owns.
select s.name as ServiceName
from sys.database_principals p
inner join sys.services s on p.principal_id = s.principal_id
where p.name = 'nimit' --User Name (which you trying to delete)
It will give you list of Services Owned by that User. Now to remove this dependancy you have to ALTER SERVICE AUTHORIZATION by running below query. If there are multiple services than run below code for all services.
--Here nimit is the ServiceName I got from above query
ALTER AUTHORIZATION ON Service::nimit TO [dbo] --Transfer Service Authorization to dbo
- the database principal owns a service in the database -- can't drop a user
- Msg 15138 The database principal owns a schema in the database, and cannot be dropped.
- The database principal owns a schema in the database, and cannot be dropped. (.Net SqlClient Data Pr
- 186.User A executes the following command to drop a large table in your database: SQL> DROP TABLE tr
- Interacting with the User in a Service
- How can a database be in-memory and durable at the same time?
- Sybase You can't run SELECT INTO in this database. Please check with the Database Owner.
- 34.A user, who is authenticated externally, logs in to a remote machine and connects to the database
- How to grant access to SQL logins on a standby database when the guest user is disabled in SQL Serve
- 166 You are managing a 24*7 database. The backup strategy for the database is to perform user-manage
- drop a database
- drop a database
- Cannot drop a database link after changing the global_name ORA-02024 [ID 382994.1]
- Tomcat hangs if C3P0 can't get a database connection
- How to parse the user activity of a Lotus Notes database
- Error querying database. Cause: java.sql.SQLException: The user specified as a definer (''@'') doe
- 12.Which is the correct description of a pinned buffer in the database buffer cache?
- 35.You executed the command to create a password file in the database server:
- phpcms v9文章列表页调用组图标签写法
- Java读取src目录下的配置文件
- 第九周 项目四-我的方向类
- Linux下查看CPU型号,内存大小,硬盘空间命令
- synchronized关键字重新理解
- the database principal owns a service in the database -- can't drop a user
- java利用webservice代理类通信 发现jdk bug
- Javascript的addLoadEvent函数的使用详解
- iOS 开发: 几个不错的源码
- 从输入网址到显示页面:浏览器工作原理拆解分析
- poj 2763树链剖分
- VM虚拟机桥接模式无法联网解决办法
- ajax验证用户登陆及记住密码
- Linux进程间通信