Ingres Community Forums Login Register Ingres.com  

Ingres Community Forum


Go Back   Ingres Community Forums > Ingres Forums > DBA Forum
 

Reply
 
LinkBack Thread Tools Display Modes
Old 2010-07-29   #1 (permalink)
Ingres Community
 
Join Date: Jul 2009
Posts: 62
Default Why my request is aborted ?

I have an error when i try this request :
[CODE]
Create table a as select * from b;
Commit;
[/ CODE]
Error
[CODE]
___ Wed Jul 29 4:23:45 2010 __________________________________________________ _
1> create table a as select * from b

E_US1262 Your transaction has been "aborted due to the transaction log file
HAVING Reached one of the limits set by the system administrator.
These limits are log_full, force_abort, and 90 percent of force_abort
When using the option to start fast_commit DBMS servers.
(Thu Jul 29 8:37:05 2010)


End of Request - Terminated by Errors
[/ CODE]

My transaction log have 2000 Mbyte of space
the b table have 2163487 rows
i dont have a dual transaction log .
suze is offline   Reply With Quote
Old 2010-07-29   #2 (permalink)
Ingres Corp
 
Join Date: Mar 2007
Location: Paris
Posts: 45
Default

How big is your table (volume ?). If it contains around 1.5 GB, there is a 'chance' this query fills up your transaction log!

You can have further information by using IPM / Logging System monitor. It will show how your log file is filling.
padst01 is offline   Reply With Quote
Old 2010-07-29   #3 (permalink)
Ingres Community
 
denjo02's Avatar
 
Join Date: Mar 2007
Location: Melbourne, Australia
Posts: 211
Default

You can avoid logging each row inserted into the new table by:

create table a as select * from b with nojournaling;

The table, of course, will not be journalled. If your database is journalled, then you would need to:

set journaling on a; (in an SQL session)

followed by "ckpdb DBNAME" to take a checkpoint of the database.
denjo02 is offline   Reply With Quote
Old 2010-07-29   #4 (permalink)
Ingres Community
 
kschendel's Avatar
 
Join Date: Mar 2007
Location: Pittsburgh, PA
Posts: 1,246
Send a message via Skype™ to kschendel
Default

As an addendum to what John said, starting with Ingres 10 you won't have to explicitly say "with nojournaling" if the database itself is not journaled. Ingres 10 will compile a bulk-load if the table is not being journaled at the time of execution, for any reason.
kschendel is offline   Reply With Quote
Old 2010-07-29   #5 (permalink)
Ingres Community
 
Join Date: Jul 2009
Posts: 62
Default

thanks my friends !
where can i find the iifile to have the volume occuped by the b table ?
suze is offline   Reply With Quote
Old 2010-07-29   #6 (permalink)
Ingres Corp
 
Join Date: Mar 2007
Location: Paris
Posts: 45
Default

Hi Suze

Another way to estimate your table's size is to estimate row's length (for example using HELP), then multiply by the number of rows. Not really exact since this does not take headers and other stuff into account, but this will give you a rough idea.

Following denjo2 and Karl's comments, you should first decide whether you need logging for this operation or not. If it is absolutely required, then you'll have to size your log file accordingly.

Regards
padst01 is offline   Reply With Quote
Old 2010-07-29   #7 (permalink)
Ingres Community
 
Join Date: Jul 2009
Posts: 62
Default

ah yes its a good idea !!
suze is offline   Reply With Quote
Old 4 Weeks Ago   #8 (permalink)
Ingres Community
 
ekar's Avatar
 
Join Date: Apr 2010
Location: Long Island, NY USA
Posts: 28
Blog Entries: 3
Default

What about simply direct SQL session to not use logging (system) with:

Code:
commit;\g
set nologging;\g
create table a as select * from table b;\g
commit;\g
set logging;\g
That should avoid logging for the table creation.
I can hear Support saying - "Be careful when using it as it is not recommended."
But you should be OK.

Regards,
Eugene
ekar is offline   Reply With Quote
Old 4 Weeks Ago   #9 (permalink)
Ingres Community
 
Join Date: Mar 2007
Posts: 69
Default

“But you should be OK” well that is unless the session returns an error at which stage the database will be marked inconsistent and require recovery of some type.

If you are going to use ‘set nologging’ ensure that you have a current backup of the database taken prior to issuing the set statement.

I wouldn’t necessarily say do not use ‘set nologging’ but what I would say is be aware of the implications of what can go wrong when using this set statement and how to recover the database afterwards if the unthinkable does happen.
quida01 is offline   Reply With Quote
Old 4 Weeks Ago   #10 (permalink)
Ingres Community
 
denjo02's Avatar
 
Join Date: Mar 2007
Location: Melbourne, Australia
Posts: 211
Default

Quote:
Originally Posted by ekar View Post
What about simply direct SQL session to not use logging
...
That should avoid logging for the table creation.
I can hear Support saying - "Be careful when using it as it is not recommended."
And with good reason. If you use "set nologging", even for something as simple as this, you cannot rollforward a journalled database.

If you do feel the need to use a nologging query, the only sensible way to do it is to take a checkpoint immediately before issuing the command, run the nologging session, and then take another checkpoint. Otherwise you can't recover from journals.

(Note, you can use the #f flag on the rollforwarddb, but obviously any updates made to the table created with nologging cannot be processed, as the table won't exist. Your database will be marked inconsistent)

Much safer to use "with nojournaling" when creating the table.
denjo02 is offline   Reply With Quote

Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2009 Ingres Corporation. All Rights Reserved