cancel
Showing results for 
Search instead for 
Did you mean: 

db2 connection problem

Former Member
0 Kudos

Hello everybody,

I am really new to DB2 and actually I am facing a problem to it concerning the connection to the database.

When I try to connect to the SAP DB system I receive the following error:

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

But, nothing has been changed in the file system.

db2 list db directory

Local database directory = L:\db2\db2wd1

db2ilist

DB2WD1

Unfortunately since I have noticed this problem no current backup of the DB system exists.

We are using WIN2K8R2 with DB2 Version 9.7 FP5.

This problem seems to appear from nowhere.

Please assist.

Best regards

Henning

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi,

as far as I can see the following patches have been installed:

- KB2936068

- KB2928562

- KB2922229

- KB2908783

- KB2800095

Former Member
0 Kudos

Please close thread if resolved...

Cheers

Pranjal

Former Member
0 Kudos

Today we have installed new Microsoft patches for our servers.

Don't know why but the connection problem has been disappeared.

Thanks to all for your Support.

Best regards

Henning

Former Member
0 Kudos

Possibilities would be due to Windows Services....

karthikeyan_natarajan4
Active Contributor
0 Kudos

Dear Henning,

If possible could you please let the community know the name of the Win patches, which solved the issue will be helpful for others.

regards

kartik

Former Member
0 Kudos

Hello,

I have just run the command db2 catalog database WD1 on L:/db2/db2wd1

I haven't received any message back from db2cmd yet.

What happens now? What causes this command?

Regards

Henning

former_member188883
Active Contributor
0 Kudos

Hi Henning,

CATALOG DATABASE automatically creates a system database directory if one does not exist. The system database directory is stored on the path that contains the database manager instance that is being used, and is maintained outside of the database.


It may take some time. Monitor logs in db2diag.log


Regards,

Deepak Kori

Former Member
0 Kudos

Hi.

Please check the user also from which you trying to connect try with db2sid user also ifyou want first your database in Console or control central its easy ur issue wil get resolved

Former Member
0 Kudos

Hi Henning,

can you paste the output from db2set -all

Best regards

Joachim

Former Member
0 Kudos

Hi Henning,

also paste the last entries from the db2diag.log after the unsuccessfull connection.

Best regards

Joachim

Former Member
0 Kudos

Here is a part of the db2diag.log file

see attachment

Former Member
0 Kudos

here is the file

Former Member
0 Kudos

Hi Henning,

have you checked Pranjals proposal? Please connect to the Windows Server with the db2 instance owner (db2wd1) and then connect to  the database.

Best regards

Joachim Müller

Former Member
0 Kudos

Hi,

I did it yesterday. But I cannot connect to the database using db2<sid>.

Same error message.

Regards

Former Member
0 Kudos

Hello everybody,

the following system variables are set:

DB2DBDFT                    WD1 

DB2INSTANCE               db2wd1

DBMS_TYPE                   db6

DBS_DB6_SCHEMA     sapwd1

DBS_DB6_USER           sapwd1

Former Member
0 Kudos

Hi Henning,

try: db2 connect to wd1

best regards

Joachim

Former Member
0 Kudos

Hello Joachim,

this is exactly what I mean. I cannot connect to db2 using "db2 connect to wd1".

I receive the above mentioned error message.

Best regards

Henning

Former Member
0 Kudos

Hi Henning,

but in your last message you connected to "db2wd1" not "wd1"...

Best regards

Joachim

Former Member
0 Kudos

Hi,

yes I did because I was told to do so.

Former Member
0 Kudos

Hi Henning,

then trust me and use db2 connect to wd1 😉

db2wd1 is the instance and wd1 is the database name...

Best regards

Joachim

Former Member
0 Kudos

Joachim,

as I told you, when I run the command "db2 connect to wd1" I receive the above mentioned error message: SQL1031N The database directory cannot be found.....

Regards

Henning

former_member188883
Active Contributor
0 Kudos

Hi Henning,

Please check whether you have all the folders intact under L:\db2\db2wd1

Just to ensure nothing has got deleted

Refer similar solution in thread http://scn.sap.com/thread/3469409

Hope this helps.

Regards,

Deepak Kori

karthikeyan_natarajan4
Active Contributor
0 Kudos

Hi Henning,

Have you set the DB2 instance environment variable. can you paste the output of

db2 connect to DB2WD1

regards

kartik

Former Member
0 Kudos

Hello Kartik,

thanks for your reply.

Here is the output when entering db2 connect to db2wd1

SQL1013N The database alias name or database name "DB"WD1" could not be found. SQLSTATE=42705

former_member188883
Active Contributor
0 Kudos

Hi Henning,

It looks to be problem with environment variables.

Could you follow the solution in the link below .

http://www-01.ibm.com/support/docview.wss?uid=swg21587816

Hope this helps.

Regards,

Deepak Kori

Former Member
0 Kudos

Hi,

thank you very much.

But I do not really understand the doing.

My instance name is: db2wd1

What do I need to set?

set db2instance=db2wd1  ??? Is this what I need to do?

And then run db2 connect to wd1 ???