Back up archived logs
-- View the archive logs generated by the first archive location in the past day. dest_id indicates the location where archive logs are stored, corresponding to 1 ~ in v $ archive_dest ~ The value of the destination field of 10. 0 indicates that it is unavailable.
SQL> select name from v $ archived_log where dest_id = 1 and first_time> = sysdate-1;
NAME
Bytes ------------------------------------------------------------------------------------------------------------------------
/Oracle/10g/oracle/log/archive_log/archive_1_23_757801926.arclog
/Oracle/10g/oracle/log/archive_log/archive_1_24_757801926.arclog
SQL> select name from v $ archived_log where dest_id = 10 and first_time >=sysdate-1;
NAME
Bytes ------------------------------------------------------------------------------------------------------------------------
/Oracle/10g/oracle/product/10.2.0/db_1/flash_recovery_area/ORALIFE/archivelog/201%08_01/o%mf_%23_73fljh3f _. arc
/Oracle/10g/oracle/product/10.2.0/db_1/flash_recovery_area/ORALIFE/archivelog/20151108_02/o%mf_%24_73hwlry6 _. arc
SQL> select destination from v $ archive_dest;
DESTINATION
Bytes ------------------------------------------------------------------------------------------------------------------------
/Oracle/10g/oracle/log/archive_log
/Oracle/10g/oracle/log/archive_log2
USE_DB_RECOVERY_FILE_DEST
10 rows selected.
-- Copy archived logs to the specified Backup Directory
Cp
Backup parameter file
1) if you use a text parameter file (pfile), run the OS command to copy the file to the backup directory.
2) If spfile is used, create pfile is used for backup.
3) If pfile is used, create spfile is used for backup.
SQL> show parameter spfile
NAME TYPE VALUE
-----------------------------------------------------------------------------
Spfile string/oracle/10g/oracle/product/10.
2.0/db_1/dbs/spfileoralife. ora
-- Create pfile, which is equivalent to backing up spfile as pfile
SQL> create pfile = '/oracle/10g/oracle/bakup/database/pfileoralife. ora'
2 from spfile;
File created.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
-- Use pfile to start the database to the nomount status. You can also directly start up pfile = 'pfile full path'
SQL> startup nomount pfile = '/oracle/10g/oracle/bakup/database/pfileoralife. ora ';
ORACLE instance started.
Total System Global Area 528482304 bytes
Fixed Size 1220360 bytes
Variable Size 146800888 bytes
Database Buffers 373293056 bytes
Redo Buffers 7168000 bytes
SQL> show parameter pfile; -- The spfile parameter is blank when pfile is used to start the database.
NAME TYPE VALUE
----------------------------------------------------------------------------------------
Spfile string
SQL> show parameter spfile;
NAME TYPE VALUE
----------------------------------------------------------------------------------------
Spfile string
SQL> alter database mount;
Database altered.
SQL> alter database open;
Database altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.