Showing posts with label permission. Show all posts
Showing posts with label permission. Show all posts

Wednesday, March 21, 2012

How to create an object without being the owner of the schema

Hi

I have a schema called Accounts owned by fred

User bob has create procedure permission as follows:

grant create procedure to bob

bob would like to create a procedure in schema Accounts.

When he issues create proc Accounts.sp_proc.... it fails with:

Msg 2760, Level 16, State 1, Procedure sp_proc, Line 3
The specified schema name "Accounts" either does not exist or you do not have permission to use it.

What permission do I need to grant bob in order to allow this?

Thanks

The answer is in Books Online; look for the Permissions section in the CREATE PROCEDURE article:

http://msdn2.microsoft.com/en-us/library/ms187926(SQL.90).aspx

Thanks
Laurentiu

|||

Thanks Laurentiu, I couldn't see the wood for the trees.

In case anyone else is interested I needed to run:

GRANT ALTER ON SCHEMA::Accounts TO bob

sql

How to create an admin with some limitations?

I've a SQL 2005 with a certain number of db.
Until today i was the only admin of all dbs.
Now i need to give to another admin permission to manage one specific
db (but only that).
Ho censito un utente di sql con accessi abilitati solo a quel db.
If i connect to Enterprise manager with that limited login there is a
problem: i see (only see)
all dbs, also db where this login is not autorized.
How can i work for not permitting this login to see other dbs? He
only
can see them but i
don't want because of privacy. Is it possible?(bertainafederico@.gmail.com) writes:

Quote:

Originally Posted by

I've a SQL 2005 with a certain number of db.
Until today i was the only admin of all dbs.
Now i need to give to another admin permission to manage one specific
db (but only that).
Ho censito un utente di sql con accessi abilitati solo a quel db.
If i connect to Enterprise manager with that limited login there is a
problem: i see (only see)
all dbs, also db where this login is not autorized.
How can i work for not permitting this login to see other dbs? He
only
can see them but i
don't want because of privacy. Is it possible?


Did you try DENY VIEW ANY DATABASE TO Tizio as I suggested in response to
your Italian post?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Yes, i try and now i can work correctly with limited user onto the
database.
But in the listing of db i can't see any db... So now the problem is
making possible to the user
viewing his db|||My limited user now can only see master and tempdb in the list of
dbs...|||Ok, resolved reading an italian tutorial. Thanks of allsql