dbTalk Databases Forums  

change non-logged database to logged database

comp.databases.informix comp.databases.informix


Discuss change non-logged database to logged database in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
roger
 
Posts: n/a

Default change non-logged database to logged database - 08-09-2012 , 02:34 AM






To change non-logged database to logged database.

Anything I need to change in 4gl program ?

Reply With Quote
  #2  
Old   
Fernando Nunes
 
Posts: n/a

Default Re: change non-logged database to logged database - 08-09-2012 , 02:43 AM






Probably yes. There are certain things you must do differently or that you
can't do... I should have a list somewhere but for now:

- lock table must be inside a transaction
- there is no "unlock table". Simply close the transaction
- you may get (more) locking errors and the programs should be able to
handle that
- you should prevent long transactions which may force you to split large
operations
- ...
On Aug 9, 2012 8:35 AM, "roger" <roger%star2000.com.tw (AT) gtempaccount (DOT) com>
wrote:

Quote:
To change non-logged database to logged database.

Anything I need to change in 4gl program ?
_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list

Reply With Quote
  #3  
Old   
roger
 
Posts: n/a

Default Re: change non-logged database to logged database - 08-09-2012 , 05:09 AM



I try compile 4gl program and got error
if program contain " DECLARE CURSOR ... FOR UPDATE".

Reply With Quote
  #4  
Old   
Jonathan Leffler
 
Posts: n/a

Default Re: change non-logged database to logged database - 08-09-2012 , 06:42 AM



....In the (missing) context of a discussion about what changes are needed
in an I4GL program when you switch between an unlogged database and a
logged database...

On Thu, Aug 9, 2012 at 3:09 AM, roger <
roger%star2000.com.tw (AT) gtempaccount (DOT) com> wrote:

Quote:
I try compile 4gl program and got error
if program contain " DECLARE CURSOR ... FOR UPDATE".

You need to provide more context. Is it a compile-time or a run-time error?

You have to be in a transaction, I think, to open a cursor FOR UPDATE with
a logged database. However, the system can only detect whether there is a
transaction active at run-time, not at compile-time.

--
Jonathan Leffler <jonathan.leffler (AT) gmail (DOT) com> #include <disclaimer.h>
Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Reply With Quote
  #5  
Old   
scottishpoet
 
Posts: n/a

Default Re: change non-logged database to logged database - 08-09-2012 , 07:59 AM



On Thursday, August 9, 2012 9:34:02 AM UTC+2, roger wrote:
Quote:
To change non-logged database to logged database. Anything I need to change in 4gl program ?
If I remember correctly, the default isolation level is different between a non logged database and a logged database (dirty read v commited read)

Depending how your application currently sets the isolation level, you may need to make some modifications to your application to accomodate this change in behaviour.

Reply With Quote
  #6  
Old   
Art Kagel
 
Posts: n/a

Default Re: change non-logged database to logged database - 08-09-2012 , 08:28 AM



The OP needs to add support for atomic transactions to his 4GL apps. That
means surrounding sets of related SQL statements that should be executed as
a complete transaction with BEGIN WORK; ... COMMIT WORK; statements and
trapping errors and issuing a ROLLBACK WORK; statement when they happen. I
would also detect whether the database supports transactions (see the
sqlca.sqlwarn structure immediately after opening the database to see the
logging status of the database) and use transactions or not as appropriate.

Art

Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/

Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.



On Thu, Aug 9, 2012 at 8:59 AM, scottishpoet <dryburghj (AT) yahoo (DOT) com> wrote:

Quote:
On Thursday, August 9, 2012 9:34:02 AM UTC+2, roger wrote:
To change non-logged database to logged database. Anything I need to
change in 4gl program ?

If I remember correctly, the default isolation level is different between
a non logged database and a logged database (dirty read v commited read)

Depending how your application currently sets the isolation level, you may
need to make some modifications to your application to accomodate this
change in behaviour.

_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) org
http://www.iiug.org/mailman/listinfo/informix-list

Reply With Quote
  #7  
Old   
roger
 
Posts: n/a

Default Re: change non-logged database to logged database - 08-09-2012 , 09:00 PM



On 8月9日, 下午7時42分, Jonathan Leffler <jonathan.leff... (AT) gmail (DOT) com> wrote:
Quote:
...In the (missing) context of a discussion about what changes are needed
in an I4GL program when you switch between an unlogged database and a
logged database...

On Thu, Aug 9, 2012 at 3:09 AM, roger

roger%star2000.com... (AT) gtempaccount (DOT) com> wrote:
I try compile 4gl program and got error
if program contain " DECLARE CURSOR ... FOR UPDATE".

You need to provide more context. Is it a compile-time or a run-time error?

You have to be in a transaction, I think, to open a cursor FOR UPDATE with
a logged database. However, the system can only detect whether there is a
transaction active at run-time, not at compile-time.

--
Jonathan Leffler <jonathan.leff... (AT) gmail (DOT) com> #include <disclaimer.h
Guardian of DBD::Informix - v2011.0612 -http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
Sorry, It is run-time error !

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.