all groups > sql server new users > november 2006 >
You're in the

sql server new users

group:

dbo userid object prefix



dbo userid object prefix mharness
11/24/2006 7:09:58 PM
sql server new users: Hello,

I'm trying to get my database setup on my isps sql2000 server and am having
trouble getting the object prefixes to make sense.

What I would like is for all new objects to be created with the dbo prefix,
perhaps so that I don't have to explicitly use either the dbo or any userid
prefix when referencing tables in views and stored procedures and when
referencing views in other views or stored procedures. I'm sure there are
reasons why I would be better off using the object prefix but I'm just
trying to make some progress here and the simpler the better is what I need
right now.

As it is now, I can create objects from an Access adp with the dbo prefix
but when I create them with sql sever management studio, all objects inherit
a userid prefix (not dbo). My isp is able to create objects with their sql
enterprise manager on my database with the dbo prefix so they think that the
problem is with my installation of sql sms. I tend to agree with them but
can't find way to change the user settings on my installation. I don't know
if the tables that they create inherit the dbo prefix in views and stored
procedures.

I wouldn't be too concerned about this except that the isp has migrated the
database from sql7.0 with about 40 queries that already have another userid
which will have to be renamed to the new userid and although I don't mind
changing the names I only want to do it once and want to make sure that I'm
doing the right thing.

Any advice for someone who knows darn little about sql2000 would be
appreciated.

Thanks,

Mike

Re: dbo userid object prefix Andrew J. Kelly
11/24/2006 10:32:38 PM
If the account you registered EM with is not sa or dbo then it will take on
the user as the owner.

--
Andrew J. Kelly SQL MVP

[quoted text, click to view]

Re: dbo userid object prefix mharness
11/25/2006 12:45:40 AM
Hello Andrew,

Actually I'm using management studio express and not enterprise manager (if
it matters) and I didn't see any distinction or way of choosing whether I
was an sa or dbo when I registered my local installation of the software.
Is this something that I can reset locally and perhaps re-register or even
re-install and fix myself or is it something that the admin on the isp
server can or needs to change--the user name prefix that I'm stuck with is
the uid that they arbitrarily assigned to the database?

Thanks,

Mike

[quoted text, click to view]

Re: dbo userid object prefix Andrew J. Kelly
11/25/2006 10:44:33 AM
I haven't used the express version yet so I may be off base here or it is
even possible that there is a quirk that when managing a 2000 db thru
express it doesn't deal with owners properly. But in ay case if the
account that you use to register the database in the tool is sa it will
default to dbo. You might want to try dropping the registration for that db
and re-registering it. But in any case you can always specify the owner /
schema of the object when you create it. On eof the properties of the object
is always the owner so just be sure you set it before you actually create
it.

--
Andrew J. Kelly SQL MVP

[quoted text, click to view]

AddThis Social Bookmark Button