hi, i have a table with create ddl using not logged initially,
CREATE TABLE "NJIPD "."IVPWGMR" ("IVDY01" DECIMAL(2,0) , "IVMO01"
DECIMAL(2,0) , "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY
( START WITH +1 , INCREMENT BY +1 , NO CACHE ) ) IN "USERSPACE1 " NOT
LOGGED INITIALLY ;
right now i have to delete almost one million rows in the table, so i
found that i can use alter table activate not logged initially before
i execute delete, but i found that delete still use the transaction
log and cause log error full problem , why is that? 4 15385
"xixi" <da****@yahoo.c om> wrote in message
news:c0******** *************** ***@posting.goo gle.com... hi, i have a table with create ddl using not logged initially,
CREATE TABLE "NJIPD "."IVPWGMR" ("IVDY01" DECIMAL(2,0) , "IVMO01" DECIMAL(2,0) , "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY ( START WITH +1 , INCREMENT BY +1 , NO CACHE ) ) IN "USERSPACE1 " NOT LOGGED INITIALLY ;
right now i have to delete almost one million rows in the table, so i found that i can use alter table activate not logged initially before i execute delete, but i found that delete still use the transaction log and cause log error full problem , why is that?
"not logged initially" is turned off after the first commit. So it will
only help you if you're deleting all the rows via one DELETE statement and
then committing the changes.
--
Matt Emmerton
"xixi" <da****@yahoo.c om> wrote in message
news:c0******** *************** ***@posting.goo gle.com... hi, i have a table with create ddl using not logged initially,
CREATE TABLE "NJIPD "."IVPWGMR" ("IVDY01" DECIMAL(2,0) , "IVMO01" DECIMAL(2,0) , "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY ( START WITH +1 , INCREMENT BY +1 , NO CACHE ) ) IN "USERSPACE1 " NOT LOGGED INITIALLY ;
right now i have to delete almost one million rows in the table, so i found that i can use alter table activate not logged initially before i execute delete, but i found that delete still use the transaction log and cause log error full problem , why is that?
"not logged initially" is turned off after the first commit. So it will
only help you if you're deleting all the rows via one DELETE statement and
then committing the changes.
--
Matt Emmerton
"Matt Emmerton" <me******@yahoo .com> wrote in message
news:e1******** **************@ twister01.bloor .is.net.cable.r ogers.com... "xixi" <da****@yahoo.c om> wrote in message news:c0******** *************** ***@posting.goo gle.com... hi, i have a table with create ddl using not logged initially,
CREATE TABLE "NJIPD "."IVPWGMR" ("IVDY01" DECIMAL(2,0) , "IVMO01" DECIMAL(2,0) , "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY ( START WITH +1 , INCREMENT BY +1 , NO CACHE ) ) IN "USERSPACE1 " NOT LOGGED INITIALLY ;
right now i have to delete almost one million rows in the table, so i found that i can use alter table activate not logged initially before i execute delete, but i found that delete still use the transaction log and cause log error full problem , why is that?
"not logged initially" is turned off after the first commit. So it will only help you if you're deleting all the rows via one DELETE statement and then committing the changes.
-- Matt Emmerton
To add to what Matt has said, you need turn off auto-commit for this to
work, and then explicitly commit after the delete. This can be done with the
+c parm on the db2 command line. For example.
db2 +c -tvf input.sql
In input.sql you will have 3 SQL statements:
alter table ... (to set not logged initially) ;
delete ... ;
commit;
"Matt Emmerton" <me******@yahoo .com> wrote in message
news:e1******** **************@ twister01.bloor .is.net.cable.r ogers.com... "xixi" <da****@yahoo.c om> wrote in message news:c0******** *************** ***@posting.goo gle.com... hi, i have a table with create ddl using not logged initially,
CREATE TABLE "NJIPD "."IVPWGMR" ("IVDY01" DECIMAL(2,0) , "IVMO01" DECIMAL(2,0) , "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY ( START WITH +1 , INCREMENT BY +1 , NO CACHE ) ) IN "USERSPACE1 " NOT LOGGED INITIALLY ;
right now i have to delete almost one million rows in the table, so i found that i can use alter table activate not logged initially before i execute delete, but i found that delete still use the transaction log and cause log error full problem , why is that?
"not logged initially" is turned off after the first commit. So it will only help you if you're deleting all the rows via one DELETE statement and then committing the changes.
-- Matt Emmerton
To add to what Matt has said, you need turn off auto-commit for this to
work, and then explicitly commit after the delete. This can be done with the
+c parm on the db2 command line. For example.
db2 +c -tvf input.sql
In input.sql you will have 3 SQL statements:
alter table ... (to set not logged initially) ;
delete ... ;
commit; This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: xixi |
last post by:
hi, i found that in alter table command , you can do activate not
logged initially to help not log any changes made to the table to log
file, cause i have to delete almost 1 million records and my logfilsiz
is 6120 pages, with 15 log primary and 20 log seconday, but still run
with log file full error. but i also read that any error in the unit
of work in which the not logged initially attribute is activate will
result in the rollback, and...
|
by: DB_2 |
last post by:
Greetings,
I was searching Google for ways to turn off transaction logging for
some queries. I came across this old post from Feb 2003:
> From: fareeda (fareeda@pspl.co.in)
> Subject: Re: Question related to "CREATE TABLE AS SELECT" in DB2
> Newsgroups: comp.databases.ibm-db2
> Date: 2003-02-27 21:11:59 PST
>
|
by: db2group88 |
last post by:
hi, we install db2 udb v8.1 on windows 64bit, in our application, we
have sql execute "create table .... not logged initially", but from
the operating system event viewer showing error stating that ADM5530E
The COMMIT processing of table "TBSPACEID=3.TABLEID=15107" that used
NOT LOGGED INITIALLY has been initiated. It is recommended that you
take a
backup of this table's table space(s).
since our application need to create table on the...
|
by: Daniel Chou |
last post by:
Hello,
I have two questions about "not logged initially":
1. Before using "alter table tbname activate not logged initially",
should the table be created with "not logged initially"?
2. After using "alter table tbname activate not logged initially",
how to deactivate it?
|
by: efiryago |
last post by:
I have about 200 tables in a DB2 V8.1.4 LUW application schema. There
is a third party java appllication that accesses this schema. It
started failing and relevant entries in db2diag.log have this:
COM.ibm.db2.jdbc.DB2Exception: SQL1476N
The current transaction was rolled back because of error "-952".
SQLSTATE=40506
which caused by
SQL1476N The current transaction was rolled back because of
| |
by: p175 |
last post by:
People, I have the following table and I need to add a
column that uses a the listed UDF to count the number of days within
specific quarters by year.
CREATE TABLE HISTORY_MB (
ID INTEGER NOT NULL,
DAYS_RL INTEGER NOT NULL,
DAYS_RH INTEGER NOT NULL,
DAYS_RB INTEGER NOT NULL,
QTR SMALLINT NOT NULL,
|
by: tojigneshshah |
last post by:
Hi,
In a stored procedure,
If i use "alter table <tablename> activate not logged intially with
empty table", i get SQL104n error.
If i use "execute immediate alter table <tablename> activate not logged
initially with empty table" then i get SQL0107n (saying max.length is
64 characters)
|
by: Klemens |
last post by:
I want to create an MQT, intialize it manually and then use staging table to
refresh it with new data, but i don' t see a way for not doing full refresh
after creating the staging table.
I tried set integrity immediate unchecked, but refresh table after that
seems to do a full refresh.
Should this work? If so, what would be the right statements for doing this.
Thanks
Klemens
|
by: AutumnsDecay |
last post by:
Hey everyone.
I have been writing a testimonials backend for a client who wishes to use the feature. How it is supposed to work is like this:
The user writes a testimonial of their experience at the salon into a basic HTML form. When the user clicks send it runs a PHP script inserting it into a MySQL table.
The table has 4 fields: id, msg, name, active
When the testimonial is submitted it obtains a default value of 0 for the...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |