Home > Database > Oracle > How to close oracle archive log

How to close oracle archive log

WBOY
Release: 2022-01-26 16:24:58
Original
14597 people have browsed it

Method: 1. Use the "select log_mode from v$database;" statement to check whether the current mode is archive mode; 2. Close the database and start it in the mount state; 3. Use the "alter database noarchivelog" command to close the archive Just log.

How to close oracle archive log

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to close oracle archive log

Close the archive.

1 sql> archive log list; #Check whether it is the archive mode

2 sql> alter system set log_archive_start=false scope=spfile; #Disable automatic archiving

3 sql> ; shutdown immediate;

4 sql> startup mount; #Open the control file, do not open the data file

##5 sql> alter database noarchivelog; #Switch the database to non-archive mode

6 sql> alter database open; #Open the data file

7 sql> archive log list; #View that it is in non-archive mode at this time

Extension:

Change Oracle to archive mode

1.Close oracle

SQL> shutdown immediate;
   Database closed.
   Database dismounted.
   ORACLE instance shut down.
Copy after login

2.Start to mount state

SQL> startup mount
ORACLE instance started.
Total System Global Area 2572144640 bytes
Fixed Size                  2283984 bytes
Variable Size             738199088 bytes
Database Buffers         1828716544 bytes
Redo Buffers                2945024 bytes
Database mounted.
Copy after login

3.Change to archive mode

SQL>   alter database archivelog
  Database altered.
Copy after login

Remarks: 'archivelog' is the archive mode; 'noarchivelog' is the non-archive mode.

4. Change the database to 'open' status


SQL>  alter database open
Copy after login

5. View the archive mode information

SQL>   archvie log list
Copy after login

It will prompt the archiving mode, whether it is enabled, and parameters

Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     88
Next log sequence to archive   90
Current log sequence           90
Copy after login

Recommended tutorial: "

Oracle Video Tutorial"

The above is the detailed content of How to close oracle archive log. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template