Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle turns archiving mode on or off

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Oracle can run in two modes: archive mode (archivelog) and non-archive mode (noarchivelog)

Archiving mode can improve the recoverability of Oracle database, and all production databases should run in this mode.

The archiving mode should be combined with the corresponding backup strategy, only the archiving mode without the corresponding backup strategy will only cause trouble.

1. Check whether archiving is enabled. Currently, it is not enabled.

SYS@icsdb > archive log list

Database log mode non-archiving mode

Automatic archiving is disabled

End of Archive / home/db/oracle/product/11.2.0/dbhome_1/dbs/arch

The earliest online log sequence 93

Current log sequence 95

2. Set the archive path

Alter system set log_archive_dest_1='location=/ora_arch'

3. Close the database

SYS@icsdb > shutdown immediate

The database has been closed.

The database has been uninstalled.

The ORACLE routine has been closed.

4. Start the database to mount state

SYS@icsdb > startup mount

The ORACLE routine has been started.

Total System Global Area 417546240 bytes

Fixed Size 2253824 bytes

Variable Size 314575872 bytes

Database Buffers 96468992 bytes

Redo Buffers 4247552 bytes

The database is loaded.

5. Enable or stop archive mode

If you want to enable archive mode

SYS@icsdb > alter database archivelog

The database has changed

If you want to deactivate archive mode

SYS@icsdb > alter database noarchivelog

The database has changed

6. Check the database status and open the database

SYS@icsdb > select instance_name,status from v$instance

INSTANCE_NAME STATUS

-

Icsdb MOUNTED

SYS@icsdb > alter database open

The database has changed.

7. Check the filing status

SYS@icsdb > archive log list

Database log mode archive mode

Automatic archiving enabled

End of Archive / ora_arch

The earliest online log sequence 93

Next archive log sequence 95

Current log sequence 95

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report