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 |
sreehari
Starting Member
37 Posts |
Posted - 2006-05-19 : 11:05:46
|
HiIn my database, the owner of the procedure has been changed from dbo to qauser. when i try to run this procedure as sysadmin , this is giving error. i changed the owner of the procedure back to dbo.what i want to know is, in which circumstances, the owner is changed to some other user like qauser.qauser has been giver the db role of db_ownernote:qauser did not give any command to change the owner of the procedure.any help on this wiil be greatly appreciated.Thank in advance. |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-05-19 : 11:17:04
|
well if he dropped the proc and then recreated it could happen.Go with the flow & have fun! Else fight the flow Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"] |
 |
|
azmi
Starting Member
37 Posts |
Posted - 2006-05-19 : 12:02:32
|
well, try check in sql enterprise manager in users site, take a look the role of that user wheither there is dbo access tick or not. The circumstances might be restoration of the databases.Did u have prod server & development server. If yes then compare both db owner for both server... |
 |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-05-19 : 12:19:01
|
If the user is in the dbo role will still default to creating objects owner by himself.If gets access to the database via sysadmin or is the owner of the database then will default to 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. |
 |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-05-20 : 09:18:16
|
if the owner is only dbo then default owner of the created object is the account nameyou can change using sp_changedbowner 'sa' or when creating the object be sure to prefix it with dbo like..create procedure dbo.spname...--------------------keeping it simple... |
 |
|
|
|
|