Oracle 12c Rac Set Archive Mode

yyp2009發表於2013-12-24

Oracle 12c Rac Set Archive Mode
node1:
SQL>  show parameter  db_recovery_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      +CRSFRA
db_recovery_file_dest_size           big integer 4800M

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 7766568960 bytes
Fixed Size                  4665928 bytes
Variable Size            2432699832 bytes
Database Buffers         5318377472 bytes
Redo Buffers               10825728 bytes
Database mounted.
SQL>
SQL>
SQL>  alter database archivelog;
Database altered.
show parameter name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name               string
db_file_name_convert                 string
db_name                              string      testdb
db_unique_name                       string      testdb
global_names                         boolean     FALSE
instance_name                        string      testdb_1
lock_name_space                      string
log_file_name_convert                string
pdb_file_name_convert                string
processor_group_name                 string
service_names                        string      testdb
SQL> alter system set db_recovery_file_dest='+CRSFRA' sid='testdb_1';

System altered.

SQL>  alter system set db_recovery_file_dest='+CRSFRA' sid='testdb_2';

System altered.

SQL> alter system set log_archive_format ='arch1_%s_%R_%T.arc' scope=spfile sid='testdb_1';

System altered.

SQL> alter system set log_archive_format ='arch1_%s_%R_%T.arc' scope=spfile sid='testdb_2';

System altered.

SQL> alter database open;
SQL>  alter system set cluster_database=TRUE scope=spfile sid='*';         

System altered.

SQL>
SQL>
SQL> shutdown immediate;
SQL> show pdbs      

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 TESTCS1                        MOUNTED
         4 PDB_PLUG_NOCOPY                MOUNTED
         5 CRM                            MOUNTED
         6 ESSDB                          MOUNTED
         8 PDB_PLUG_MOVE                  MOUNTED
SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;

    CON_ID       DBID NAME                           OPEN_MODE
---------- ---------- ------------------------------ ----------
         2 4069264041 PDB$SEED                       READ ONLY
         3 4133352937 TESTCS1                        MOUNTED
         4  518394074 PDB_PLUG_NOCOPY                MOUNTED
         5 2880313921 CRM                            MOUNTED
         6  983511936 ESSDB                          MOUNTED
         8 1625017221 PDB_PLUG_MOVE                  MOUNTED

6 rows selected.

SQL> alter PLUGGABLE database all open;

Pluggable database altered.

SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;

    CON_ID       DBID NAME                           OPEN_MODE
---------- ---------- ------------------------------ ----------
         2 4069264041 PDB$SEED                       READ ONLY
         3 4133352937 TESTCS1                        READ WRITE
         4  518394074 PDB_PLUG_NOCOPY                MOUNTED
         5 2880313921 CRM                            READ WRITE
         6  983511936 ESSDB                          READ WRITE
         8 1625017221 PDB_PLUG_MOVE                  READ WRITE

6 rows selected.

node2:

QL> ALTER DATABASE FORCE LOGGING;

Database altered.

SQL> startup force;
ORACLE instance started.

Total System Global Area 7766568960 bytes
Fixed Size                  4665928 bytes
Variable Size            2499808696 bytes
Database Buffers         5251268608 bytes
Redo Buffers               10825728 bytes
select con_id,dbid,NAME,OPEN_MODE from v$pdbs;Database mounted.


Database opened.
SQL>
    CON_ID       DBID NAME                           OPEN_MODE
---------- ---------- ------------------------------ ----------
         2 4069264041 PDB$SEED                       READ ONLY
         3 4133352937 TESTCS1                        MOUNTED
         4  518394074 PDB_PLUG_NOCOPY                MOUNTED
         5 2880313921 CRM                            MOUNTED
         6  983511936 ESSDB                          MOUNTED
         8 1625017221 PDB_PLUG_MOVE                  MOUNTED

6 rows selected.

SQL> alter PLUGGABLE database all open;

Pluggable database altered.

SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;

    CON_ID       DBID NAME                           OPEN_MODE
---------- ---------- ------------------------------ ----------
         2 4069264041 PDB$SEED                       READ ONLY
         3 4133352937 TESTCS1                        READ WRITE
         4  518394074 PDB_PLUG_NOCOPY                MOUNTED
         5 2880313921 CRM                            READ WRITE
         6  983511936 ESSDB                          READ WRITE
         8 1625017221 PDB_PLUG_MOVE                  READ WRITE

6 rows selected.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     3672
Next log sequence to archive   3674
Current log sequence           3674
SQL>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13750068/viewspace-1064158/,如需轉載,請註明出處,否則將追究法律責任。

相關文章