通过管理员更改数据库 [英] alter database by admin

查看:91
本文介绍了通过管理员更改数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个以编程方式创建的主数据库.在我的程序中,管理员用户可以复制并重命名此数据库.然后管理员必须更改此新数据库并通过运行sql查询将所有权限授予来宾用户,但收到此错误: b>服务器主体"UserName"在当前安全上下文下无法访问数据库"MyDBName".
请帮帮我.

在此先感谢.

Hi All,
I have a main database that is created programmatically.In my program Admin user can copy and rename this database.Then admin must alter this new database and grant all of the permissions to guest user with running a sql query, but recieve this error : "The server principal ''UserName'' is not able to access to database ''MyDBName'' under the current security context".
please help me.

Thanks in Advance.

推荐答案

修复链接

[
Fix link

The server principal "sqlLoginName" is not able to access the database "myDatabaseName" under the current security context[^]


这篇关于通过管理员更改数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆