Saturday, February 25, 2012

Management tools SQL2005 and table ovner name dbo.tablename.

Hei all
Using the new SQL Server2005 Management tools to view and edit
tables/storedprosedures it automatically prefix the table and SP names with
the ovner name. We usually type the first letters of the tablename to find
the table name. Now we have to start with dbo.tablename every time. Is there
a setting to get rid of this ovner name in this list?
thanx all
geirFor 'normal' users in the database, you can specify a default schema:
use master
create login user1 with password = 'bla'
use adventureworks
create user user1
alter user user1 with default_schema = person
Given that proper permissions are in place, user1 can now:
select * from address
where the actually table name is person.address.
Default schema is ignored for members of 'sysadmin'. All members of the
sysadmin fixed server role have a default schema of dbo.
Hope this helps,
Hans
"Geir Holme" <geir@.multicase.no> wrote in message
news:%231jTdJMgGHA.5088@.TK2MSFTNGP02.phx.gbl...
> Hei all
> Using the new SQL Server2005 Management tools to view and edit
> tables/storedprosedures it automatically prefix the table and SP names
> with the ovner name. We usually type the first letters of the tablename to
> find the table name. Now we have to start with dbo.tablename every time.
> Is there a setting to get rid of this ovner name in this list?
> thanx all
> geir
>|||Hi Hans.
Thanx for your reply.
Mabe I don't explain good enough. The short version is:
In the Management tools (Enterprice manger on sql2000) I don't want to see
the owner of the tables and SP' in the list. Can I remove this.
Why?
Because when I want to look up a table I just writes the name and it
"autosearches" the tablename. In SQL2005 I have to start with dbo.tablename
every time. I want to scip dbo. and just write the tablename to find my
table and edit it. The same for procedures.
regards
geir
"Hans Dingemans" <hans_dingemans@.hotmail.com> wrote in message
news:%23m0$VnMgGHA.1204@.TK2MSFTNGP02.phx.gbl...
> For 'normal' users in the database, you can specify a default schema:
> use master
> create login user1 with password = 'bla'
> use adventureworks
> create user user1
> alter user user1 with default_schema = person
> Given that proper permissions are in place, user1 can now:
> select * from address
> where the actually table name is person.address.
> Default schema is ignored for members of 'sysadmin'. All members of the
> sysadmin fixed server role have a default schema of dbo.
> Hope this helps,
> Hans
> "Geir Holme" <geir@.multicase.no> wrote in message
> news:%231jTdJMgGHA.5088@.TK2MSFTNGP02.phx.gbl...
>> Hei all
>> Using the new SQL Server2005 Management tools to view and edit
>> tables/storedprosedures it automatically prefix the table and SP names
>> with the ovner name. We usually type the first letters of the tablename
>> to find the table name. Now we have to start with dbo.tablename every
>> time. Is there a setting to get rid of this ovner name in this list?
>> thanx all
>> geir
>

No comments:

Post a Comment