- This article is just for knowledge sharing.
[oracle@srv1 scripts]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri May 3 13:40:48 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 30
Next log sequence to archive 32
Current log sequence 32
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1795162112 bytes
Fixed Size 2925456 bytes
Variable Size 553651312 bytes
Database Buffers 1224736768 bytes
Redo Buffers 13848576 bytes
Database mounted.
SQL> Alter database noarchivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 30
Current log sequence 32
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1795162112 bytes
Fixed Size 2925456 bytes
Variable Size 553651312 bytes
Database Buffers 1224736768 bytes
Redo Buffers 13848576 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@srv1 scripts]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Fri May 3 13:43:21 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: SMR1 (DBID=3405103807, not open)
RMAN> BACKUP DATABASE;
Starting backup at 03-MAY-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=7 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/smr1/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/smr1/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/smr1/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/smr1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 03-MAY-19
channel ORA_DISK_1: finished piece 1 at 03-MAY-19
piece handle=/u01/app/oracle/fast_recovery_area/SMR1/backupset/2019_05_03/o1_mf_nnndf_TAG20190503T134327_gdqy17v8_.bkp tag=TAG20190503T134327 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 03-MAY-19
Starting Control File and SPFILE Autobackup at 03-MAY-19
piece handle=/u01/app/oracle/fast_recovery_area/SMR1/autobackup/2019_05_03/o1_mf_s_1007300570_gdqy213t_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 03-MAY-19
RMAN> exit
Recovery Manager complete.
[oracle@srv1 scripts]$ cd /u01/app/oracle/fast_recovery_area/SMR1/backupset/2019_05_03/
[oracle@srv1 2019_05_03]$ ll
total 1280796
-rw-r-----. 1 oracle oinstall 1311531008 May 3 13:43 o1_mf_nnndf_TAG20190503T134327_gdqy17v8_.bkp
[oracle@srv1 2019_05_03]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri May 3 14:26:31 2019
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
SMR1 MOUNTED PRIMARY
SQL> alter database open;
Database altered.
SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
SMR1 READ WRITE PRIMARY
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@srv1 2019_05_03]$ ll
total 1280796
-rw-r-----. 1 oracle oinstall 1311531008 May 3 13:43 o1_mf_nnndf_TAG20190503T134327_gdqy17v8_.bkp
[oracle@srv1 2019_05_03]$
No comments:
Post a Comment