Rollback with Perl DBI / Informix
Posted in 2000
Topics: General Discussion
Hello, I was trying to do a simple rollback test within a Perl script. The documentation says that Autocommit should be off to be able to to a rollback, so I did $db->{AutoCommit} = 0; However, Informix complains with the following error: DBD::Informix - Cannot unset AutoCommit for unlogged databases rollback ineffective with AutoCommit enabled at rollback.pl line 16. How can I put the database in "Logged" mode? What are the (dis-)advantages of this? Will there be a lot more cpu-time or diskspace needed? Thanks!
Eric Delaet <ericd@kava.dot.be> writes:
> Hello,
>
> I was trying to do a simple rollback test within a Perl script.
> The documentation says that Autocommit should be off to be able to to a
> rollback, so I did
>
> $db->{AutoCommit} = 0;
>
> However, Informix complains with the following error:
>
> DBD::Informix - Cannot unset AutoCommit for unlogged databases
> rollback ineffective with AutoCommit enabled at rollback.pl line 16.
>
> How can I put the database in "Logged" mode? What are the (dis-)advantages
> of this? Will there be a lot more cpu-time or diskspace needed?
RTFM?
It's better to read the docs and _understand_, than to follow
some lame "how to do things you really don't understand" HOWTO.
The chapter on Logging in "Administrator's Guide" is a good start:)
The lame way (from "Managing Database-Logging Status" in Admin-guide):
"For example, to add buffered logging to a database called stores_demo
with ontape, execute the following command:
% ontape -s -B stores_demo"
Thomas