EXECUTE sp_rename 'EXTRDETL.EXTRDETLID', 'pkEXTRDETL', 'COLUMN' go EXECUTE sp_rename 'EXTRDETL.EXTRMASTID', 'fkEXTRMAST', 'COLUMN' go EXECUTE sp_rename 'EXTRMAST.EXTRMASTID', 'pkEXTRMAST', 'COLUMN' go EXECUTE sp_rename 'EXTRSCRP.EXTRSCRPID', 'pkEXTRSCRP', 'COLUMN' go EXECUTE sp_rename 'EXTRSCRP.EXTRDETLID', 'fkEXTRDETL', 'COLUMN' goHowever, when this is executed (this also happens when executing from Query Analyzer), I get the following error:
Server: Msg 15248, Level 11, State 1, Procedure sp_rename, Line 163 Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong. Server: Msg 15248, Level 11, State 1, Procedure sp_rename, Line 163 Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong. Server: Msg 15248, Level 11, State 1, Procedure sp_rename, Line 163 Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong. Server: Msg 15248, Level 11, State 1, Procedure sp_rename, Line 163 Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong. Server: Msg 15248, Level 11, State 1, Procedure sp_rename, Line 163 Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong.I have reviewed BOL and I really don't see what the problem is with the script. I am logged in as SA and the appropriate database is selected when attempting this. 'COLUMN' is definitely an allowable option per BOL. Also, I've tried inserting a 'dbo.' in front of the table names and this does not resolve the apparent ambiguity either.