Create SP as DBO 
Author Message
 Create SP as DBO
Is there anyway to create a stored procedure with dbo as the owner when you
are not dbo?


Tue, 09 Dec 2003 04:48:59 GMT
 Create SP as DBO

(assuming that you have the appropriate permissions)
CREATE PROC dbo.foo
AS
........

--
Keith
==============
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


Quote:
> Is there anyway to create a stored procedure with dbo as the owner when
you
> are not dbo?



Wed, 10 Dec 2003 06:19:07 GMT
 Create SP as DBO
To expand on Keith's response, a user who is not the database owner needs to
either be a member of the db_owner role or the db_ddladmin fixed database
roles in order to create objects owned by 'dbo'.

Hope this helps.

-----------------------
SQL FAQ links (courtesy  Neil Pike):

 http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
 (faqxxx.zip in lib 7)
 or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
 or www.sqlserverfaq.com
 or www.mssqlserver.com/faq
-----------------------

"Keith Kratochvil" <Keith.please email only when

Quote:
> (assuming that you have the appropriate permissions)
> CREATE PROC dbo.foo
> AS
> ........

> --
> Keith
> ==============
> Please reply only to the newsgroups.
> When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
> can be cut and pasted into Query Analyzer is appreciated.



> > Is there anyway to create a stored procedure with dbo as the owner when
> you
> > are not dbo?



Wed, 10 Dec 2003 13:27:34 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Create sp as dbo

2. Create sp as dbo

3. SP for Creating Table belonging to DBO

4. Creating New DB doesn't create dbo user

5. Creating New DB doesn't create dbo user

6. Ownership dbo.SP --> user.Table

7. create sp from sp

8. can't create SP as user; creates as dbo???

9. Vanishing Create Table when creating new SP

10. creating SP from create table script

11. DBO but no DBO

12. Avoid seeing dbo.sysalternates,dbo.sysconstraints, INFORMATION_SCHEMA_etc from MS Access Client


 
Powered by phpBB® Forum Software