04-16-13, 13:20 #1Registered User
- Join Date
- Feb 2013
Unanswered: Unable to move database to a different Instance
I have a database setup in DB2 but I need to move it to an instance DB2TEST. This is on DB2 LUW 9.5.3a Win 2003, and I'm wondering if I didn't setup the DB2TEST Instance correctly.
Here is my config file:
And I verified this DB_Path is correct from running 'db2 list databasedirectory' plus db2ilist shows both DB2 and DB2TEST instances exist.
So I change my DB2INSTANCE variable to DB2TEST, run db2cmd, then run this:
DB2RELOCATEDB -f dbmove.cfg
And it returns this:
DBT1006N The file/device "E:\TestDB1_DATA\DB2TEST\NODE0000\SQLDBDIR\SQLDBDI R"
could not be opened.
There is no directory called E:\TestDB1_DATA\DB2TEST instead it's E:\TestDB1_DATA\DB2 which maked sence given the current schema is DB2, but do I need to create E:\TestDB1_DATA\DB2TEST? I assumed it would do it for me, but maybe not.
Also I'm thinking something isn't setup correctly with the Instance because when I open DB2TEST in Control Center I get this error:
SQL1032N No start database manager command was issued.
DBA0102W Unable to detect nodetype for instance - "DB2TEST".
Reason Code: "-1".
The start database manager command has not been processed. It must be
processed before a stop database manager, any SQL statement, or utility
can be issued.
The command cannot be processed.
Issue a start database manager command and resubmit the current command.
If using multiple logical nodes, ensure the DB2NODE environment variable
is set correctly. The DB2NODE environment variable indicates the node
the application will attempt to connect to. DB2NODE must be set to the
node number of one of the nodes defined on the same host as the
Any thoughts? When I run this the DB2INSTANCE env variable is DB2TEST and DB2NODE is 0000. If I remember correctly I just used 'db2icrt DB2TEST' to create the instance, so was something missed?
Thanks in advance for any suggestions.
04-16-13, 18:08 #2Registered User
- Join Date
- Apr 2012
Couple of questions, are you just interested in changing the instance or are you trying to change the names of the file systems as well? I ask because if you just want to change the instance your database is cataloged on you could just uncatalog the database from instance DB2 and catalog it on instance DB2TEST.
If for some reason you need/want to use the db2relocatedb, did you try adding the NODENUM=0 to your config? Also, did you try to issue a db2start on instance DB2TEST? What message did you get?
So your config would be as follows:
04-17-13, 12:50 #3∞∞∞∞∞∞
- Join Date
- Aug 2008
- Toronto, Canada