467,209 Members | 1,277 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,209 developers. It's quick & easy.

Rename a database?

Can a database be renamed?
DB2 V8.1
AIX V5.2

Apr 13 '06 #1
  • viewed: 14928
Share:
3 Replies
1.) Create a configuration file:

DB_NAME=OLDDB,NEWDB
DB_PATH=provide the path
INSTANCE=provide the instance
NODENUM=0

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

Apr 13 '06 #2
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
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.

Max

Apr 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by news | last post: by
8 posts views Thread by Matt | last post: by
2 posts views Thread by gdabbara@brownshoe.com | last post: by
1 post views Thread by John Howard | last post: by
12 posts views Thread by John Baker | last post: by
12 posts views Thread by mantrid | last post: by
1 post views Thread by Carl Pearson | last post: by
1 post views Thread by AAaron123 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.