Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Errors with sp_rename
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Errors with sp_rename
Divers
Thread ID:
00851387
Message ID:
00851387
Vues:
96
Hi all:

The following script was generated by a third party product to rename some columns for me:
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'
go
However, 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.

Anyone have any futher ideas?

Del
Del
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform