SQL Server Forums
Profile | Register | 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
 New Topic  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
Aged Yak Warrior

856 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  
 New 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.03 seconds. Powered By: Snitz Forums 2000