Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655

    Unanswered: 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

  2. #2
    Join Date
    May 2009
    Posts
    508
    Provided Answers: 1
    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?

  3. #3
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    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
    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

    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 )

    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 20:06.

  4. #4
    Join Date
    May 2009
    Posts
    508
    Provided Answers: 1
    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.

  5. #5
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    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

  6. #6
    Join Date
    May 2009
    Posts
    508
    Provided Answers: 1
    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.

  7. #7
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •