cancel
Showing results for 
Search instead for 
Did you mean: 

unable to connect database through command line

Former Member
0 Kudos

Dear Experts.

I m not able to connect database through via:

-> db2 connect to <sid> user db2<sid> using <password>

So i raised the issue with SAP .and Sap suggest me to drop and create the instance once again .When i check instance using command db2ilist i get O/p Db2 .

So i have to drop this instance and recreate it again ?

Kindly suggest me as its showing only one instance .

Regards

Ashok

Accepted Solutions (1)

Accepted Solutions (1)

paul_power
Active Contributor
0 Kudos

Hi Ashok,

What error you you get with the connect command and what is written to the db2diag.log?

Dropping and recreating the instance should not take too long but have you tried performing an instance update?

Is this a newly installed system or has it been running for some time?

What was done prior to the connect not wokring? were any passwords changed/ hardware change/ fixpack or release update?

Regards,

Paul

Former Member
0 Kudos

Hi ,

Hi All,

Solution manager is running on win2003 server with db2 database.When i m trying to connect db2 from command promt i m getting error.I m following these step.

1.Loging with db2 user

2.In command promt when i m tring to check the cfg file getting error.

DB2 get db cfg for fcs.

SQL1013N The database alias name or database name "FCS" could not be found.

SQLSTATE=42705

I m pasting the snapshot of of database manager.

C:\>db2 get snapshot for dbm

Database Manager Snapshot

Node name =

Node type = Enterprise Server Edition with

local and remote clients

Instance name = DB2

Number of database partitions in DB2 instance = 1

Database manager status = Active

Product name = DB2 v9.1.600.703

Service level = s081007 (WR21415)

Private Sort heap allocated = 0

Private Sort heap high water mark = 0

Post threshold sorts = Not Collected

Piped sorts requested = 0

Piped sorts accepted = 0

Start Database Manager timestamp = 07/29/2010 11:35:25.534766

Last reset timestamp =

Snapshot timestamp = 08/03/2010 18:43:14.492590

Remote connections to db manager = 0

Remote connections executing in db manager = 0

Local connections = 0

Local connections executing in db manager = 0

Active local databases = 0

High water mark for agents registered = 2

High water mark for agents waiting for a token = 0

Agents registered = 2

Agents waiting for a token = 0

Idle agents = 0

Committed private Memory (Bytes) = 11141120

Switch list for db partition number 0

Buffer Pool Activity Information (BUFFERPOOL) = OFF

Lock Information (LOCK) = OFF

Sorting Information (SORT) = OFF

SQL Statement Information (STATEMENT) = OFF

Table Activity Information (TABLE) = OFF

Take Timestamp Information (TIMESTAMP) = ON 07/29/2010 11:35:25.534766

Unit of Work Information (UOW) = OFF

Agents assigned from pool = 2542

Agents created from empty pool = 4

Agents stolen from another application = 0

High water mark for coordinating agents = 2

Max agents overflow = 0

Hash joins after heap threshold exceeded = 0

Total number of gateway connections = 0

Current number of gateway connections = 0

Gateway connections waiting for host reply = 0

Gateway connections waiting for client request = 0

Gateway connection pool agents stolen = 0

Memory usage for database manager:

Memory Pool Type = Database Monitor Heap

Current size (bytes) = 65536

High water mark (bytes) = 65536

Configured size (bytes) = 327680

Memory Pool Type = Other Memory

Current size (bytes) = 10092544

High water mark (bytes) = 10092544

Configured size (bytes) = 4292870144

*So i raised this issue to Sap regarding this they told that u have to droped the instance and create again.

But i find only one instance i.e DB2 when i check from db2ilist.

Typically our SAP system should run on DB2 instance

db2<dbsid>.But i m not able to find that.*

KIndly suggest me where i m getting wrong.

REgards

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

do you have multiple software copies of DB2 installed on your system?

Maybe you have used the wrong a DB2 CLP of the wrong software copy.

The SAP DB2 instance name should be db2sid .

Regards

Frank

Former Member
0 Kudos

Hi Frank,

Thanks for your reply,Kindly suggest me what to do ? As i m getting only one instance that is DB2 by runiing command .According to Sap reply they told me that to drop and recreate instance once again .

I m pasting reply from Sap .

First check what instances are listed with command

db2ilist

to drop an instance you use the command

db2idrop

http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/r000205...

then db2icrt is used to create the instance again

http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/start/t00067...

after that, please run db2iupt to update the instance

  • run an instance update (db2iupdt) as root when the db is stopped *

See Note 1138549

Then check if the connection works.

Regards

Ashok

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I did suggest to check if multiple DB2 software copies have been installed on you Windows box. On Windows you can check this in the Windows registry ( regedit ) or you can use a tool like db2swtch to display the software copies on your computer.

If multiple software copies are installed, you may want to deinstall an unused one or switch the default software copy ( db2swtch ). Under the SAP software copy a instance with name db2sid should exist.

Since on your current copy only the default instance DB2 is displayed and no database exists, this looks like an unused software copy.

Regards

Frank

Former Member
0 Kudos

Hi Frank,

Thanks for your reply .I check DB2 software copies Its Showing two db2 copies name.

*DB2 copy name DB2 INSTALLATION PATH

DB2COPY1 D:\db2\IBM\sqlib

SAPDB2FCS D:\DB2\DB2FCS\DB2_SOFTWARE*

So i have to di-install one.

Kindly suggest

Regards

Ashok

Edited by: ashok singh on Sep 28, 2010 2:47 PM

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ashok,

obviously the SAPDB2FCS copy is the SAP DB2 software copy. Since the default copy DB2COPY1 currently does not contain a database you may deinstall it with Windows means.

However if you just want to connect you do not neccessaryly need to deinstall a DB2 software copy. You can just use a DB2 CLP window of the right software copy. You should find entries for both copies under "Programs -> IBM DB2" .

Regards

Frank

Former Member
0 Kudos

Hi Martin ,

Thanks for reply , Issue is resolved.

Regards

Ashok

Answers (1)

Answers (1)

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ashok,

could you please be more specific. What is the return of your CLP command?

Are you trying to connect from db server or an SAP appserver. Is your system using the CLI driver client?

Regards

Frank