Maybe you can help:
Is there an easy way to disable transaction logging altogether in DB2?
I was populating DB2 tables and started getting:
SQL0964C-a The transaction log for the database is full.-a SQLSTATE=57011
Recreated the tables with the NOT LOGGED INITIALLY option:
CREATE TABLE TBL (
-a-a-a ID-a-a-a INT-a-a-a-a-a-a-a-a-a-a NOT NULL,
-a-a-a TEXT-a VARCHAR(220)-a NOT NULL
) NOT LOGGED INITIALLY;
Code to populate data includes:
ALTER TABLE TBL ACTIVATE NOT LOGGED INITIALLY;
then
DELETE FROM TABLE;
then
repopulate with bulk INSERTs-a (commits are done at small intervals)
But now I'm getting error:
-aSQL1476N-a The current transaction was rolled back because of error "-964".-a SQLSTATE=40506
As far as I can tell it's another 'transaction log full' issue.
I saved a snapshot:
$ db2 get snapshot for all on database > logsnapshot.txt
It contains:
Log space available to the database (Bytes)= 1047782
Log space used by the database (Bytes)-a-a-a-a = 103297818
Maximum secondary log space used (Bytes)-a-a = 49038276
Maximum total log space used (Bytes)-a-a-a-a-a-a = 103297988
Secondary logs allocated currently-a-a-a-a-a-a-a-a = 12
Any advice will be appreciated.
On 9/3/2021 6:56 PM, DFS wrote:
Maybe you can help:
Is there an easy way to disable transaction logging altogether in DB2?
I was populating DB2 tables and started getting:
SQL0964C-a The transaction log for the database is full.-a SQLSTATE=57011
Recreated the tables with the NOT LOGGED INITIALLY option:
CREATE TABLE TBL (
-a-a-a-a ID-a-a-a INT-a-a-a-a-a-a-a-a-a-a NOT NULL,
-a-a-a-a TEXT-a VARCHAR(220)-a NOT NULL
) NOT LOGGED INITIALLY;
Code to populate data includes:
ALTER TABLE TBL ACTIVATE NOT LOGGED INITIALLY;
then
DELETE FROM TABLE;
then
repopulate with bulk INSERTs-a (commits are done at small intervals)
But now I'm getting error:
-a-aSQL1476N-a The current transaction was rolled back because of error
"-964".-a SQLSTATE=40506
As far as I can tell it's another 'transaction log full' issue.
I saved a snapshot:
$ db2 get snapshot for all on database > logsnapshot.txt
It contains:
Log space available to the database (Bytes)= 1047782
Log space used by the database (Bytes)-a-a-a-a = 103297818
Maximum secondary log space used (Bytes)-a-a = 49038276
Maximum total log space used (Bytes)-a-a-a-a-a-a = 103297988
Secondary logs allocated currently-a-a-a-a-a-a-a-a = 12
Any advice will be appreciated.
Your problem is the NOT LOGGED INITIALLY is only good for the
transaction.-a Once you issue a COMMIT logging starts again.-a Everything must be done in one transaction (no COMMIT or ROLLBACK and AUTOCOMMIT
must be disabled).
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 63 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 492975:36:40 |
| Calls: | 840 |
| Files: | 1,301 |
| D/L today: |
16 files (28,385K bytes) |
| Messages: | 264,959 |