Connecting Tech Pros Worldwide Forums | Help | Site Map

LIST APPLICATIONS fails ....

Raquel
Guest
 
Posts: n/a
#1: Nov 12 '05
UDB PE V8.0 on Win XP. I issue the following commands:

1. CONNECT TO SAMPLE USER db2adming USING xxxxx
The output is:

Database Connection Information
Database server = DB2/NT 8.1.3
SQL authorization ID = DB2ADMIN
Local database alias = SAMPLE

2. Next I issue the following command:
LIST APPLICATION FOR DATABASE SAMPLE

It gives me error message:

SQL30082N Attempt to establish connection failed with security reason
"24"
("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001


What is wrong? There is no provision for specifying userid and
password on LIST APPLICATION command; more ever I am already connected
to SAMPLE, so why is it bothering to connect again?

TIA
Raquel.

Gert van der Kooij
Guest
 
Posts: n/a
#2: Nov 12 '05

re: LIST APPLICATIONS fails ....


[color=blue]
>
> What is wrong? There is no provision for specifying userid and
> password on LIST APPLICATION command; more ever I am already connected
> to SAMPLE, so why is it bothering to connect again?
>
> TIA
> Raquel.
>[/color]

The list application command needs an attachment to the instance. It
tries to establish an attachment using the current OS userid if it
isn't attached.
You need to use the 'attach to db2 user db2admin using ....' before
the list application command.
Raquel
Guest
 
Posts: n/a
#3: Nov 12 '05

re: LIST APPLICATIONS fails ....


> The list application command needs an attachment to the instance. It[color=blue]
> tries to establish an attachment using the current OS userid if it
> isn't attached.
> You need to use the 'attach to db2 user db2admin using ....' before
> the list application command.[/color]

ok, I am even more confused now. Does a CONNECT TO DATABASE not
'implicitly' also mean that I am also attached to db2 instance? Can I
connect to a database without being attached to the instance that
database resides in?

TIA
Raquel.
Mark A
Guest
 
Posts: n/a
#4: Nov 12 '05

re: LIST APPLICATIONS fails ....


> > The list application command needs an attachment to the instance. It[color=blue][color=green]
> > tries to establish an attachment using the current OS userid if it
> > isn't attached.
> > You need to use the 'attach to db2 user db2admin using ....' before
> > the list application command.[/color]
>
> ok, I am even more confused now. Does a CONNECT TO DATABASE not
> 'implicitly' also mean that I am also attached to db2 instance? Can I
> connect to a database without being attached to the instance that
> database resides in?
>
> TIA
> Raquel.[/color]

With a connection to a database, you are attached. However, List
Applications requires specific authority to execute.See the Command
Reference for details. Try it with the instance owner id, and if that does
not work, report back in this forum.


Jan M. Nelken
Guest
 
Posts: n/a
#5: Nov 12 '05

re: LIST APPLICATIONS fails ....


Raquel wrote:[color=blue]
> UDB PE V8.0 on Win XP. I issue the following commands:
>
> 1. CONNECT TO SAMPLE USER db2adming USING xxxxx
> The output is:
>
> Database Connection Information
> Database server = DB2/NT 8.1.3
> SQL authorization ID = DB2ADMIN
> Local database alias = SAMPLE
>
> 2. Next I issue the following command:
> LIST APPLICATION FOR DATABASE SAMPLE
>
> It gives me error message:
>
> SQL30082N Attempt to establish connection failed with security reason
> "24"
> ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
>
>
> What is wrong? There is no provision for specifying userid and
> password on LIST APPLICATION command; more ever I am already connected
> to SAMPLE, so why is it bothering to connect again?
>
> TIA
> Raquel.[/color]

I am confused: from the example you showed, you are:
a) connecting as user db2adming
b) reply indicates that you are connected as user db2admin

Where you are issuing those commands from? From CLP, Command Line
Processor, Command Editor?

Connection to the database does not mean attachment is made. Attachment
- implicit - will be attempted when you issue a command which require
instance attachment.

Please indicate:

a) what user id is logged on to the Windows XP machine? Which groups he
is member of?
b) what userid you are connecting with to database? If it is db2adming
- which groups he is member of?
c) What is the value of SYSADM_GROUP, SYSCTRL_GROUP, SYSMAINT_GROUP and
SYSMON_GROUP of database manager configuration?
d) is this machine a member of domain?
e) is database sample local on this machine or remote?


I tried to recreate your problem, but failed to do so. More information
is required.

Jan M. Nelken

Gert van der Kooij
Guest
 
Posts: n/a
#6: Nov 12 '05

re: LIST APPLICATIONS fails ....


In article <9a73b58d.0406132010.2ebe6736@posting.google.com >, Raquel
(raquel_rodriguezus@yahoo.com) says...[color=blue][color=green]
> > The list application command needs an attachment to the instance. It
> > tries to establish an attachment using the current OS userid if it
> > isn't attached.
> > You need to use the 'attach to db2 user db2admin using ....' before
> > the list application command.[/color]
>
> ok, I am even more confused now. Does a CONNECT TO DATABASE not
> 'implicitly' also mean that I am also attached to db2 instance? Can I
> connect to a database without being attached to the instance that
> database resides in?
>
> TIA
> Raquel.
>[/color]

Did you try it?
Raquel
Guest
 
Posts: n/a
#7: Nov 12 '05

re: LIST APPLICATIONS fails ....


I am sorry about a typo in my original message. It is 'db2admin' and
not 'db2adming' that I am using to connect to the database. I am using
command line processor for these operations. The instance owner is
also db2admin and all the databases in this instance were also created
using db2admin. In short, db2admin is the only valid ID that this
configuration recognizes. This is UDB PE 8.1 and the database/intance
resides on my local Win XP.

So, in CLP:

Case 1: Issuing the following series of commands:

a. CONNECT TO SAMPLE user db2admin using xxxxx

Database Connection Information
Database server = DB2/NT 8.1.3
SQL authorization ID = DB2ADMIN
Local database alias = SAMPLE

b. LIST APPLICATIONS

SQL30082N Attempt to establish connection failed with security reason
"24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001

Case 2: Issuing the following series of commands:

a. ATTACH TO DB2 user db2admin using xxxxxx

Instance Attachment Information
Instance server = DB2/NT 8.1.3
Authorization ID = DB2ADMIN
Local instance alias = DB2

b. LIST APPLICATIONS - This command successfully executes now.

So, basically, even though I am using the same userid and password
for instance attachment as well as for database connection, I am
required to 'explictly' attach to the instance to issue LIST
APPLICATIONS; even though database connection implictly attaches to
the instance.

Is this correct? Thanks to everyone who is helping me understand
this.

TIA
Raquel.
Mark A
Guest
 
Posts: n/a
#8: Nov 12 '05

re: LIST APPLICATIONS fails ....



"Raquel" <raquel_rodriguezus@yahoo.com> wrote in message
news:9a73b58d.0406142117.411b65aa@posting.google.c om...[color=blue]
> I am sorry about a typo in my original message. It is 'db2admin' and
> not 'db2adming' that I am using to connect to the database. I am using
> command line processor for these operations. The instance owner is
> also db2admin and all the databases in this instance were also created
> using db2admin. In short, db2admin is the only valid ID that this
> configuration recognizes. This is UDB PE 8.1 and the database/intance
> resides on my local Win XP.
>
> So, in CLP:
>
> Case 1: Issuing the following series of commands:
>
> a. CONNECT TO SAMPLE user db2admin using xxxxx
>
> Database Connection Information
> Database server = DB2/NT 8.1.3
> SQL authorization ID = DB2ADMIN
> Local database alias = SAMPLE
>
> b. LIST APPLICATIONS
>
> SQL30082N Attempt to establish connection failed with security reason
> "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
>
> Case 2: Issuing the following series of commands:
>
> a. ATTACH TO DB2 user db2admin using xxxxxx
>
> Instance Attachment Information
> Instance server = DB2/NT 8.1.3
> Authorization ID = DB2ADMIN
> Local instance alias = DB2
>
> b. LIST APPLICATIONS - This command successfully executes now.
>
> So, basically, even though I am using the same userid and password
> for instance attachment as well as for database connection, I am
> required to 'explictly' attach to the instance to issue LIST
> APPLICATIONS; even though database connection implictly attaches to
> the instance.
>
> Is this correct? Thanks to everyone who is helping me understand
> this.
>
> TIA
> Raquel.[/color]

I may have been mistaken. Normally I use the following command on a
UNIX/Linux telnet session (which is considered local):

db2 list applications for db sample show detail

So maybe listing all application for the entire instance requires an
explicit attach to that instance. Or maybe it depends on how many instances
you have.

Here is what the command reference says:

Required connection: Instance. To list applications for a remote instance,
it is necessary to first attach to that instance.


Raquel
Guest
 
Posts: n/a
#9: Nov 12 '05

re: LIST APPLICATIONS fails ....


By the way, I tested the same procedure using the Control Center and
it behaves differently (than Command Line processor).

In the control center:

1. If I first make a connection to SAMPLE database and then try to
view "Applications" for db2 instance (by right clicking "db2"
instance), it does show me all the applications...which means LIST
APPLICATIONS command is using the same implicit attachment to db2 to
execute this command.

2. If I don't make a database connection, but directly try to view
"Applications" for db2 instance (by right clicking "db2" instance), it
does prompt me for userid and password and subsequently executes the
command; this behavior is as expected.

Thanks.
Raquel.
Mark A
Guest
 
Posts: n/a
#10: Nov 12 '05

re: LIST APPLICATIONS fails ....


"Raquel" <raquel_rodriguezus@yahoo.com> wrote in message
news:9a73b58d.0406142128.7f45f340@posting.google.c om...[color=blue]
> By the way, I tested the same procedure using the Control Center and
> it behaves differently (than Command Line processor).
>
> In the control center:
>
> 1. If I first make a connection to SAMPLE database and then try to
> view "Applications" for db2 instance (by right clicking "db2"
> instance), it does show me all the applications...which means LIST
> APPLICATIONS command is using the same implicit attachment to db2 to
> execute this command.
>
> 2. If I don't make a database connection, but directly try to view
> "Applications" for db2 instance (by right clicking "db2" instance), it
> does prompt me for userid and password and subsequently executes the
> command; this behavior is as expected.
>
> Thanks.
> Raquel.[/color]

Try using the OS command prompt (not the DB2 CLP)::

db2 connect to sample
db2 list applications


Mark Yudkin
Guest
 
Posts: n/a
#11: Nov 12 '05

re: LIST APPLICATIONS fails ....


Instance attachment and database connections are two distinct things. Using
an explicit db2admin for connection will not automatically propogate to
using db2admin for instance attachment. The default in both cases is your
(Windows XP) logon ID, so you need to override both of these.

The alternative solution is to correlate user ids between DB2 rights and
Windows. Once you have done this, you can use client or Kerberos
authentication, at which point you get to forget about all "user userid
using password" specifications. This makes life much easier, and is
therefore highly recommended.

- Mark

"Raquel" <raquel_rodriguezus@yahoo.com> wrote in message
news:9a73b58d.0406142117.411b65aa@posting.google.c om...[color=blue]
> I am sorry about a typo in my original message. It is 'db2admin' and
> not 'db2adming' that I am using to connect to the database. I am using
> command line processor for these operations. The instance owner is
> also db2admin and all the databases in this instance were also created
> using db2admin. In short, db2admin is the only valid ID that this
> configuration recognizes. This is UDB PE 8.1 and the database/intance
> resides on my local Win XP.
>
> So, in CLP:
>
> Case 1: Issuing the following series of commands:
>
> a. CONNECT TO SAMPLE user db2admin using xxxxx
>
> Database Connection Information
> Database server = DB2/NT 8.1.3
> SQL authorization ID = DB2ADMIN
> Local database alias = SAMPLE
>
> b. LIST APPLICATIONS
>
> SQL30082N Attempt to establish connection failed with security reason
> "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001
>
> Case 2: Issuing the following series of commands:
>
> a. ATTACH TO DB2 user db2admin using xxxxxx
>
> Instance Attachment Information
> Instance server = DB2/NT 8.1.3
> Authorization ID = DB2ADMIN
> Local instance alias = DB2
>
> b. LIST APPLICATIONS - This command successfully executes now.
>
> So, basically, even though I am using the same userid and password
> for instance attachment as well as for database connection, I am
> required to 'explictly' attach to the instance to issue LIST
> APPLICATIONS; even though database connection implictly attaches to
> the instance.
>
> Is this correct? Thanks to everyone who is helping me understand
> this.
>
> TIA
> Raquel.[/color]


Raquel
Guest
 
Posts: n/a
#12: Nov 12 '05

re: LIST APPLICATIONS fails ....


> Try using the OS command prompt (not the DB2 CLP)::[color=blue]
>
> db2 connect to sample
> db2 list applications[/color]

Same result as with CLP. It requires an explicit connection to the
instance for LIST APPLICATIONS to go through.

Regards,
Raquel.
Closed Thread