If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Instance migration Failing.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-27-09, 17:16
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Instance migration Failing.

Code:
C:\Program Files\IBM\SQLLIB_01\BIN>db2start

SQL1390C  The environment variable DB2INSTANCE is not defined or is invalid.

C:\Program Files\IBM\SQLLIB_01\BIN>db2stop
SQL1390C  The environment variable DB2INSTANCE is not defined or is invalid.

C:\Program Files\IBM\SQLLIB_01\BIN>

After installing DB2 V9.5 fixpak "0" beside DB2v8.1.9a 32 bit workgroup Server Edition.

"Install New"

windows server 2003
DB2 ver 8.1.10 workgroup server edition
DB2 Ver 9.5 Fixpack "0"

Please help how to do db2iupdt

Code:
C:\Program Files\IBM\SQLLIB_01\BIN>db2iupdt DB2 /u:Administrator,alphaABC12

DBI1936N  The db2iupdt command failed to update the database manager
      configuration file.

Explanation:

The db2iupdt command failed to update the database manager configuration
file because the previous database manager configuration file is
corrupted or missing. The current instance is in inconsistent state and
can not be used.

User response:

Copy the default database manager configuration file to the instance
directory then re-submit the command. The instance directory is located
in \SQLLIB\InstName. The default database manager configuration file is
named db2systm and can be found in the \sqllib\cfg directory.

whereas I checked db2systm files are in the appropriate sub directories.

SQLLIB/CFG/DB2


I am almost stuck, because there is noway I can do migration ecxept RESTORE which takes much longer.

Please try to help

Thanks
DBFinder
Reply With Quote
  #2 (permalink)  
Old 05-27-09, 17:46
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
DBFinder,

A) DB2IUPDT shouldn't need to be run on a Windows Install. (according to the V9.5 Command Reference manual).
B) If you installed a new DB2 V9.x, you shouldn't need to run DB2IUPDT (if you had migrated from V8 to V9, then you could run the command (but see A).

Type DB2ILIST in a command window. What Instances show up? (I would think at least 2. One for V8 and one for V9).

Type DB2 GET INSTANCE. Which Instance is the current Instance?

If it is for V8, type SET DB2INSTANCE=v9-instance-name to make the V9 instance the current (active) one.

Does this help any?
Reply With Quote
  #3 (permalink)  
Old 05-27-09, 19:01
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Yes there are two instances. DB2 and DB2_01

CURRENT INSTANCE is DB2 which has become current after db2imgr DB2

and now after that I am getting same error
Quote:
C:\Program Files\IBM\SQLLIB_01\BIN>db2start

SQL1390C The environment variable DB2INSTANCE is not defined or is invalid.

C:\Program Files\IBM\SQLLIB_01\BIN>db2stop
SQL1390C The environment variable DB2INSTANCE is not defined or is invalid.

C:\Program Files\IBM\SQLLIB_01\BIN>
and if I try to set instance as you said

Quote:
C:\Program Files\IBM\SQLLIB_01\BIN>db2 get instance

The current database manager instance is: DB2

C:\Program Files\IBM\SQLLIB_01\BIN>db2 set instanse=DB2_01
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL1024N A database connection does not exist. SQLSTATE=08003

C:\Program Files\IBM\SQLLIB_01\BIN>DB2 GET INSTANCE
And database connection cannnot be made without db2start
which is failling ( see above )


So I did not get your point actually Stealth_DBA ( I mean why would I need to set instance )

Quote:
C:\Program Files\IBM\SQLLIB_01\BIN>set db2instance
DB2INSTANCE=DB2

C:\Program Files\IBM\SQLLIB_01\BIN>
Let me know if you want me to try another command to know it better.

DBFinder

Last edited by DBFinder; 05-27-09 at 19:06.
Reply With Quote
  #4 (permalink)  
Old 05-27-09, 19:12
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
DBFinder, Actually Set isn't a DB2 command. Just type

SET DB2INSTANCE=DB2_01.

DB2START affects the current Instance. If you are trying to start the V9 DB2, you need to first change the value in DB2INSTANCE to the actual V9 Instance (DB2_01). Otherwise, you are trying to run it on the V8 Instance (DB2). (and there may be some problem with running the db2start from the V9 directories against the V8 Instance.
Reply With Quote
  #5 (permalink)  
Old 05-27-09, 19:17
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks,

It worked. I set the instance to db2_01 and was able to start and stop dbm.

Now there were two databases in DB2 instance. How I bring these to DB2_01


DBFinder
Reply With Quote
  #6 (permalink)  
Old 05-27-09, 19:19
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
DBFinder, One way is BACKUP and RESTORE. Just make sure you are backing up and Restoring to the correct Instances and/or Locations. I am not looking at the commands right now so I don't know their parameters.
Reply With Quote
  #7 (permalink)  
Old 05-30-09, 11:29
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks,

I have gone through all this, an I am able to hanle that.

The choice stays with th manager. I talked to IBM and finally have the solution.

I am installing on existing one for now and will have time to study instance migration issue later.

Thanks for support.

DBFinder
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On