July 4, 2005 at 11:14 pm
Hello friends!
I want to change the owner of the object
I have table whose owner is dbo but i want to change it to hov
can u please tell me complete syntax of that
Also when we right click on table and select design table , here we find menu like Trigger then Show permission then show dependency like that
If I chose show permission here we find list all users/userdefined database roles/public like that , can u please explain that thing (window) to me what that mean by?
T.I.A
Shashank
Regards,
Papillon
July 5, 2005 at 12:01 am
The permissions window shows which users and roles in the database that have rights to the trigger.
To change the owner of an object you use the system stored procedure sp_changeobjectowner.
EXEC sp_changeobjectowner 'foobar', 'hov'
Where foobar is the name of the object to change owner of. However, in general you want to have dbo as user of all objects. There are definitely valid exceptions, but sometimes people want to have different owners just because that is how it is done in other database management products.
July 5, 2005 at 12:10 am
Hi Chris
I did what u tell me but that gives me error like
Object 'orgdetail' does not exist or is not a valid object for this operation.
i used query like
EXEC sp_changeobjectowner 'orgdetail', 'hov'
please help me
shashank
Regards,
Papillon
July 5, 2005 at 12:15 am
What sort of object is 'orgdetail' ??
--------------------
Colt 45 - the original point and click interface
July 5, 2005 at 12:20 am
Its name of table having details of students (like Studend_Id,Student_Name,Address,E-Mail .....)
I want to change owner from 'dbo' to 'hov'
i cannot do that why??
Regards,
Papillon
July 5, 2005 at 12:29 am
Are you sure that you are currently working in the correct database? Issue a USE databasename
first.
July 5, 2005 at 12:42 am
I will tell detail ,
I created table 'orgdetail' but by default the owner became 'dbo' now i want just change that to 'hov'
my database is same as i created the table there only i am working!!
Regards,
Papillon
July 5, 2005 at 1:54 am
Like I said, in general the user who owns the objects in your database should be dbo. Do you have a specific reason for needing to change it?
What tool are you using to enter the commands I mentioned above, and how are you logged in?
July 5, 2005 at 3:53 am
When you're executing the command, are you logged on as a user with dbo permissions, or as this user hov?
You could try qualifying the name of the table in the command.
EG: EXEC sp_changeobjectowner 'dbo.orgdetail', 'hov'
--------------------
Colt 45 - the original point and click interface
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply