1. set SQL code SQL> archive log list in archive mode; # Check whether archive mode is used. SQL> alter system set log_archive_start = true scope = spfile; # enable active archiving SQL> alter system set log_archive_dest = ''location =/oracle/ora9/oradata/arch'' scope = spfile; # set the archiving path SQL> alter system set log_archive_dest_1 = ''location =/oracle/ora9/oradata/arch1' scope = spfile; SQL> alter system set log_archive_dest_2 = ''location =/oracle/ora9/oradata/arch2'' scope = spfile; # If the file is archived to two locations, you can use the preceding method to implement SQL> alter system set log_archive_format = ''arch _ % d _ % t _ % r _ % s. log ''# Set the archive diary style SQL> shutdown immediate; www.2cto.com SQL> startup mount; # Open the control file, do not open the data file SQL> alter database archivelog; # Switch database to archive mode SQL> alter database open; # open Data File SQL> archive log list; # Check whether the database is in archive mode to check whether the database is in archivelog mode and the archiving process is running SQL> select log_mode from v $ database; SQL> select archiver from v $ instance; SQL code log switch SQL> alter system switch logfile; this log switch writes archive to two destination locations, that is, the above/oracle/ora9/oradata/arch1 and/oracle/ora9/oradata/arch1, if you want to confirm the directory in oracle, run the following query: SQL> select name from v $ archived_log; then confirm the file list in the operating system and set non-archive SQL code SQL> archive log list; # Check whether the archive mode is SQL> alter system set log_archive_start = false scope = spfile; # disable automatic archiving SQL> shutdown immediate; www.2cto.com SQL> startup mount; # Open the control file, do not open the data file SQL> alter database noarchivelog; # Switch the database to non-archive mode SQL> alter database open; # open the data file SQL> archive log list; # view the SQL code archive log stop; archive log start; archive log list; show parameters log_archive_start; show parameters log_archive_process; # Number of archiving processes alter system set log_archive_max_process = 5; # change the number of archiving processes to 5 select * from v $ bgprocess; # Check the background process
Author: oma1989