Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / May 2005

Tip: Looking for answers? Try searching our database.

ERROR when using get db cfg command

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy S. - 27 May 2005 00:48 GMT
Hi,

I'm running DB2 UDB v 7.2 FP 9.

I'm connected to my database (testdb) successfully as user db2admin.

then i tried to run the following command:

get db cfg for testdb

and i get the following error:

SQL1403N  The username and/or password supplied is incorrect.
SQLSTATE=08004

I don't understand why I'm getting this error when I'm already
connected??

Any help would be appreciated!
Thanks!
Mark A - 27 May 2005 00:53 GMT
> Hi,
>
[quoted text clipped - 16 lines]
> Any help would be appreciated!
> Thanks!

Does db2admin have sysadm authority?

Try just using "get db cfg" after you have connected
Andy S. - 27 May 2005 20:12 GMT
Hi,

I tried just "get db cfg" and I get the same error as first described.

How else can I check if db2admin has SYSADM authority??
Fred Nurk - 27 May 2005 11:51 GMT
What is the value for SYSADM_GROUP??  Make sure that db2admin is part of
this group.

Or you are trying to get the DB CFG for a remote database.

Cheers,

> Hi,
>
[quoted text clipped - 16 lines]
> Any help would be appreciated!
> Thanks!
Andy S. - 27 May 2005 20:23 GMT
the user "db2admin" is a part of the Windows Administrators group on
the machine on which the DB2 server is located. I'm trying to get the
DB CFG for a remote database - I'm typing my commands from a remote
client machine. When I type the "get db cfg for testdb" on the server
machine itself, it works. How can I achieve the same result from the
client machine??

Thanks!
Gert van der Kooij - 27 May 2005 21:53 GMT
> the user "db2admin" is a part of the Windows Administrators group on
> the machine on which the DB2 server is located. I'm trying to get the
[quoted text clipped - 4 lines]
>
> Thanks!

As I said before you need to attach to the remote system:

db2 attach to <remote node> user db2admin using <pw>
db2 get db cfg for testdb
Mark Yudkin - 29 May 2005 09:03 GMT
> the user "db2admin" is a part of the Windows Administrators group on
> the machine on which the DB2 server is located.

I which case, you also need to configure

db2set -g DB2_GRP_LOOKUP=LOCAL

> Thanks!
Gert van der Kooij - 27 May 2005 16:12 GMT
> Hi,
>
[quoted text clipped - 16 lines]
> Any help would be appreciated!
> Thanks!

You need to attach to the instance before running the command.
Mark A - 27 May 2005 18:31 GMT
> You need to attach to the instance before running the command.

If you have already connected to a database, then an attach is not
necessary.
Gert van der Kooij - 27 May 2005 20:15 GMT
> > You need to attach to the instance before running the command.
>
> If you have already connected to a database, then an attach is not
> necessary.
>  

Since when did this change?
With DB2 V7 fp 6 which we still use at work you must attach
seperately, connect doesn't work.
Mark A - 27 May 2005 23:32 GMT
>> If you have already connected to a database, then an attach is not
>> necessary.
>
> Since when did this change?
> With DB2 V7 fp 6 which we still use at work you must attach
> seperately, connect doesn't work.

If you are on a local machine, or telnet directly into the server, you only
have to connect. I did not realize the OP was connecting to a remote server
from windows.
Jan M. Nelken - 27 May 2005 23:40 GMT
> If you are on a local machine, or telnet directly into the server, you only
> have to connect. I did not realize the OP was connecting to a remote server
> from windows.

If you are on local machine and issue "db2 get db cfg for sample" - since this
command requires instance attachement - a locla attachment to the instance will
be performed for you - using your current credentials (id you are logged on to
the OS).

You may verify that by issuing "db2 attach" command which shows you current
attachement - before and after first command.

Local attachment is persistent (probably in anticipation of next isnatnce level
command) - so you have to explicitly detach if you desire to do so.

Jan M. Nelken
Mark A - 27 May 2005 23:54 GMT
> If you are on local machine and issue "db2 get db cfg for sample" - since
> this command requires instance attachement - a locla attachment to the
[quoted text clipped - 8 lines]
>
> Jan M. Nelken

The OP connected to a database first. I believe that once you connect to a
database, you are implicitly attached to corresponding instance.
Thiru - 28 May 2005 07:55 GMT
Hi,
I guess you are not connected the database. You may check that using
the simple queries such as 'select 1 from sysibm.sysdummy1' after the
connect.

if it is not working then, try this.

connect to <remote db> user <remote user> using <remote password>

Steps to be Noted.
1. Make sure remote db is cataloged.
2. Make sure you authentication is correct.
3. Make sure the remote user is having the authority enough to perform
the required operation.

Connecting to the database will do the automatic attachment.
Cheers,
Thiru.
WantedToBeDBA.
WantedToBeDBA {at} gmail {dot} com
Thiru - 28 May 2005 07:55 GMT
Hi,
I guess you are not connected the database. You may check that using
the simple queries such as 'select 1 from sysibm.sysdummy1' after the
connect.

if it is not working then, try this.

connect to <remote db> user <remote user> using <remote password>

Steps to be Noted.
1. Make sure remote db is cataloged.
2. Make sure you authentication is correct.
3. Make sure the remote user is having the authority enough to perform
the required operation.

Connecting to the database will do the automatic attachment.
Cheers,
Thiru.
WantedToBeDBA.
WantedToBeDBA {at} gmail {dot} com
Gert van der Kooij - 28 May 2005 08:17 GMT
> The OP connected to a database first. I believe that once you connect to a
> database, you are implicitly attached to corresponding instance.

Yes, that's true, but it will only work with V8. With V7 you
definitely need to attach to the remote node if you current user
doesn't have the needed authorizations.
Since the OP is using V7 his db connection doesn't help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.