首頁  >  文章  >  資料庫  >  oracle中对UNNAMEDnnnnn文件的处理

oracle中对UNNAMEDnnnnn文件的处理

WBOY
WBOY原創
2016-06-07 17:41:14909瀏覽

一:构造一个UNNAMEDnnnnn文件其中nnnnn为数据文件绝对文件号1控制文件备份时当前联机日志状态如下selectgroup#,archived,sequence#,statusfromv$logGROUP#ARCSE

一:构造一个UNNAMEDnnnnn文件

其中nnnnn为数据文件绝对文件号

 

1 控制文件备份时当前联机日志状态如下

select group#,archived,sequence#,status from v$log

 

    GROUP# ARC SEQUENCE# STATUS

---------- --- ---------- ----------------

         1 YES          2 ACTIVE

         2 YES          1 ACTIVE

         3 YES          3 ACTIVE

         4 YES          4 ACTIVE

         5 YES          5 ACTIVE

         6 NO          6 CURRENT

2 当前控制控制文件备份如下

RMAN> list backup of controlfile;

 

List of Backup Sets

===================

 

BS Key Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

5       Full    7.11M      DISK        00:00:03     14-DEC-12     

        BP Key: 5   Status: AVAILABLE Compressed: NO Tag: TAG20121214T062943

        Piece Name: /oracle/app/db1/dbs/0fnsqnsl_1_1

 Control File Included: Ckp SCN: 2779647876   Ckp time: 14-DEC-12

 

3 创建表空间及测试数据时日志状态如下:

SQL> select group#,archived,sequence#,status from v$Log;

 

    GROUP# ARC SEQUENCE# STATUS

---------- --- ---------- ----------------

         1 YES         14 INACTIVE

         2 YES         13 INACTIVE

         3 NO          15 CURRENT

         4 YES         10 INACTIVE

         5 YES         11 INACTIVE

         6 YES         12 INACTIVE

 

4 此时创建表空间

SQL> create tablespace jiujian datafile '/oracle/test/jiujian.dbf' size 1m;

 

Tablespace created.

 

SQL> select file#,name from v$datafile;

 

     FILE# NAME

---------- ----------------------------------------

         1 /oracle/test/system1.dbf

         2 /oracle/test/zxb.dbf

         3 /oracle/test/sysaux01.dbf

         4 /oracle/test/users01.dbf

         5 /oracle/test/zxa.dbf

         6 /oracle/test/test1.dbf

         7 /oracle/test/zxc.dbf

         8 /oracle/test/undotbs1.dbf

         9 /oracle/test/zxbig.dbf

        10 /oracle/test2.dbf

        11 /oracle/test/jiujian.dbf

5 插入测试数据:

SQL> create table t3(x int) tablespace jiujian1;

 

Table created.

 

SQL> begin             

 2 for i in 1..20 loop

 3 insert into t3 values(i);

 4 end loop;

 5 commit;

 6 end;

 7 /

 

PL/SQL procedure successfully completed.

 

SQL> select * from t3;

 

         X

----------

         1

         2

         3

         4

         5

         6

         7

         8

         9

        10

        11

 

         X

----------

        12

        13

        14

        15

        16

        17

        18

        19

        20

 

6  6到14号归档的scn范围

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn