wantabe2
asked on
SQL Command Assistance Needed
I have a SQL 2000 database named office
I have a table in this database named leavecertify
I need to give schema ownership of everythiing in the leavecertify table to DB
What is the sql command to do this? I can't find out how to do this is the GUI. Thanks
I have a table in this database named leavecertify
I need to give schema ownership of everythiing in the leavecertify table to DB
What is the sql command to do this? I can't find out how to do this is the GUI. Thanks
ASKER
I meant to say dbo
will that work?
will that work?
ASKER
I get an
"Incorrect syntax near the keyword 'AUTHORIZATION'
when I run ALTER AUTHORIZATION on [dbo].[leavecertify] to [DBO]
Any other suggestions?
"Incorrect syntax near the keyword 'AUTHORIZATION'
when I run ALTER AUTHORIZATION on [dbo].[leavecertify] to [DBO]
Any other suggestions?
ASKER
Please excuse my ignorance but I'm not that familair with SQL quueries...
Do I run that in the SQL Query Analyzer? Or something else?
Do I run that in the SQL Query Analyzer? Or something else?
Actually, this shows my ignorance of SQL 2000. :) It looks like ALTER AUTHORIZATION doesn't work in 2000 the way it does in 2008. Besides, if the table is already owned by dbo, then altering it to dbo (instead of "DB") wouldn't change anything anyway.
ASKER
The leave certify table is currently owned by user1
I just need to take ownership away from user1 & give it to dbo
Is there any other way to do this on SQL 2000 other than the GUI?
I just need to take ownership away from user1 & give it to dbo
Is there any other way to do this on SQL 2000 other than the GUI?
oooh, in that case try:
exec sp_changeobjectowner user1.leavecertify, dbo
exec sp_changeobjectowner user1.leavecertify, dbo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not sure if this will work in 2000, but if "DB" is a schema this works in 2008:
ALTER AUTHORIZATION on [dbo].[leavecertify] to [DB]