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.
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.
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.
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.