Skip to Content
avatar image
Former Member

Verify that the database is created with the correct path specification

Dear All

When I installed DB2 9.1 with SP4 on windows 2003 64 bit,I use Configuration Assistant tool which is problem

"

SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031

Explanation:

The system database directory or local database directory could

not be found. A database has not been created or it was not

cataloged correctly.

The command cannot be processed.

User Response:

Verify that the database is created with the correct path

specification. The Catalog Database command has a path parameter

which specifies the directory where the database resides.

sqlcode : -1031

sqlstate : 58031

Thanks

"

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • avatar image
    Former Member
    Oct 06, 2008 at 06:46 AM

    Hi Phuc,

    Could you please provide a detailed description on how you are using Configuration Assistant.

    I assume, that you can see the DB2 command executed under the covers by the tool just before you execute it; there should be a button "Show Command" to see that.

    If the problem is in the CATALOG DATABASE command, it is important that you provide the properly drive / path where the database resides.

    Hope this helps.

    Best regards,

    Edgardo

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 06, 2008 at 06:52 AM

    Dear Edgardo Koenig

    I choose Database name --> Change when show command "UNCATALOG DATABASE TST;CATALOG DATABASE <Select> AS TST ON H;"

    I used db2 catalog command but it is problem

    Please help me debug

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Phuc,

      Could you please validate, that the database TST is located in driver H: ?

      If the database is there, you find a directory with the name of your instance under the H: drive, inside this directory, you must find a NODE0000 directory and finally inside the NODE0000 directory there must be a SQL0000? directory, where ? is a number.

      You get your instance name from the environment variable DB2INSTANCE or simply by the execution of:

      db2 get instance

      If there is no SQL0000? directory at all, this means the database is located somewhere else.

      If there is SQL0000? directory in that drive, you can perform the following:

      db2 CATALOG DB TST AS TST ON H:

      And provide the error message, if any.

      Hope this helps

      Best regards, Edgardo

  • avatar image
    Former Member
    Oct 06, 2008 at 09:37 AM

    Dear Edgardo Koenig

    I verify my system,I see sub folder of NODE0000 directory is SQL0001

    Please help me if SQL0001.I searched SQL0000 but I can't find it

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Phuc,

      Don't worry that you do not see a SQL00000 directory, the directories begin with SQL00001, followed by SQL00002 and so on.

      Now you can perform this command to get the name of the database located there:

      db2 LIST DB DIRECTORY ON H:

      Once you have the name, if that is the database you want to catalog, you can perform the CATALOG DB command.

      Best regards, Edgardo

  • avatar image
    Former Member
    Oct 07, 2008 at 06:39 AM

    Dear Edgardo Koenig

    I reinstalled SAP SYSTEM,and I installed SAP SYSTEM DB2 with SAP,but I also problem

    when using Configuration Assistant tool.

    "SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031"

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Phuc,

      It seems you come back to the same error message as before. In your case, I would execute LIST DB DIRECTORY command as described in the previous post. Afterwards, post the result of the command execution, to see how we can further proceed.

      Best Regards, Edgardo

  • avatar image
    Former Member
    Oct 07, 2008 at 07:01 AM

    Dear Edgardo Koenig

    db2 list db directory

    System Database Directory

    Number of entries in the directory = 1

    Database 1 entry:

    Database alias = TST

    Database name = TST

    Local database directory = F:\db2\TST

    Database release level = b.00

    Comment = SAP database TST

    Directory entry type = Indirect

    Catalog database partition number = 0

    Alternate server hostname =

    Alternate server port number =

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Phuc,

      Could you please perform the following command:

      db2 "LIST DB DIRECTORY ON F:\db2\TST"

      and provide the output?

      Besides, could you please verify that under the F:\db2\TST directory there is directory with the name of your instance - for example, if your instance name is DB2TST, the path F:\db2\TST\DB2TST must exist - and inside in this directory there should be also a directory named NODE0000.

      If this is true, you should perform the following command to catalog your database:

      db2 "CATALOG DB TST AS <newname> ON F:\db2\TST"

      where <newname> is the alias you want to use.

      Hope this helps.

      Best Regards, Edgardo

  • avatar image
    Former Member
    Oct 07, 2008 at 08:06 AM

    Dear Edgardo Koenig

    When I execute this command db2 "LIST DB DIRECTORY ON F:\db2\TST" and I also executed db2 "CATALOG DB TST AS <newname> ON F:\db2\TST" but when I use this tool which is problem.

    F:\db2\db2tst\db2_software\BIN>db2 "LIST DB DIRECTORY ON F:\db2\TST"

    Local Database Directory on F:\db2\TST

    Number of entries in the directory = 1

    Database 1 entry:

    Database alias = TST

    Database name = TST

    Database directory = SQL00001

    Database release level = b.00

    Comment = SAP database TST

    Directory entry type = Home

    Catalog database partition number = 0

    Database partition number = 0

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Phuc,

      Did you verify what the "Show Command" button shows when using the configuration assistant tool? It is important that you get the same syntax as the command, which have worked by the command line.

      If it is not the same syntax, you must perform the appropriate change to get it work

      Regards, Edgardo

  • avatar image
    Former Member
    Oct 07, 2008 at 08:19 AM

    Dear Edgardo Koenig

    When I run Configuration Assistant tool --> Change

    """SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031

    Explanation:

    The system database directory or local database directory could

    not be found. A database has not been created or it was not

    cataloged correctly.

    The command cannot be processed.

    User Response:

    Verify that the database is created with the correct path

    specification. The Catalog Database command has a path parameter

    which specifies the directory where the database resides.

    sqlcode : -1031

    sqlstate : 58031

    ""

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Phuc,

      The fact is that the TST database is already cataloged in your system. It seems that the Configuration Assistant has some sort of limitation when working with a database in Windows, which is located under a specific directory (i.e:. F:\db2\TST) , instead of a drive (F:\).

      You can perform all the actions of the Configuration Assistant by the use of the command line processor; therefore, if possible, I would try that option.

      The different commands you need are:

      - CATALOG DB -> to catalog a database

      - LIST DB DIRECTORY -> to list the contents of the system database directory / local database directory

      - UNCATALOG DB -> to uncatalog a database

      Best regards, Edgardo