|
I create a table in sql server 2005 database table_1 with sql login "abc" and the table name appears as abc.Table_1, while if I create table on other 2005 server it appears as dbo.Table_1. Is there any specific reason for this different behaviour. sql logins at both the server has dbowner right.
(comments are locked)
|
|
On the first server the default schema for your user 'abc' is 'abc'. On the second server the default schema for your user is 'dbo', (this is always the case when the user is the database owner). thanks, I checked both the servers and they both have default schema 'abc'. It is really confusing, I missing something.
Apr 30 '10 at 12:43 PM
Bhaskar
It is considered a dangerous practice not to specify schema when creating tables. If you would do the right thing then there will never be any ambiguity. In other words, the statement creating a table should look like create table [JO_SCHEMA].[JO_TABLE] rather than create table [JO_TABLE] – Oleg 0 secs ago
Apr 30 '10 at 12:49 PM
Oleg
on the 2nd server is the user the database owner?
Apr 30 '10 at 12:49 PM
Kev Riley ♦♦
Are you sure that the abc login is not sa on one of the servers but not the other. sa logins come in as dbo, this can make a difference.
Apr 30 '10 at 12:51 PM
Oleg
That's the only difference you need to find....
Apr 30 '10 at 01:10 PM
Kev Riley ♦♦
(comments are locked)
|

