Discussion:
Transaction log setting prevent connection?!!
(too old to reply)
sc
2007-08-31 09:00:55 UTC
Permalink
I have a DB2 8.1 in Windows environment I was experimenting with transaction log settings. It seems that I "overextended" the values of LOGFILSIZ and LOGSECOND params to the maximum while the free space on the disk was not sufficient for these values(about 2GB).

My problem is that since the db was restarted to take the new values I cannot establish any connection in order to change the params. I tried the db2admin account or even log in as a PC administrator but it was fruitless. Is this a deadlock? How can I overcome this?
Thomas Ritter
2007-08-31 09:11:35 UTC
Permalink
Hi,

have you tried first to deactivate the database?
That will release all the resources the database consumes after it was activated. Now, you should able to reset/change the values for LOGFILSIZE and/or LOGSECOND.

Regards,
Thomas
sc
2007-08-31 09:35:58 UTC
Permalink
This action also demand a connection, so I receive

SQL30082N Attempt to establish connection failed with security
reason "3" ("PASSWORD MISSING"). SQLSTATE=08001

When I try to connect I get

SQL1762N Unable to connect to database because there is not enough space to allocate active log files. SQLSTATE=08004

This link suggests that I should "try reducing the values for LOGPRIMARY and/or LOGFILSIZ database configuration parameters so that a smaller set of active log files are used" nut how can I do this without connection?
https://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.messages.sql.doc/doc/msql01762n.html
Thomas Ritter
2007-08-31 09:52:37 UTC
Permalink
Which version of DB2 you are using exactly (db2level output)?
sc
2007-08-31 09:58:38 UTC
Permalink
DB2 v8.1.7.664 and FixPak 7
Thomas Ritter
2007-08-31 10:49:54 UTC
Permalink
Should be working with that DB2 level (have checked on my system).

1) Can you explain what have you done step by step?
2) Is your database activated (issued either 'activate db' or 'connect to <db>'
You can check this with the command: db2 list active databases

Regards,
Thomas
Knut Stolze
2007-08-31 10:57:06 UTC
Permalink
Post by sc
I have a DB2 8.1 in Windows environment I was experimenting with
transaction log settings. It seems that I "overextended" the values of
LOGFILSIZ and LOGSECOND params to the maximum while the free space on the
disk was not sufficient for these values(about 2GB).
My problem is that since the db was restarted to take the new values I
cannot establish any connection in order to change the params. I tried the
db2admin account or even log in as a PC administrator but it was
fruitless. Is this a deadlock? How can I overcome this?
It's not a deadlock.

Here is what I think happened: You set the database cfg parameters
LOGPRIMARY and LOGFILSIZE to such high values that LOGPRIMARY * LOGFILSIZ *
4096 is larger than the amount of free disk space on the file system where
the logs are to be placed. Is this correct?

When you try to connect to a database, DB2 will implicitly activate the
database and allocate all primary log files in the size defined in
LOGFILSIZE. This allocation fails, of course, because not enough disk
space is there. Thus, the database activation fails and because the
database is not active, you cannot connect to it.

To fix that, you can do this when you are attached to the DB2 instance:

$ db2 update db cfg for <db-name> using logprimary ... logfilsize ...

Thus, you can change the DB CFG parameters without connecting to the
database. Once you have sufficiently low values, you can activate the
database explicitly (via ACTIVATE DB command) or implicitly (via connecting
to it).
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Knut Stolze
2007-08-31 11:33:56 UTC
Permalink
Post by Knut Stolze
$ db2 update db cfg for <db-name> using logprimary ... logfilsize ...
Thus, you can change the DB CFG parameters without connecting to the
database. Once you have sufficiently low values, you can activate the
database explicitly (via ACTIVATE DB command) or implicitly (via
connecting to it).
This is exactly what I am trying to do and I get
SQL30082N Attempt to establish connection failed with security reason "3"
("PASSWORD MISSING"). SQLSTATE=08001
Are you logged in as DB2 instance owner? Or do you try to do that as
another user (possibly from another system)? In the first case, you should
be able to do that right away. In the second case, you may currently run
an attach with implicit authorization. To use explicit user-id and
password, use this DB2 command:

$ db2 attach to <instance> user <user-name> using <password>
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
sc
2007-08-31 12:43:02 UTC
Permalink
That worked!

I had tried both locally and remotely, but with no results. What you suggested worked locally.

Thank you so much!

sc
2007-08-31 11:24:25 UTC
Permalink
Post by Knut Stolze
$ db2 update db cfg for <db-name> using logprimary ... logfilsize ...
Thus, you can change the DB CFG parameters without connecting to the
database. Once you have sufficiently low values, you can activate the
database explicitly (via ACTIVATE DB command) or implicitly (via connecting
to it).
This is exactly what I am trying to do and I get

SQL30082N Attempt to establish connection failed with security reason "3" ("PASSWORD MISSING"). SQLSTATE=08001
Continue reading on narkive:
Loading...