You can rename one or more tables on the target when you copy an entire database.
- Open the parameters.xml file that has the job definition information for the job.
- Under the database name, add the selection="included" attribute to the table element.
- Add a name element and enter the current name of the table.
- Add a target_name element and specify the new name for the table.
In the following example, the DBName.Orders table is renamed to DBName.Orders_Newname and DBName.Accounts is renamed to DBName.Accounts_2 on the target.
<database selection="included"> <name>DBName</name> <table selection="included"> <name>Orders</name> <target_name>Orders_Newname</target_name> </table> <table selection="included"> <name>Accounts</name> <target_name>Accounts_2</target_name> </table> </database>
You can specify a staging database for the table to be renamed. In the following example, the DBName.Orders table is copied to the stage1 staging database and renamed to stage1.Orders_Newname.
<database selection= "included"> <name>DBName</name> <table selection="included"> <name>Orders</name> <staging_database> <name>stage1</name> </staging_database> <target_name>Orders_Newname</target_name> <staging_database> </table> </database>