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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 How to change the owner of the object

Author  Topic 

venkath
Posting Yak Master

202 Posts

Posted - 2006-06-05 : 09:17:21
Hi

I have a stored procedure with the owner as follows

ocs.dbo.ent_ref..

how can i make the owner of this object as dbo

Thanks in advance.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-06-05 : 09:20:35
use sp_changeobjectowner


KH

Go to Top of Page

venkath
Posting Yak Master

202 Posts

Posted - 2006-06-05 : 09:25:46
when i give the following command
sp_changeobjectowner 'ocs.dbo.productxrenewal','dbo'

i am getting an error mesesage.
Server: Msg 15001, Level 16, State 1, Procedure sp_changeobjectowner, Line 38
Object 'ocs.dbo.productxrenewal' does not exist or is not a valid object for this operation.


Pls look into this issue
Thanks in advacne.
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2006-06-05 : 09:33:37
I'm confused here. The owner of your object is dbo, it is an object within the ocs database. [databasename].[owner].[object] (assuming 2000)

-------
Moo. :)
Go to Top of Page

venkath
Posting Yak Master

202 Posts

Posted - 2006-06-05 : 09:40:03
yes, i don't know how it was created..
but it was in that form only

how can i change it back to dbo

or else

what is the alternative

Thanks
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-06-05 : 09:40:46
it is dbo now. What do you want to change ?


KH

Go to Top of Page

venkath
Posting Yak Master

202 Posts

Posted - 2006-06-05 : 09:48:56
Yes., i got it

Thank u
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2006-06-05 : 09:55:06
For future reference you should use sp_changeobjectowner from within the database that the object lives in.


-------
Moo. :)
Go to Top of Page

venkath
Posting Yak Master

202 Posts

Posted - 2006-06-05 : 10:07:39
Hi one more issue..pls

Can i get a log file about the login details who have logged on to the server(date wise) unlike sp_who which gives the user detials who are currently logged on to the server.


How can i achieve this?

Thanks in advance.

Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2006-06-05 : 10:47:10
You can't historically do that. You could turn on login auditing within the server properties tab - security.

-------
Moo. :)
Go to Top of Page
   

- Advertisement -