Hi,
When we create a database we need to specify the clause for logging:
create database testdb in d_sp1 with log;
create database testdb in d_sp1 with buffered log;
create database testdb in d_sp1 with log mode ansi;
To check presence of logical logs for a database:
Under Unix:
echo "begin; rollback" | dbaccess testdb
Under Windows:
echo begin;rollback | dbaccess testdb
OR
dbaccess testdb -
begin;
At this stage if your database does not support transactions, it will flash an appropriate error message. If not issue:
rollback;
Interrupt <control-c> will terminate the dbaccess session.
Alternatively, you may test the logging with the following SQL:
select is_logging from sysmaster:sysdatabases where name='testdb' ;
result: 1 = logged, 0 = non logging.
You can do start the transactions logging by:
1.
ondblog <new mode> <database name>
<new mode> can be:
buf - Change database to buffered mode.
unbuf - Change database to unbuffered mode.
Example:
ondblog buf testdb
2.
ontape -s -B testdb # for buffered mode
ontape -s -U testdb # unbuffered mode
Edit parameters TAPEDEV and LTAPEDEV in the $INFORMIXDIR/etc/$ONCONFIG ( %INFORMIXDIR%/etc/%ONCONFIG% in Windows ) from NUL to the actual tape device path for subsequent logs.
Regards,
Shriyan