Database Reference
In-Depth Information
exeRCiSe 2.3
(continued)
SQL> connect scott/tiger
Connected.
SQL> create table test_table (id number);
Table created.
SQL> insert into test_table values (1);
1 row created.
SQL> insert into test_table values (2);
1 row created.
SQL> commit;
Commit complete.
3.
Now, log in as
SYS
and determine the current SCN by using the
CURRENT_SCN
column
of the
V$DATABASE
table. Your SCN will be different from that in the example:
SQL> connect sys as sysdba
Enter password:
Connected.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
5135413
4.
Log back in as
SCOTT/TIGER
and add two more records. Commit the inserts:
SQL> connect scott/tiger
Connected.
SQL> insert into test_table values (3);
1 row created.
SQL> insert into test_table values (4);
1 row created.
SQL> commit;
Commit complete.
5.
Log in as
SYS
again and query the current SCN by using the
CURRENT_SCN
column of
the
V$DATABASE
table. Notice that the SCN has changed:
SQL> connect sys as sysdba
Enter password:
Connected.
SQL> select current_scn from v$database;
CURRENT_SCN
Search WWH ::
Custom Search