Oracle 日志状态为stale解决方法
解决方法总结:1,千万不要在发生stale的情况下强制关闭数据库。2,多查询几次日志状态,看stale状态是否会消失。
SQLDBA> SELECT * FROM V$LOGFILE;
GROUP# STATUS MEMBER
---------- ------- ------------------------------
1 STALE /Oracle/7.3.4/dbs/log1P734.dbf
2 /oracle/7.3.4/dbs/log2P734.dbf
3 /oracle/7.3.4/dbs/log3P734.dbf
解决方法总结:
1,,千万不要在发生stale的情况下强制关闭数据库。
2,多查询几次日志状态,看stale状态是否会消失。
3,如果再数次查询无效后,可以切换日志。
4,切换日志过户,可以执行强制检查点操作。
5,不断切换日志,强制检查点,查询,直至stale状态消失。
WARNING:
DO NOT ISSUE A SHUTDOWN ABORT BEFORE GOING THROUGH STEPS 1 AND 2 BELOW.
Solution Description:
=====================
In general, the stale status of a redo log member should not be a cause for
great concern, unless you observe that this happens frequently or
systematically. Keep in mind that a stale log is not necessarily an invalid
log, but more of an "in-doubt" one. Once the corresponding redo group becomes
the current one again, the stale status will go away by itself.
Here is the recommended procedure to deal with a stale redo log:
1. Issue the following query:
SELECT V2.GROUP#, MEMBER, V2.STATUS MEMBER_STATUS,
V1.STATUS GROUP_STATUS
FROM V$LOG V1, V$LOGFILE V2
WHERE V1.GROUP# = V2.GROUP# AND V2.STATUS = 'STALE';
This will show you the group status for all stale log files.
2. For each stale log file,
2.a) If the GROUP_STATUS is 'INACTIVE', do nothing. That implies
Oracle has already checkpointed past that redo group, and thus
its contents are no longer needed for instance recovery.
Once the redo group becomes current again, the stale status of
the log file will go away by itself.
2.b) If the GROUP_STATUS is 'ACTIVE', go back to Step 1 and repeat
the query a few more times. This status usually means that
the log group is no longer the current one, but the corresponding
checkpoint has not completed yet. Unless there is a problem,
the log group should become inactive shortly.
2.c) If the GROUP_STATUS is 'CURRENT', force a log switch now.
ALTER SYSTEM SWITCH LOGFILE;
This will also force a checkpoint. If the checkpoint
completes successfully, the contents of the redo group
are no longer needed for instance recovery. Go back to
Step 1 and repeat the query a few more times until the
log group becomes inactive.
IMPORTANT: If the stale logfile belongs to an active group
or the current group (cases 2.b and 2.c above), DO NOT ISSUE
A SHUTDOWN ABORT UNTIL THE GROUP BECOMES INACTIVE.
3. Investigate the extent of the problem.
Examine the alert.log file for this instance and the LGWR
trace file, if one can be found in your background_dump_dest.
See if there is any pattern to the problem. Do you see any
recent errors, such as ORA-312, referencing that particular log
file? If so, there may be some corruption problem with the file
or a problem with the I/O subsystem (disk, controllers, etc.) .
If you are running any other Oracle version on any other platform
If there is no pattern to the problem, it is more likely an
isolated incident.
4. If you are archiving, make sure the log has been correctly archived.
Before archiving a redo log group, the ARCH process actually
verifies that its contents are valid. If that is not the case,
it issues an error such as ORA-255 ("error archiving log %s
of thread %s, sequence # %s"。Therefore, if the log group to
which the stale member belongs has been successfully archived,
it means the redo contents of the group are good, and that
archived log can be safely used for recovery. ARCH errors, if
any, will be reported in your alert.log file and in an ARCH
trace file.
说明:
============
过时的重做日志文件是 Oracle 认为由于某种
原因可能不完整的文件。 当临时错误阻止 LGWR
后台进程写入重做日志组成员时,通常会发生这种情况。 如果 Oracle 在任何时候都无法
写入重做日志文件,则该日志文件将不再
受信任,并且 Oracle 将其标记为“STALE”。这表示日志文件
不能依赖提供写入日志的所有数据。

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

Oracle 数据库日志的保留期限取决于日志类型和配置,包括:重做日志:由 "LOG_ARCHIVE_DEST" 参数配置的最大大小决定。归档重做日志:由 "DB_RECOVERY_FILE_DEST_SIZE" 参数配置的最大大小决定。在线重做日志:不归档,在数据库重启时丢失,保留期限与实例运行时间一致。审计日志:由 "AUDIT_TRAIL" 参数配置,默认保留 30 天。

Oracle 数据库启动顺序为:1. 检查前置条件;2. 启动监听器;3. 启动数据库实例;4. 等待数据库打开;5. 连接到数据库;6. 验证数据库状态;7. 启用服务(如果需要);8. 测试连接。

Oracle 数据库服务器硬件配置要求:处理器:多核,主频至少 2.5 GHz,大型数据库建议 32 核以上。内存:小型数据库至少 8GB,中等规模 16-64GB,大型数据库或高负载工作负载高达 512GB 或更多。存储:SSD 或 NVMe 磁盘,RAID 阵列提高冗余和性能。网络:高速网络(10GbE 或更高),专用网卡,低延迟网络。其他:稳定电源、冗余组件、兼容操作系统和软件、散热和冷却系统。

Oracle 所需内存量取决于数据库大小、活动水平和所需性能水平:用于存储数据缓冲区、索引缓冲区、执行 SQL 语句和管理数据字典缓存。具体数量受数据库大小、活动水平和所需性能水平影响。最佳实践包括设置适当的 SGA 大小、调整 SGA 组件大小、使用 AMM 和监控内存使用情况。

Oracle 数据库所需内存量取决于数据库大小、工作负载类型和并发用户数量。通常建议:小型数据库:16-32 GB,中型数据库:32-64 GB,大型数据库:64 GB 或更多。其他需考虑因素包括数据库版本、内存优化选项、虚拟化和最佳实践(监视内存使用情况、调整分配)。

要在 Oracle 中创建每天执行一次的定时任务,需要执行以下三个步骤:创建一个作业。为作业添加一个子作业,并设置其计划表达式为“INTERVAL 1 DAY”。启用作业。

Oracle 可以通过以下步骤读取 dbf 文件:创建外部表,引用 dbf 文件;查询外部表,检索数据;将数据导入 Oracle 表。

Oracle 数据库的内存需求取决于以下因素:数据库大小、活动用户数量、并发查询、启用的功能和系统硬件配置。确定内存要求的步骤包括:确定数据库大小、估计活动用户数量、了解并发查询、考虑启用的功能和检查系统硬件配置。
