By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,021 Members | 912 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,021 IT Pros & Developers. It's quick & easy.

Rename a database?

P: n/a
Can a database be renamed?
DB2 V8.1
AIX V5.2

Apr 13 '06 #1
Share this Question
Share on Google+
3 Replies

P: n/a
1.) Create a configuration file:

DB_PATH=provide the path
INSTANCE=provide the instance

2.) Save the configuration file as relocate.cfg
3.) use the following command to make the changes to the database
db2relocatedb -f relocate.cfg

Apr 13 '06 #2

P: n/a
shsandeep wrote:
Can a database be renamed?
DB2 V8.1
AIX V5.2

If this is an option, you can uncatalog the db and then catalog it with a
new alias:

$ db2 create db test
$ db2 uncatalog db test
$ db2 catalog db test as new_name

This will not change the actual name of the database but it changes the name
that has to be used in a CONNECT statement. And that is usually all that
matters to an application.

Knut Stolze
DB2 Information Integration Development
IBM Germany
Apr 13 '06 #3

P: n/a
It should be noted that in order to use db2relocate the instance must
be down. That way you avoid future problems in the catalag tables.

Best Regards.


Apr 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.