Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New WebSphere install gives errors connecting to DB2

Status
Not open for further replies.

mcherm

Programmer
Oct 10, 2002
17
US
I perform a fresh install of WebSphere 4.0 AE on my machine (and it installs DB2 as part of that process). After the install, I attempt to start the "IBM WS AdminServer 4.0" I get an error in the tracefile specifying that:

Code:
Failure to create a data source: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] SQL3282N  The supplied credentials are not valid.[code]

Apparently WebSphere cannot log into DB2... but I have no idea why this would be!

If anyone can suggest a solution or a line of testing which might help, please let me know. If there is some obvious test I should run, or other info I should have provided, please let me know!

Thanks in advance for any help...

-- Michael Chermside
 
A few additional points I should have mentioned:

[ul]
[li] I'm running on Win2000
[li] I DID successfully run C:\SQLLIB\java12\usejdbc2.bat before trying to start WebSphere.
[li] I DID create a separate user to be the "owner" under which DB2 and WebSphere ran. This user IS a member of the "Administrators" group.
[/ul]

Those were the related suggestions that I understood from the older thread below about "Server Specific Error 10".
 
In my continued attempt to dribble out any bits of information that might be helpful, I tried following fearo's advice and running $WAS_HOME/bin/adminserver.bat instead of starting up the service. It still didn't work, but I got a slightly different error:

Code:
[02.10.10 15:37:04:477 EDT] 5573ea9d DBMgr         F SMTL0026E: Failure to create a data source: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] SQL1013N  The database alias name or database name "WAS40" could not be found.  SQLSTATE=42705

But now I'm stymied by my lack of knowledge of DB2. The only way I know of to look in DB2 is to launch the "Control Center". This shows two instances ("DB2" and "DB2CTLSV") each with one database ("SAMPLE" and "SATCTLDB" respectively, and I created "SAMPLE" myself by running DB2 First Steps). Should "WAS40" exist? Does the installer create it? Or it created the first time WebSphere starts up (hasn't happened yet). Or am I just completely confused?
 
> Have you created your database?

Well, I'm not quite sure what you mean. I didn't actively do anything to "create the database", but I DID run the WebSphere installer (which also installed DB2). How do the database tables that WebSphere uses come into existance? Shouldn't WebSphere create them?
 
I have never used WebSphere on Windows-based machines, only on AIX-based servers, however, the installation would be the same I would guess.

When installing WebSphere on an AIX server, I install iPlanet (or Web Server), then I install DB2 and create an instance and the database used by WebSphere. We use 'was' as our database, we also create a 'session' database because we use persistent sessions. After the creation of the databases, then WebSphere is installed.

If WebSphere is already installed, which it seems it is on your system, then just create your database.

On AIX with DB2, my method is (for a local database), also note the session database isn't here because I don't know if you are using it:

su - db2admin
db2 create database was
db2 update db config for was using applheapsz 256
db2 update db config for was using locklist 200
db2 catalog database was as lwas
db2 uncatalog database was
db2 catalog tcpip node loop00 remote 127.0.0.1 server 50000
db2 catalog database lwas as was at node loop00
db2stop
db2start
 
Ok, I really appreciate the help, but it doesn't look like this is my problem.

On Windows, the installer for WebSphere will install DB2 for you (that's one of the steps). There is a pair of settings in the WebSphere config file (C:\WebSphere\AppServer\bin\admin.config) which look like this:

Code:
install.initial.config=true
com.ibm.ejs.sm.adminServer.createTables=true

I'm fairly sure that these tell WebSphere to create the database within DB2 the first time it (WebSphere) is run.

For that matter, there are other lines in the same file which say:

Code:
com.ibm.ejs.sm.adminServer.dbdatabaseName=was40
com.ibm.ejs.sm.adminServer.dbuser=dgw
com.ibm.ejs.sm.adminServer.dbpassword={xor}Lz5qaigwLRs=

...which suggests that I could set the password here if I only knew how (but I don't).

And the other reason I'm pretty sure you're not supposed to create the database manually on Windows is that I've done the install on 2 other computers for other people in our group, and it worked FINE for them (go figure!).

So thanks for the help, but this appears to be different for Windows and AIX.

-- Michael Chermside
 
You can change the line:

install.initial.config=true
to:
install.initial.config=false

If I recreate the WebSphere database I need to make sure this line is false and also there is a line (on AIX) [something].dbInitialize=false that needs to be false.

It seems there are some differnces between the AIX and Windows installs. That is all I can think of.
 
> You can change the line:
>
> install.initial.config=true
> to:
> install.initial.config=false

Certainly a worthwhile experiment. Unfortunately, I just tried it and it didn't help. But I appreciate the assistance!
 
AHA! SOLVED IT!

The solution was to do 3 things all while logged in as the user who "owns" the DB2 install.
(1) Install as that user.
(2) After the install, the very next login must be that user.
(3) The first time the WebSphere server service is started, the current user must be that user.

Basically, do everything while logged in as the user who will own the DB2 process until after WebSphere is completely working, and only then use other logins.

Thanks to AIXSPadmin for trying to help me through it.

-- Michael Chermside
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top