Author |
Topic |
danasegarane76
Posting Yak Master
242 Posts |
Posted - 2007-04-04 : 09:08:25
|
Dear All, How can I change the owner of the tableDana |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-04-04 : 09:10:54
|
Read about sp_changeobjectowner in sql server help fileMadhivananFailing to plan is Planning to fail |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-04 : 09:11:27
|
sp_changeowneror is itsp_changeobjectowner??? Can't remember.Peter LarssonHelsingborg, Sweden |
 |
|
danasegarane76
Posting Yak Master
242 Posts |
Posted - 2007-04-04 : 09:15:31
|
Dear Madhi, I tried like thisExec sp_changeobjectowner 'danauser.macro_path','dbo'But I am getting the error asObject 'danauser.macro_path' does not exist or is not a valid object for this operation.But I can sure that the Table exist with the name danauser.Macro_PathWhat could be the problem |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-04 : 09:17:29
|
Maybe you have no permissions to change the owner?Peter LarssonHelsingborg, Sweden |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-04 : 09:18:05
|
quote: Originally posted by Peso sp_changeowneror is itsp_changeobjectowner??? Can't remember.Peter LarssonHelsingborg, Sweden
Are you kidding, Peter? Or you are trying to force OP to read about it in BOL? Dana,You need to make sure specified owner name and table name really exists. Try this:select * from information_schema.tables where table_schema = 'danauser' and table_name = 'macro_path' Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
danasegarane76
Posting Yak Master
242 Posts |
Posted - 2007-04-04 : 09:18:22
|
The table and database is located in my machine :) |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-04-04 : 09:18:36
|
TryExec sp_changeobjectowner macro_path','dbo'MadhivananFailing to plan is Planning to fail |
 |
|
NeilG
Aged Yak Warrior
530 Posts |
Posted - 2007-04-04 : 09:18:46
|
Out of interest is this one of the new features of 2005 |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-04 : 09:19:54
|
quote: Originally posted by madhivanan TryExec sp_changeobjectowner 'macro_path','dbo'MadhivananFailing to plan is Planning to fail
Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-04 : 09:20:25
|
quote: Originally posted by NeilG Out of interest is this one of the new features of 2005
No. It was present in SQL2K as well.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
danasegarane76
Posting Yak Master
242 Posts |
Posted - 2007-04-04 : 09:21:14
|
Dear harsh, I am getting this output after executing this queryThomson danauser Macro_Path BASE TABLE |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-04-04 : 09:21:48
|
quote: Originally posted by Peso sp_changeowneror is itsp_changeobjectowner??? Can't remember.Peter LarssonHelsingborg, Sweden
Effect of too much of work MadhivananFailing to plan is Planning to fail |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-04 : 09:22:24
|
quote: Originally posted by harsh_athalye Are you kidding, Peter? Or you are trying to force OP to read about it in BOL? 
People seem to be upset when I ask them to read Books Online.It's better when I write I don't remember, then they will read Books Online without hesitation!Mission accomplished anyway Peter LarssonHelsingborg, Sweden |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-04-04 : 09:26:07
|
<<It's better when I write I don't remember, then they will read Books Online without hesitation!>>New technique. Not bad MadhivananFailing to plan is Planning to fail |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-04 : 09:28:51
|
quote: Originally posted by Peso
quote: Originally posted by harsh_athalye Are you kidding, Peter? Or you are trying to force OP to read about it in BOL? 
People seem to be upset when I ask them to read Books Online.It's better when I write I don't remember, then they will read Books Online without hesitation!Mission accomplished anyway Peter LarssonHelsingborg, Sweden
Innovative technique to compel people to do what we want without hurting them !!I need to keep this in mind Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
danasegarane76
Posting Yak Master
242 Posts |
Posted - 2007-04-04 : 09:37:47
|
Dear Peter and Harsh, How can I solve my Problem.Dear Peter :) You can directly tell me to read the BOK No Probs.I am still a learner. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-04 : 09:41:08
|
Did you try MadhisExec sp_changeobjectowner 'macro_path', 'dbo' without previous ownerOnly member of db_owner (or having both db_ddladmin and db_securityadmin), can change owner on the object.Peter LarssonHelsingborg, Sweden |
 |
|
danasegarane76
Posting Yak Master
242 Posts |
Posted - 2007-04-04 : 09:44:07
|
Dear Peter, I get this messageObject ' macro_path' does not exist or is not a valid object for this operation. |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-04 : 09:48:09
|
Which role do you currently have? See my previous post.Peter LarssonHelsingborg, Sweden |
 |
|
danasegarane76
Posting Yak Master
242 Posts |
Posted - 2007-04-04 : 09:59:55
|
My role is Db_Owner.Sorry if i am wrongly replied |
 |
|
Next Page
|