Connecting Tech Pros Worldwide Forums | Help | Site Map

Any command for renaming a Stored Procedure?

Newbie
 
Join Date: Feb 2007
Posts: 9
#1: Feb 20 '07
Hi
I am working on DB2 8.2 version and I have only rights to access through Command Line Processor. I want to change the name of the one of the Stored Procedure through CLP is there any command for this( Re naming storedprocedure).

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Feb 20 '07

re: Any command for renaming a Stored Procedure?


Quote:

Originally Posted by yogeeswar

Hi
I am working on DB2 8.2 version and I have only rights to access through Command Line Processor. I want to change the name of the one of the Stored Procedure through CLP is there any command for this( Re naming storedprocedure).

Have a look at sp_rename.
Newbie
 
Join Date: Feb 2007
Posts: 9
#3: Feb 20 '07

re: Any command for renaming a Stored Procedure?


Quote:

Originally Posted by r035198x

Have a look at sp_rename.

HI GURU
Can you tell me the syntax of this command
Newbie
 
Join Date: Feb 2007
Posts: 2
#4: Feb 20 '07

re: Any command for renaming a Stored Procedure?


Syntax
sp_rename [@objname =] 'object_name',
[@newname =] 'new_name'
[, [@objtype =] 'object_type']

Arguments
[@objname =] 'object_name'
Is the current name of the user object (table, view, column, stored procedure, trigger, default, database, object, or rule) or data type. If the object to be renamed is a column in a table, object_name must be in the form table.column. If the object to be renamed is an index, object_name must be in the form table.index. object_name is nvarchar(776), with no default.
[@newname =] 'new_name'
Is the new name for the specified object. new_name must be a one-part name and must follow the rules for identifiers. newname is sysname, with no default.
[@objtype =] 'object_type'
Is the type of object being renamed. object_type is varchar(13), with a default of NULL, and can be one of these values.
Reply