vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| > > 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. > 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. |
| |||
| > 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. 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. |
| |||
| > > 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. > > 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. 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. |
| |||
| Raquel wrote: > 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. 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 |
| |||
| In article <9a73b58d.0406132010.2ebe6736@posting.google.com >, Raquel (raquel_rodriguezus@yahoo.com) says... > > 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. > > 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. > Did you try it? |
| |||
| 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. |
| |||
| "Raquel" <raquel_rodriguezus@yahoo.com> wrote in message news:9a73b58d.0406142117.411b65aa@posting.google.c om... > 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. 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. |
| |||
| 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. |
| ||||
| "Raquel" <raquel_rodriguezus@yahoo.com> wrote in message news:9a73b58d.0406142128.7f45f340@posting.google.c om... > 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. Try using the OS command prompt (not the DB2 CLP):: db2 connect to sample db2 list applications |