Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2002
    Location
    Omaha, NE
    Posts
    25

    Unanswered: SQL1031N: The database directory... could not be found

    I installed DB2 on my Linux machine, and am trying to connect to the SAMPLE database. I used to be able to connect, but just a few days ago, I started receiving the error SQL1031N when entering the command "db2 connect to sample."

    I looked at my profile and it was pointing to the correct place, and I didn't delete or install anything since it worked last.

    Any thoughts would be appreciated. Thanks.

    Dave

    Full Error Text
    -----------------
    SQL1031N The database directory cannot be found on the indicated file system.

    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

  2. #2
    Join Date
    Nov 2002
    Location
    Omaha, NE
    Posts
    25
    I don't know what was actually causing the error, but I un-installed and re-installed DB2 and it is working fine again.

  3. #3
    Join Date
    Sep 2002
    Posts
    456

    Database directory

    maybe somehow by mistake you deleted the directory from file system?

    dollar
    Originally posted by djschmitt
    I don't know what was actually causing the error, but I un-installed and re-installed DB2 and it is working fine again.

  4. #4
    Join Date
    Nov 2002
    Location
    Omaha, NE
    Posts
    25
    I never really knew what the database directory was, but I figured it was either in /home/db2inst1/sqllib or in /opt/IBM/db2/V8.1 and both those existed.

    Either way, my initial install was messed up because after I re-installed, I have a bunch of directories I didn't have before.

  5. #5
    Join Date
    Sep 2002
    Posts
    456

    DB2 directory

    Actually database directory is located under the path where you created the database. If you issue the following command:

    db2 get dbm cfg

    and look for the value of DFTDBPATH parameter, this will give you an idea of default path where if you don't specify a path in your create database command the database manager will create the directory. You can however override this parameter and place this directory where ever you want.

    dollar

    Originally posted by djschmitt
    I never really knew what the database directory was, but I figured it was either in /home/db2inst1/sqllib or in /opt/IBM/db2/V8.1 and both those existed.

    Either way, my initial install was messed up because after I re-installed, I have a bunch of directories I didn't have before.

  6. #6
    Join Date
    Nov 2002
    Location
    Omaha, NE
    Posts
    25
    Thanks for the command. That is along the lines of what I was looking for. I had no idea how to find out where anything was installed.

    Thanks again.

    Dave

  7. #7
    Join Date
    Jan 2002
    Location
    USA
    Posts
    53
    The database directory should be at /home/db2inst1/db2inst1.

    I had the same problem before. because I removed /home/db2inst1/db2inst1

Posting Permissions

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