Question

When we issue manually Alter system switch logfile, does this statement force all uncommited transactions to commit? When I issue this I see my number session raised in database and graph indicates these were commits in that period. So I was wondering if that command causes uncommited transactions to commit.

Was it helpful?

Solution

No, open transactions are not commited by this statement. You can test this yourself:

create table TESTSWITCH(testid NUMBER);
insert into TESTSWITCH values(1);
select * from TESTSWITCH;
alter system switch logfile;
rollback;
select * from TESTSWITCH;

output:

table TESTSWITCH created.
1 rows inserted.
TESTID
------
     1 

system SWITCH altered.
rollback complete.
no rows selected
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top