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

How to force a log switch- forcibly switches logs

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

Share

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

Log switching is usually performed automatically by the system without human intervention. However, in some cases, you need to force log switching, here are a few ways.

1. Modify system parameters

The following initialization parameter setting sets the log switch interval to 30 minutes (a typical value). ARCHIVE_LAG_TARGET = 1800 # # ADG environment is more commonly used.

2. Switch manually

SQL > conn / as sysdbaSQL > ALTER SYSTEM SWITCH LOGFILE

3. Create a JOB and execute it regularly.

Alter session nls_date_format='DD/MM/YYYY HH:MM:SS AM';BEGINDBMS_SCHEDULER.CREATE_JOB (job_name = > 'manual_log_switch',job_type = >' PLSQL_BLOCK',job_action = > 'BEGIN alter system switch logfile; END;',start_date = > sysdate,repeat_interval = >' FREQ=HOURLY; BYMINUTE=00,30;',-- every 30 minutesenabled = > TRUE,comments = > 'force a log switch'); END;/

Summary:

The above methods provide us with different ideas, when considering the problem can be considered from an incomprehensible point of view, each method has a suitable scenario.

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