Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2007-06-25 : 07:59:45
|
i have a database that hasdbo username rather than saIm trying to change the user name to another nameuse TESTA exec sp_CHANGEDBOWNER 'SA', 'AAC_MAIN\SLAuthority'But it still remains as sa |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-06-25 : 08:07:42
|
suspect you want sp_changedbowner.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2007-06-25 : 08:13:25
|
I did justSP_CHANGEDBOWNER 'aac_main\newname'That worked.Why is it that you change the dbo to another name rather than the sa and just add the user as owner ?Always confuses me why some applications do this.Thanks |
 |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-06-25 : 08:19:23
|
Not sure what you meanYou change a database owner to another login whereas you change an object owner to a user in the database.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2007-06-25 : 08:27:04
|
When you first create a database this is dbo saTESTA dbo saSome applications use say dbo MP2 dbo EPLANNER So sa is not the owner.So i was wondering why some applications do this rather than adding the user MP2 to the database and making it db owneri.e dbo sa mp2 mp2Thanks |
 |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-06-25 : 08:31:17
|
Still confused.sa is the owner of the database but the owner of the objects is dbo (i.e. the database owner which happens at this point to be sa).If you try to acces an object without qualifying the owner it will look for that object owned by you, if that doesn't exist it will loko for the object owned by dbo.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2007-06-25 : 08:37:29
|
Thanks |
 |
|
|
|
|