Rename
Go Up to Available object actions by DBMS
This action lets you rename an object. In general, all referenced or referring objects are updated to reflect the new name.
The following table outlines object type support for the operation for all supported DBMS:
DB2 LUW | DB2 z/OS | MySQL | Oracle | SQL SVR | Sybase ASE | |
---|---|---|---|---|---|---|
Check constraints |
✓ |
✓ |
✓ |
✓ |
✓ | |
Databases |
✓ |
✓ | ||||
Defaults |
✓ | |||||
Extended procedures |
✓ | |||||
Foreign keys |
✓ |
✓ |
✓ |
✓ | ||
Indexes |
✓ |
✓ |
✓ | |||
Materialized Views |
✓ |
|||||
Primary keys |
✓ |
✓ |
✓ | |||
Procedures |
✓ |
✓ | ||||
Rules |
✓ | |||||
Sequences |
✓ |
✓ |
||||
Stored outlines |
✓ |
|||||
Synonyms |
✓ |
|||||
Tables |
✓ |
✓ |
✓ |
✓ |
✓ | |
Tablespaces |
✓ |
✓ |
||||
Unique keys |
✓ |
✓ |
✓ | |||
Views |
✓ |
The following table notes the exceptions and provides prerequisite tasks to be performed before renaming an object.
DBMS | Notes and restrictions on renaming |
---|---|
Microsoft SQL Server |
Microsoft SQL Server lets you rename a database if you own it. Before renaming a database, set it to single-user mode. Microsoft SQL Server will not rename a table if it is referenced within the body of other objects that call it, such as tables, triggers or views. As a result, renaming a table can result in broken dependencies with other objects. Also, Microsoft SQL Server does not let you rename System Tables. |
IBM DB2 for OS/390 and z/OS |
You can rename a primary key if the underlying table has only one owner. The rename operation does not rename the table if it is referenced within the body of other objects, such as tables, triggers or views, that call it. As a result, renaming a table can result in broken dependencies with other objects. |
Sybase ASE |
Before renaming a database, set it to single-user mode. System indexes can not be renamed. The rename operation does not rename the stored procedure if it is referenced within the body of other objects, such as another stored procedure, that call it. As a result, renaming a stored procedure can result in broken dependencies with other objects. The rename operation does not rename the table if it is referenced within the body of other objects, such as tables, triggers or views, that call it. As a result, renaming a table can result in broken dependencies with other objects. The rename operation does not rename the view if it is referenced within the body of other objects, such as stored procedures, triggers or other views, that call it. As a result, renaming a view can result in broken dependencies with other objects. Databases with a Type of ARCHIVE or with the In-memory property selected cannot be renamed. For more information, see Databases (Sybase ASE) - Properties. |
To Rename an Object
- Initiate a Rename action against a supported object (see the table above). For more information see Initiating an object operation.
- Use the following table as a guide to understanding and modifying settings in the Rename dialog:
Step | Settings and tasks | |
---|---|---|
Rename |
Name |
Provide the new name for the object. |
Dependencies |
Review the referring and referred objects for which naming will be automatically resolved when you execute the renaming operation. For more information, see Dependencies. | |
Preview |
Preview the DDL generated for the operation. For more information, see Preview. |
- 3. Click Execute. For information on the scheduling option, see Scheduling.