执行从一个数据库到另一个登录权限的存储过程 [英] Execute store procedure from one database to another login permission

查看:119
本文介绍了执行从一个数据库到另一个登录权限的存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器端有两个数据库(同一个服务器),每个数据库都有不同的数据库用户。我想从一个数据库执行storeprocedure到其他数据库。但它不允许没有登录。

我也试过这个:



EXECUTE AS user ='DB User'



EXECUTE SP_Name



REVERT



但是它需要许可。错误消息来了:



服务器主体user_1无法访问当前安全上下文下的数据库dbGOAMAIN。

I have two databases on server side (same server), each has different database users. I want to execute a storeprocedure from one database to other database. but it does not allow with out having login.
I have also tried this:

EXECUTE AS user = 'DB User'

EXECUTE SP_Name

REVERT

but it requires permission. error message comes:

The server principal "user_1" is not able to access the database "dbGOAMAIN" under the current security context.

推荐答案

阅读本讨论



http://www.sqlservercentral.com/Forums/Topic362018-359-1.aspx [ ^ ]


这篇关于执行从一个数据库到另一个登录权限的存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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