Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to use dbo procedure to execute for different
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vi1992
Starting Member

1 Posts

Posted - 08/22/2014 :  06:40:08  Show Profile  Reply with Quote
I am using SQL Server 2008 R2, I have a schema [dbo], and in that schema, I have created a stored procedure dbo.GetAccount:

SELECT * FROM tblAccount
Then, I have created a schema [ABC] with user named UserABC.

Now, I would like to login with UserABC and execute dbo.GetAccount for schema [ABC] to get all user of it and don't want to change code of dbo.GetAccount. So, how can I do?

Thanks for your help.

gbritton
Flowing Fount of Yak Knowledge

2780 Posts

Posted - 08/22/2014 :  07:53:32  Show Profile  Reply with Quote
Set ABC to be the default schema for UserABC
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000