











|  |
| Author |
DBO and Stored Procedures
|
Jim de Graff
Guest
Registered: Not Yet Location: Country: State: Certifications: Working on:
Total Posts: N/A
|
|
DBO and Stored Procedures
Under SQL 7, I've made one of our developers the DBO od the database ndAuto,
however, when he created stored procedures, instead of going in as
dbo.ProcedureName, they go in as hisname.ProcedureName so that when anyone
executes the procedure, they must prefix it with hisname instead of dbo.
What settings do I have to change in order for him to be able to create
procedures as dbo?
To further complicate the issue, what if another developer (in the same
group, although that is really irrelevant), also wants to be a dbo on the
same database. Can the database have two dbos?
Report this post to a moderator
|
|
10-21-02 06:23 PM
|
|
chris
Guest
Registered: Not Yet Location: Country: State: Certifications: Working on:
Total Posts: N/A
|
|
Re: DBO and Stored Procedures
Can the database have two dbos?
yes
Prefix the procs with dbo.
create procedure dbo.myproc
as
select bla bla bla
"Jim de Graff" <rjdegraff@hydro.mb.ca> wrote in message
news:u51BtASeCHA.1624@tkmsftngp12...
> Under SQL 7, I've made one of our developers the DBO od the database
ndAuto,
> however, when he created stored procedures, instead of going in as
> dbo.ProcedureName, they go in as hisname.ProcedureName so that when anyone
> executes the procedure, they must prefix it with hisname instead of dbo.
> What settings do I have to change in order for him to be able to create
> procedures as dbo?
>
> To further complicate the issue, what if another developer (in the same
> group, although that is really irrelevant), also wants to be a dbo on the
> same database. Can the database have two dbos?
>
>
Report this post to a moderator
|
|
10-21-02 06:23 PM
|
|
Jim de Graff
Guest
Registered: Not Yet Location: Country: State: Certifications: Working on:
Total Posts: N/A
|
|
Re: DBO and Stored Procedures
Doh! Thanks.
"chris" <chris@fin2000.com> wrote in message
news:#I3aWESeCHA.2424@tkmsftngp11...
> Can the database have two dbos?
> yes
> Prefix the procs with dbo.
>
> create procedure dbo.myproc
> as
> select bla bla bla
Report this post to a moderator
|
|
10-21-02 08:23 PM
|
|
chris
Guest
Registered: Not Yet Location: Country: State: Certifications: Working on:
Total Posts: N/A
|
|
Re: DBO and Stored Procedures
FYI the same goes when creating tables, views etc.
Have fun.
"Jim de Graff" <rjdegraff@hydro.mb.ca> wrote in message
news:eX4QtRTeCHA.1760@tkmsftngp12...
> Doh! Thanks.
>
> "chris" <chris@fin2000.com> wrote in message
> news:#I3aWESeCHA.2424@tkmsftngp11...
> > Can the database have two dbos?
> > yes
> > Prefix the procs with dbo.
> >
> > create procedure dbo.myproc
> > as
> > select bla bla bla
>
>
Report this post to a moderator
|
|
10-21-02 09:23 PM
|
|
Simon Su [MS]
Guest
Registered: Not Yet Location: Country: State: Certifications: Working on:
Total Posts: N/A
|
|
RE: DBO and Stored Procedures
Hi Jim,
I copy some content from Books Online for your reference,
Database Owner (dbo)
Any member of the sysadmin fixed server role is mapped to a special user
inside each database called dbo. Any object created by any member of the
sysadmin fixed server role belongs to dbo automatically.
For example, if user Andrew is a member of the sysadmin fixed server role
and creates a table T1, T1 belongs to dbo and is qualified as dbo.T1, not
as Andrew.T1.
Conversely, if Andrew is not a member of the sysadmin fixed server role but
is a member only of the db_owner fixed database role and creates a table
T1, T1 belongs to Andrew and is qualified as Andrew.T1.
The dbo cannot be deleted.
Note:
Only objects created by members of the sysadmin fixed server role belong to
dbo. Objects created by any other user (including members of the db_owner
fixed database role) who is not also a member of the syadmin fixed server
role:
1)Belong to the user creating the object, not dbo.
2) Be qualified with the name of the user who created the object when it is
referenced by users who did not create the object.
Regards,
Simon Su [MS]
-----------------------------
This posting is provided ¡°AS IS¡± with no warranties, and confers no rights
Report this post to a moderator
|
|
10-23-02 04:23 AM
|
|
|
Forum Rules: Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is OFF. |
|
ExamNotes forum archive
|