在架构中连接存储过程 [英] Connect Stored Procedure in a Schema

查看:90
本文介绍了在架构中连接存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。

使用SQL SERVER MANAGEMENT STUDIO 2012.



我在安全>数据库角色下创建了一个角色。我在Security> Schema下创建了一个模式。我已经创建了一个存储过程和表。

我的意图是将用户连接到一个角色,并通过一个Schema获得与使用表的存储过程的连接。这样我就可以在存储过程中设置权限。

使角色成为Schema的所有者是没有特权的问题但是如果schama没有eny对象(例如存储过程)则没有任何问题。连接表是没有问题,但存储过程似乎很复杂。



我不想制作SP我想将所有者方案从dbo更改为任何其他地方我自己做了。

Hove我将存储过程连接到模式不通过T-SQL对接通过SMSS?

解决方案

你好...试试这个

https://msdn.microsoft.com/en -IN / library / ms189915.aspx [ ^ ]



http://www.toadworld.com/platforms/ibmdb2/w/wiki/7467.creating-stored-procedures.aspx [ ^ ]


你好。再次。

现在找到了解决方案。我认为可以更改Stored Prodedure Properties窗口。这可能是可能的,但是我找不到解决方案。

存储过程中的属性被锁定,因此我无法在那里进行更改。属性显示谁是所有者。

我必须更改dbo。到我自己的mySchema前面myStoredProcedure,现在它链接到mySchema。

解决方案:

之前:dbo.myStoredProcedure

之后:mySchema.myStoredProcedure

Hi.
Using SQL SERVER MANAGEMENT STUDIO 2012.

I have made a Role under Security>Database Role. I have made a schema under Security>Schema.I have made a stored procedure and table.
My intension is connecting users to a Role and through a Schema get connection to a stored procedure that uses a table. Just so I can set privileges on the stored procedure.
Making Role a owner of Schema is no problem with privileges but there is no mening if the schama dont have eny objects such as a stored procedure. Connecting a table is no problem but a stored procedure seem to bee complicated.

I dont want to make a SP I want to changed the owner scheme from dbo to any othere I made my self.
Hove do i Connect a stored procedure to a schema Not by T-SQL butt through SMSS?

解决方案

Hello...Try this
https://msdn.microsoft.com/en-IN/library/ms189915.aspx[^]

http://www.toadworld.com/platforms/ibmdb2/w/wiki/7467.creating-stored-procedures.aspx[^]


Hello again.
Have now found a solution. I thought that it was possible to change the Stored Prodedure Properties window. It may be possible but I can not find that solution.
Properties in Stored Procedure is locked so I can not change there. Properties shows who is the owner.
I had to change dbo. to my own mySchema front myStoredProcedure and now it is linked to mySchema.
solution:
Before: dbo.myStoredProcedure
After: mySchema.myStoredProcedure


这篇关于在架构中连接存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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