Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2008
    Posts
    62

    Unanswered: problem in db2icrt and even in db2start - SQL1042C An unexpected system error

    Hello,

    I have db2 9.1 installed on windows XP. And one perfectly running instance named "DB2".

    I tried to create a new instance "DB3" but failed as follows. Now i even not able to access instacne "DB2". Bellow are the detailed steps i followd.


    C:\Documents and Settings\Home>db2icrt db3 -s ese -p 50003 -u "RTR\user1",Password!

    DBI1959N The instance directory cannot be created.

    Explanation:

    An error occurred when creating the required files or directories
    for the new instance. The instance was not created.

    User Response:

    Ensure that you have write access to the location where the
    instance directory is created. The instance directory is created
    under the path where the product is installed. You may use the
    DB2INSTPROF Profile Variable to specify a different location for
    the instance directory.



    Here is db2set output:

    C:\Documents and Settings\Home>db2set
    DB2ACCOUNTNAME=SVRTP4223\db2admin
    DB2INSTOWNER=SVRTP4223
    DB2PORTRANGE=60000:60003
    DB2_GRP_LOOKUP=local
    DB2INSTPROF=D:\PROGRA~1\IBM\SQLLIB
    DB2COMM=TCPIP


    To change "DB2INSTPROF" i created new directory "SQL2" in "D:\PROGRA~1\IBM\" and tried to change this parameter as below.

    C:\Documents and Settings\Home>db2set DB2INSTPROF=D:\Program Files\IBM\SQL2

    DBI1303W Variable not set.

    Explanation:

    The variable was not set in the profile registry.

    User Response:

    No further action is required.


    C:\Documents and Settings\Home>db2set
    DB2ACCOUNTNAME=SVRTP4223\db2admin
    DB2INSTOWNER=SVRTP4223
    DB2PORTRANGE=60000:60003
    DB2_GRP_LOOKUP=local
    DB2INSTPROF=D:\PROGRA~1\IBM\SQLLIB
    DB2COMM=TCPIP


    C:\Documents and Settings\Home>db2set DB2INSTPROF="D:\Program Files\IBM\SQL2"

    C:\Documents and Settings\Home>db2icrt db3 -s ese -p 50003 -u "RTR\user1",Password!

    DBI1959N The instance directory cannot be created.

    Explanation:

    An error occurred when creating the required files or directories
    for the new instance. The instance was not created.

    User Response:

    Ensure that you have write access to the location where the
    instance directory is created. The instance directory is created
    under the path where the product is installed. You may use the
    DB2INSTPROF Profile Variable to specify a different location for
    the instance directory.



    Now here db2set shows no or blank output.

    C:\Documents and Settings\Home>db2set

    C:\Documents and Settings\Home>


    I then tried to reassign all previous values in db2set, but didn't work!


    C:\Documents and Settings\Home>db2set DB2ACCOUNTNAME=SVRTP4223\db2admin

    C:\Documents and Settings\Home>db2set DB2INSTOWNER=SVRTP4223

    C:\Documents and Settings\Home>db2set DB2PORTRANGE=60000:60003

    C:\Documents and Settings\Home>db2set DB2_GRP_LOOKUP=local

    C:\Documents and Settings\Home>db2set DB2INSTPROF=D:\PROGRA~1\IBM\SQLLIB

    C:\Documents and Settings\Home>db2set DB2COMM=TCPIP


    C:\Documents and Settings\Home>db2set

    C:\Documents and Settings\Home>
    C:\Documents and Settings\Home>
    C:\Documents and Settings\Home>db2set -lr

    C:\Documents and Settings\Home>



    Here i tried to restart and db2iupdt the instance "DB2". but failed.

    C:\Documents and Settings\Home>db2stop
    SQL1042C An unexpected system error occurred. SQLSTATE=58004

    C:\Documents and Settings\Home>db2start
    SQL1042C An unexpected system error occurred. SQLSTATE=58004

    C:\Documents and Settings\Home>db2iupdt db2 /u:"RTR\user1","Password!"

    DBI1969N An error occurred when creating a new file in the
    instance directory.

    Explanation:

    An internal error occurred when creating a new file in the
    instance directory.

    User Response:

    Ensure that you have write access to the instance directory.


    Can anybody please help me to get out of this problem? Definitely your reply is appreciable.



    Regards,
    Prashant
    Last edited by prashant44; 08-11-09 at 14:53.

  2. #2
    Join Date
    Feb 2008
    Posts
    62
    Okay, Let me reframe my question. (In short)

    I have executed db2set DB2INSTPROF=D:\Program Files\IBM\SQL2 successfully.

    Now, I am not able to db2start or db2iupdt. Now db2set shows blank o/p.

    I am not able to set the previous value of DB2INSTPROF (i.e. D:\Program Files\IBM\SQLLIB). it shows nothing.

    I even tried to set this value of (DB2INSTPROF ) in Windows regisrty HKEY_LOCAL_MACHINE->SOFTWARE->IBM->DB2->PROFILES->DB2
    but didn't worked.

    Please send your comments if you have more information of "DB2INSTPROF"


    Thanks,
    Prashant

  3. #3
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186

    Changing DB2INSTPROF on Windows (SQL5005C)

    Hi,

    Here's how you change the DB2INSTPROF after creating the instance:

    My instance name is test

    Before any changes:

    C:\test>db2set -all
    [e] DB2PATH=C:\Program Files\IBM\SQLLIB
    [i] DB2INSTPROF=C:\PROGRA~1\IBM\SQLLIB
    [g] DB2_EXTSECURITY=NO
    [g] DB2SYSTEM=PDAHALKA
    [g] DB2PATH=C:\Program Files\IBM\SQLLIB
    [g] DB2INSTDEF=DB2
    [g] DB2ADMINSERVER=DB2DAS00

    Note: the instance directory named TEST is present under C:\PROGRA~1\IBM\SQLLIB.

    Now the steps to change the DB2INSTPROF:

    On the db2cmd:

    set DB2INSTANCE=TEST
    db2set DB2INSTPROF=c:\test

    Now if you try "db2set -all" it will show blank results (no results)

    You have to physically move the TEST directory from C:\PROGRA~1\IBM\SQLLIB to c:\test.

    Now when I try db2set -all, here is the result:

    C:\test>db2set -all
    [e] DB2PATH=C:\Program Files\IBM\SQLLIB
    [i] DB2INSTPROF=c:\test
    [g] DB2_EXTSECURITY=NO
    [g] DB2SYSTEM=PDAHALKA
    [g] DB2PATH=C:\Program Files\IBM\SQLLIB
    [g] DB2INSTDEF=DB2
    [g] DB2ADMINSERVER=DB2DAS00

    You can see the DB2INSTPROF is now changed. You are done here.

    Regards,
    Prashant Dahalkar
    Prashant

Posting Permissions

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