473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Transaction log full

Hi,
I got a problem while loading a table on DB2 database. It is saying that
transation log is full and do more commits in between. Is it done by a DB2
or can I fix this at BD2 server?

Thanks in advance,

Katta
Nov 12 '05 #1
9 7941
"Balaji" <ba******@sas.com> wrote in message
news:d6**********@license1.unx.sas.com...
Hi,
I got a problem while loading a table on DB2 database. It is saying that
transation log is full and do more commits in between. Is it done by a DB2
or can I fix this at BD2 server?

Thanks in advance,

Katta

Use the import syntax, and set the COMMITCOUNT parm to 1000.

You can also increase the number of primary/secondary logs, and increase the
size of each log file. The defaults are rather small. These are set at the
database level (db2 update db cfg ...) or you can use the Control Center to
change them.
Nov 12 '05 #2
Hi,
Use LOAD rather than IMPORT which used minimal(no) logging and also
faster...
Check with docs before proceeding things.

Cheers,
Thiru
WantedToBeDBA.

Nov 12 '05 #3
i have tried its not solved my problem. the thing is it has to adjusted at
server. so can u help me what r the exact parameters to be changed by using
control center.
thank you,
katta
"Mark A" <no****@nowhere.com> wrote in message
news:zb********************@comcast.com...
"Balaji" <ba******@sas.com> wrote in message
news:d6**********@license1.unx.sas.com...
Hi,
I got a problem while loading a table on DB2 database. It is saying that
transation log is full and do more commits in between. Is it done by a DB2 or can I fix this at BD2 server?

Thanks in advance,

Katta
Use the import syntax, and set the COMMITCOUNT parm to 1000.

You can also increase the number of primary/secondary logs, and increase

the size of each log file. The defaults are rather small. These are set at the
database level (db2 update db cfg ...) or you can use the Control Center to change them.

Nov 12 '05 #4
RdR
Hi,

Are you doing a DELETE before loading? If you do then that will contribute
to log items because the DELETE may do it in one commit and if the DELETE is
huge then that will be a big factor. To empty the table, you can LOAD,
REPLACE with an empty table to prevent the DELETEs from being logged. Of
course, everythign should be backed up just in case of disaster happening
along the way.

Hope this helps,

RdR
"Balaji" <ba******@sas.com> wrote in message
news:d6**********@license1.unx.sas.com...
i have tried its not solved my problem. the thing is it has to adjusted at
server. so can u help me what r the exact parameters to be changed by using control center.
thank you,
katta
"Mark A" <no****@nowhere.com> wrote in message
news:zb********************@comcast.com...
"Balaji" <ba******@sas.com> wrote in message
news:d6**********@license1.unx.sas.com...
Hi,
I got a problem while loading a table on DB2 database. It is saying that transation log is full and do more commits in between. Is it done by a DB2 or can I fix this at BD2 server?

Thanks in advance,

Katta

Use the import syntax, and set the COMMITCOUNT parm to 1000.

You can also increase the number of primary/secondary logs, and increase

the
size of each log file. The defaults are rather small. These are set at the database level (db2 update db cfg ...) or you can use the Control Center

to
change them.


Nov 12 '05 #5
I insist, the following idea is not good.This may lead to loss of data.
Try at ur own risk.

Disable logging for the particular table and perform load operation or
delete or what ever.

Make sure to QUIESCE the table/tablespace. So that so user will not be
allowed to access until UNQUIESCE is issued.

Thiru
WantedToBeDBA.

Nov 12 '05 #6
I missed a information in previous post. If you really wanted to change
the configuration then increase the LOGPRIMARY and LOGSECONDARY in
database configuration.

use update db cfg for <db name> using <parameter name> <value>

Cheers,
Thiru.
WantedToBeDBA.

Nov 12 '05 #7
I missed a information in previous post. If you really wanted to change
the configuration then increase the LOGPRIMARY and LOGSECONDARY in
database configuration.

use the following command.
update db cfg for <db name> using <parameter name> <value>

Cheers,
Thiru.
WantedToBeDBA.

Nov 12 '05 #8
RdR
Hi Thiru,

When you are doing the LOAD you are not logging the SQL inserts, updates and
deletes anyways, so a recovery from the logs will not reflect the INSERTS,
so you will not be able to recover even if you want to. I mentioned backing
up before the LOAD REPLACE action, yes there are risks but this backup
operation should be enough to cover the risks. And in reality, if it is the
DELETE that is causing the logs to be full and you are DELETEing at least a
million rows, you will need a lot of log volumes not to mention the amount
of time you have to wait.

RdR
"Thiru" <Wa***********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I insist, the following idea is not good.This may lead to loss of data.
Try at ur own risk.

Disable logging for the particular table and perform load operation or
delete or what ever.

Make sure to QUIESCE the table/tablespace. So that so user will not be
allowed to access until UNQUIESCE is issued.

Thiru
WantedToBeDBA.

Nov 12 '05 #9
IPL
Based on our experience, cleaning up the table by issuing a delete from and
then a load causes a lot of log information written. The delete from command
will delete everything in one commit. If we run out of logs, the delete will
run from the beggining again and the bad thing is the original delete from
command will be rolled back which causes additional waiting. We tried to add
log space and fail and continue with the cycle of adding logs, doing the
delete, running out'f log space, wait for the rollback of the deletes to
finish, then start again. Until we decided, we need to be up and running, so
we backed up our table being loaded, did a load with a replace option using
a dummie table without data on it, once the table is empty, we can do either
another load or an import, and did not experience log full issue.

It is not a dangerous procedure because if we failed, we have a backup we
can restore.

I hope I did not add to the confusion.

IPL

"RdR" <ro*@delrosario.ca> wrote in message
news:xZ********************@rogers.com...
Hi Thiru,

When you are doing the LOAD you are not logging the SQL inserts, updates
and
deletes anyways, so a recovery from the logs will not reflect the INSERTS,
so you will not be able to recover even if you want to. I mentioned
backing
up before the LOAD REPLACE action, yes there are risks but this backup
operation should be enough to cover the risks. And in reality, if it is
the
DELETE that is causing the logs to be full and you are DELETEing at least
a
million rows, you will need a lot of log volumes not to mention the amount
of time you have to wait.

RdR
"Thiru" <Wa***********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I insist, the following idea is not good.This may lead to loss of data.
Try at ur own risk.

Disable logging for the particular table and perform load operation or
delete or what ever.

Make sure to QUIESCE the table/tablespace. So that so user will not be
allowed to access until UNQUIESCE is issued.

Thiru
WantedToBeDBA.


Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: TZoner | last post by:
1) Can one find the location of the 'Transaction Log' at: <Hard Disk>\Program Files\Microsoft SQL Server\MSSQL\Data\MyDb_Log.ldf? 2) Is it safe to delete it, as SQL will create a new Transaction...
3
by: Thiko | last post by:
Hi I take one nightly full database backup at 02:00 and backup the transaction log to one backup set every 15mins. The commands to do this are as follows and are set up to run as database...
3
by: Bucfan1 | last post by:
Hello All, I have been encountering trouble with a SQL Server 2000 Transaction log file, mainly with the constant growth and lack of the autoshrink option. Here are the details: 1.) OS is...
0
by: xo55ox | last post by:
Hi, I have been trying to set up an automated restore process from prod to backup server. First, I schedule the full database backup nightly, transfer the backup file and restore it to the...
2
by: francois1 | last post by:
I am running a website with a SQL Server database attached. My transaction logs are full and my hosting co. won't allocate more disk space for me. I need to delete my database transaction logs...
3
by: TG | last post by:
Coming from a (mostly) Oracle shop, I am unclear how SS transaction logs work as far as up to point of failure recovery goes. I have the few MSSQL databases I look after in full recovery mode,...
4
by: yashgt | last post by:
Hi, We have created a SQL server 2000 database. We observe that the transaction log keeps growing over time. We are now about to run out of space. We have been periodically shrinking the...
0
by: flobroed | last post by:
Hi, I've a question regarding the transaction-log backup on SQL-Server 2000. We have implemented a low cost replication. Every evening we make a full backup and beginning at 7 to 18 we make...
3
by: sifrah | last post by:
Hi All, My SQL server transaction log is getting bigger every day and my HDD if running out of space. So i follow the MS KB about how to Shrinking the Transaction Log. After doing so the log is...
5
by: Kruton | last post by:
Hello everyone, This is more of an architectural question about SQL Server. Can someone please explain why when I perform a query such as the one below that updates a table using begin and end...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.