I want dynamically created views by one user get viewed by other users.
These users will not know who has created the view.
To make this possible I am trying to write a procedure which will switch
identity of user to dbo and then create a view and again restore original
identity. I have not found anything which will switch identity, what can be
used to do this part?
If this is not possible then how else this can be achievedHi,
Take a look into system procedure sp_changeobjectowner. This procedure will
help you to change the object owners.
Thanks
Hari
SQL Server MVP
"Shilpa" <Shilpa@.discussions.microsoft.com> wrote in message
news:F42A25B8-74B6-4192-BCEA-47EA588C90FE@.microsoft.com...
>I want dynamically created views by one user get viewed by other users.
> These users will not know who has created the view.
> To make this possible I am trying to write a procedure which will switch
> identity of user to dbo and then create a view and again restore original
> identity. I have not found anything which will switch identity, what can
> be
> used to do this part?
> If this is not possible then how else this can be achieved|||If you add the developers to the db_ddladmin database role, they can give
the procedure ownership to the 'dbo' schema when they create it.
A good practice is to use "CREATE PROCEDURE dbo.MyProcedure".
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Shilpa" <Shilpa@.discussions.microsoft.com> wrote in message
news:F42A25B8-74B6-4192-BCEA-47EA588C90FE@.microsoft.com...
>I want dynamically created views by one user get viewed by other users.
> These users will not know who has created the view.
> To make this possible I am trying to write a procedure which will switch
> identity of user to dbo and then create a view and again restore original
> identity. I have not found anything which will switch identity, what can
> be
> used to do this part?
> If this is not possible then how else this can be achieved
Monday, March 12, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment