dbTalk Databases Forums  

CREATE SERVER authentication problem

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss CREATE SERVER authentication problem in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bill
 
Posts: n/a

Default CREATE SERVER authentication problem - 01-18-2011 , 12:30 PM






Hi there,

I'm running DB2 9.5 under Linux and I'm trying to run the CREATE
SERVER command, but
I get an error message about the authorization id and password.
However, I can
use that same id and password to connect to the database fine.

The command I'm trying to run is:

db2 CREATE SERVER HCFG TYPE DB2/UDB VERSION '9.5' WRAPPER DRDA
AUTHORIZATION "hpssdb" PASSWORD "test" OPTIONS\( ADD DBNAME \'HCFG
\'\)

and the output is:

DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL1101N Remote database "HCFG" on node "<unknown>" could not be
accessed
with the specified authorization id and password. SQLSTATE=08004


The db2diag.log contains:
2011-01-18-11.15.34.013707-420 I95868E441 LEVEL: Warning
PID : 4166258 TID : 47469018736960PROC : db2sysc 0
INSTANCE: hpssdb NODE : 000 DB : HCFG
APPHDL : 0-14839
EDUID : 74 EDUNAME: db2agent (HCFG) 0
FUNCTION: DB2 UDB, bsu security, sqlexLogPluginMessage, probe:20
DATA #1 : String with size, 65 bytes
Password validation for user hpssdb failed with rc = -2146500507

2011-01-18-11.15.34.013983-420 I96310E590 LEVEL: Error
PID : 4166258 TID : 47466720258368PROC : db2sysc 0
INSTANCE: hpssdb NODE : 000 DB : HSUBSYS1
APPHDL : 0-14837 APPID: *LOCAL.hpssdb.110118181504
AUTHID : HPSSDB
EDUID : 34 EDUNAME: db2agent (HSUBSYS1) 0
FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:10
DATA #1 : String, 16 bytes
DRDA Server:
DATA #2 : String with size, 4 bytes
HCFG
DATA #3 : String, 16 bytes
Function name:
DATA #4 : String with size, 13 bytes
DriverConnect

2011-01-18-11.15.34.014110-420 I96901E793 LEVEL: Error
PID : 4166258 TID : 47466720258368PROC : db2sysc 0
INSTANCE: hpssdb NODE : 000 DB : HSUBSYS1
APPHDL : 0-14837 APPID: *LOCAL.hpssdb.110118181504
AUTHID : HPSSDB
EDUID : 34 EDUNAME: db2agent (HSUBSYS1) 0
FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:20
DATA #1 : String, 16 bytes
ODBC native err:
DATA #2 : String with size, 6 bytes
-30082
DATA #3 : String, 16 bytes
ODBC sqlstate:
DATA #4 : String with size, 6 bytes
08001.
DATA #5 : String, 16 bytes
ODBC error txt:
DATA #6 : String with size, 127 bytes
[IBM][CLI Driver] SQL30082N Security processing failed with reason
"24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001


However, I can connect to that database with the same id and
password fine:

db2 connect to hcfg user hpssdb using test

Database Connection Information

Database server = DB2/LINUXX8664 9.5.4
SQL authorization ID = HPSSDB
Local database alias = HCFG



Am I doing something wrong here or is there a way I can figure out
why this
is failing?


Thanks for any help!

Bill

Reply With Quote
  #2  
Old   
Lennart Jonsson
 
Posts: n/a

Default Re: CREATE SERVER authentication problem - 01-18-2011 , 12:59 PM






On 2011-01-18 19:30, Bill wrote:
[....]
Quote:

Am I doing something wrong here or is there a way I can figure out
why this
is failing?

Not sure what the problem is, here is how I create the server in case
you would like to give it a try:

#> cat template.dd_
[...]

CONNECT TO @@DATABASE@@;

CREATE SERVER @@FEDERATED@@ TYPE DB2/UDB VERSION 9
WRAPPER DRDA AUTHORIZATION "@@USERNAME@@" PASSWORD "@@PASSWD@@"
OPTIONS( DBNAME '@@FEDERATED@@', PASSWORD 'Y');

CREATE USER MAPPING FOR "@@INSTANCE_OWNER@@" SERVER "@@FEDERATED@@"
OPTIONS ( REMOTE_AUTHID '@@USERNAME@@', REMOTE_PASSWORD
'@@PASSWD@@');

[...]

where the @@variables@@ are

sed -e "s/@@DATABASE@@/<where to set up nicknames>/g" \
-e "s/@@FEDERATED@@/<db which nicknames refers to>/g" \
-e "s/@@USERNAME@@/<username for federated db>/g" \
-e "s/@@PASSWD@@/<password for federated db>/g" \
< template.dd_ > template.ddl

db2 -tf template.ddl

[...]

/Lennart

Reply With Quote
  #3  
Old   
Bill
 
Posts: n/a

Default Re: CREATE SERVER authentication problem - 01-18-2011 , 01:31 PM



On Jan 18, 11:59*am, Lennart Jonsson <erik.lennart.jons... (AT) gmail (DOT) com>
wrote:
Quote:
On 2011-01-18 19:30, Bill wrote:
[....]



* * Am I doing something wrong here or is there a way I can figure out
why this
* * is failing?

Not sure what the problem is, here is how I create the server in case
you would like to give it a try:

#> cat template.dd_
[...]

CONNECT TO @@DATABASE@@;

CREATE SERVER @@FEDERATED@@ TYPE DB2/UDB VERSION 9
* * * * WRAPPER DRDA AUTHORIZATION "@@USERNAME@@" PASSWORD "@@PASSWD@@"
* * * * OPTIONS( DBNAME '@@FEDERATED@@', PASSWORD 'Y');

CREATE USER MAPPING FOR "@@INSTANCE_OWNER@@" SERVER "@@FEDERATED@@"
* * * * OPTIONS ( REMOTE_AUTHID '@@USERNAME@@', REMOTE_PASSWORD
'@@PASSWD@@');

[...]

where the @@variables@@ are

sed -e "s/@@DATABASE@@/<where to set up nicknames>/g" \
* * -e "s/@@FEDERATED@@/<db which nicknames refers to>/g" \
* * -e "s/@@USERNAME@@/<username for federated db>/g" \
* * -e "s/@@PASSWD@@/<password for federated db>/g" \
* * *< template.dd_ > template.ddl

db2 -tf template.ddl

[...]

/Lennart
Okay, thanks I'll try that.

Bill

Reply With Quote
  #4  
Old   
The Boss
 
Posts: n/a

Default Re: CREATE SERVER authentication problem - 01-18-2011 , 04:36 PM



On Jan 18, 7:30*pm, Bill <william.david.ander... (AT) gmail (DOT) com> wrote:
Quote:
* *Hi there,

* *I'm running DB2 9.5 under Linux and I'm trying to run the CREATE
SERVER command, but
* *I get an error message about the authorization id and password.
However, I can
* *use that same id and password to connect to the database fine.

* *The command I'm trying to run is:

db2 CREATE SERVER HCFG TYPE DB2/UDB VERSION '9.5' WRAPPER DRDA
AUTHORIZATION "hpssdb" *PASSWORD "test" OPTIONS\( ADD DBNAME \'HCFG
\'\)

* *and the output is:

DB21034E *The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. *During SQL processing it
returned:
SQL1101N *Remote database "HCFG" on node "<unknown>" could not be
accessed
with the specified authorization id and password. *SQLSTATE=08004

* The db2diag.log contains:
2011-01-18-11.15.34.013707-420 I95868E441 * * * * *LEVEL: Warning
PID * * : 4166258 * * * * * * *TID *: 47469018736960PROC : db2sysc 0
INSTANCE: hpssdb * * * * * * * NODE : 000 * * * * *DB * : HCFG
APPHDL *: 0-14839
EDUID * : 74 * * * * * * * * * EDUNAME: db2agent (HCFG) 0
FUNCTION: DB2 UDB, bsu security, sqlexLogPluginMessage, probe:20
DATA #1 : String with size, 65 bytes
Password validation for user hpssdb failed with rc = -2146500507

2011-01-18-11.15.34.013983-420 I96310E590 * * * * *LEVEL: Error
PID * * : 4166258 * * * * * * *TID *: 47466720258368PROC : db2sysc 0
INSTANCE: hpssdb * * * * * * * NODE : 000 * * * * *DB * : HSUBSYS1
APPHDL *: 0-14837 * * * * * * *APPID: *LOCAL.hpssdb.110118181504
AUTHID *: HPSSDB
EDUID * : 34 * * * * * * * * * EDUNAME: db2agent (HSUBSYS1) 0
FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:10
DATA #1 : String, 16 bytes
DRDA Server:
DATA #2 : String with size, 4 bytes
HCFG
DATA #3 : String, 16 bytes
Function name:
DATA #4 : String with size, 13 bytes
DriverConnect

2011-01-18-11.15.34.014110-420 I96901E793 * * * * *LEVEL: Error
PID * * : 4166258 * * * * * * *TID *: 47466720258368PROC : db2sysc 0
INSTANCE: hpssdb * * * * * * * NODE : 000 * * * * *DB * : HSUBSYS1
APPHDL *: 0-14837 * * * * * * *APPID: *LOCAL.hpssdb.110118181504
AUTHID *: HPSSDB
EDUID * : 34 * * * * * * * * * EDUNAME: db2agent (HSUBSYS1) 0
FUNCTION: DB2 UDB, drda wrapper, report_error_message, probe:20
DATA #1 : String, 16 bytes
ODBC native err:
DATA #2 : String with size, 6 bytes
-30082
DATA #3 : String, 16 bytes
ODBC sqlstate:
DATA #4 : String with size, 6 bytes
08001.
DATA #5 : String, 16 bytes
ODBC error txt:
DATA #6 : String with size, 127 bytes
[IBM][CLI Driver] SQL30082N *Security processing failed with reason
"24" ("USERNAME AND/OR PASSWORD INVALID"). *SQLSTATE=08001

* *However, I can connect to that database with the same id and
password fine:

*db2 connect to hcfg user hpssdb using test

* *Database Connection Information

*Database server * * * *= DB2/LINUXX8664 9.5.4
*SQL authorization ID * = HPSSDB
*Local database alias * = HCFG

* * Am I doing something wrong here or is there a way I can figure out
why this
* * is failing?

* * Thanks for any help!

* * Bill
Hi Bill,

you may be hitting a problem like described in the link below, where
the shell has problems interpreting single and double quotes:
http://www.dbforums.com/db2/1651646-...9-5-4-aix.html

You may be better off by putting the "CREATE SERVER" statement into a
separate file and run it with db2 -tf <your file>, or alternatively
run the statement in a DB2 shell instead of an OS shell.

HTH.

--
Jeroen

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.