`

How to resize redo log file?

阅读更多

I wrote a script named 'checkRedoLog.sh' to resize log file, which had been added to install and update script of SVA3.0.

Assuming checkRedoLog.sh is in /home/oracle.

Log on as root

[root@localhost ~]# cd /home/oracle

[root@localhost oracle]# chmod 755 checkRedoLog.sh



If you need redo information, run it with ‘state’ parameter.

[root@localhost oracle]# ./checkRedoLog.sh state



    GROUP#      BYTES STATUS

---------- ---------- ----------------

         1  536870912 INACTIVE

         2  536870912 CURRENT

         3  5242880 INACTIVE



There are two different ways to resize.

1.    Run the script directly without any parameters.
The script will check and resize redo logs automatically. But it will restart oracle at least once and at most twice if redo size is less than 512M.
The script will also add a new redo log group if there are less than three groups.


[root@localhost oracle]# ./checkRedoLog.sh

After having done this, check redo state once again to make sure whether it’s resized correctly.

[root@localhost oracle]# ./checkRedoLog.sh state



    GROUP#      BYTES STATUS

---------- ---------- ----------------

         1  536870912 INACTIVE

         2  536870912 CURRENT

         3  536870912 INACTIVE



I recommend this method if you don’t mind restarting oracle.


2. The second way, you don’t need to restart oracle, but it’s a little bit complicated.

Since there is no such command in oracle as ‘resize redo log’, you must drop the log first, and then add a new redo log with the right size.

Only Logs with status of INACTIVE or UNUSED can be dropped.

If the status of the log you want to drop (resize) is not INACTIVE, please keep doing the following steps until the status turns INACVTIVE.


First step: switch log.

[root@localhost oracle]# ./checkRedoLog.sh switch


System altered.


Then check it’s status.

[root@localhost oracle]# ./checkRedoLog.sh state



    GROUP#      BYTES STATUS

---------- ---------- ----------------

         1  536870912 CURRENT

         2  536870912 INACTIVE

         3  5242880 INACTIVE

If the status of the group you want to drop is still not INACTIVE, go back to the First step.



Now, you can drop the redo log. Let’s take group 3 for example.

[root@localhost oracle]# ./checkRedoLog.sh drop 3

Drop group 3 successfully

[root@localhost oracle]# ./checkRedoLog.sh state



    GROUP#      BYTES STATUS

---------- ---------- ----------------

         1  536870912 CURRENT

         2  536870912 INACTIVE



[root@localhost oracle]# ./checkRedoLog.sh add 3

Add group 3 512M successfully

[root@localhost oracle]# ./checkRedoLog.sh state



    GROUP#      BYTES STATUS

---------- ---------- ----------------

         1  536870912 CURRENT

         2  536870912 INACTIVE

         3  536870912 UNUSED



Some usages of the script

-state

Show status of the redo log groups

-switch

Switch log

-add groupnum

Add group with groupnum; the default size is 512M

-drop groupnum

      Drop group with groupnum

-restart

Restart oracle

分享到:
评论

相关推荐

    jQuery File Upload

    •How to implement Chunked file uploads. •Cross domain uploads (Cross-site uploads). •How to add Drop zone effects. •How to display Extended progress information. •Drag and drop uploads from ...

    oracle常用命令

    SQL> ALTER DATABASE RENAME FILE 'c:/oracle/oradata/oradb/redo01.log' TO 'c:/oracle/oradata/redo01.log'; ``` #### 6. 删除在线重做日志组(Dropping Online Redo Log Groups) 当不再需要某个日志组时,可以...

    智能图像物体移除Image处理

    智能图像物体移除Image处理 Image Resize Guide? ...2009 - 2010 Two Pilots All Rights Reserved 1. THE PURPOSE OF THE PROGRAM Image Resize Guide is a...5. HOW TO CONTACT US http://tintguide.com/en/support.html

    How_To_Resize_RAID_Partitions.pdf

    - **调整文件系统大小**:使用`resize2fs`命令先将文件系统压缩至小于目标大小,以确保安全无虞。 - **压缩RAID分区**:使用`mdadm --grow /dev/md2 --size=<new_size>`命令调整RAID分区的大小,注意大小需以KiB为...

    opencvsharp-20个例子

    Sample09: How to resize, rotate and blur images. Sample10: How to calculate the histogram of an image. Sample11: How use k-means method of OpenCV. Sample12: How to use watershed transform. Sample13: ...

    OpenCVSharp 最新4.0 的19个例子

    Sample09: How to resize, rotate and blur images. Sample10: How to calculate the histogram of an image. Sample11: How use k-means method of OpenCV. Sample12: How to use watershed transform. Sample13: ...

    OpenCVSharp-DEMO.zip

    Sample09: How to resize, rotate and blur images. Sample10: How to calculate the histogram of an image. Sample11: How use k-means method of OpenCV. Sample12: How to use watershed transform. Sample13: ...

    oracle日常使用

    - `SQL> alter database dbname datafile 'datafilename' resize ***M;`:调整数据库中的数据文件大小。 - 如果希望数据文件自动扩展,可以使用: - `SQL> alter database dbname datafile 'datafilename' ...

    Class to Auto-Position Controls on Window Resize

    Have you ever wanted to resize a window but NOT have to deal with all of that annoying control-repositioning? What a hassle! Here is an easy-to-use class that should provide a good foundation for ...

    alter database操作.docx

    alter database add logfile member '/opt/oracle/logfiles/redo02c.rdo' to group 2; 这些命令可以添加新的日志文件,并将其添加到某个特定的日志文件组中。 七、安装和打开数据库 alter database命令也可以用于...

    jquery.ba-resize.min

    《jQuery的resize()事件与jquery.ba-resize.min.js插件详解》 在Web开发中,JavaScript库jQuery大大简化了DOM操作,包括事件处理。其中,`resize()`事件用于监听窗口或元素尺寸的变化,但直接使用`$(window).resize...

    resize

    通过示例 RESIZE 示例代码显示如何修改 Windows 窗口以便当用户使用鼠标来调整窗口边框跳转到下一个可用大小自动调整方式。 更多信息 可用于从 Microsoft 下载中心下载下列文件: <br>Resize.exe ...

    VB resizeWindow.txt resizeWindow.txt

    resizeWindow.txt resizeWindow.txt resizeWindow.txtresizeWindow.txtresizeWindow.txt resizeWindow.txt resizeWindow.txt resizeWindow.txt

    oracle - answer

    ALTER DATABASE ADD LOGFILE MEMBER ‘D:\ORACLE\ORADATA\ORCL\redo04c.log’ TO GROUP 4; (9) SHUTDOWN IMMEDIATE STARTUP MOUNT ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN; ALTER SYSTEM ARCHIVE LOG ...

    解决firefox下resize事件无效问题

    在JavaScript编程中,`resize`事件是一个非常常用的功能,它允许开发者监听窗口或元素尺寸的变化。然而,在Firefox浏览器中,可能会遇到`resize`事件不起作用的情况,这会给开发者带来一些困扰。本文将深入探讨这个...

    常用sql语句

    SQL> alter database rename file 'd:\redo04c.log' to 'd:\log\redo_log04c.log'; ``` 此命令用于更改日志文件`redo04c.log`的路径和名称。 4. **删除日志文件组**: ```sql SQL> alter database drop log...

    易语言模块ReSize.rar

    《易语言模块ReSize——深度解析与应用指南》 易语言作为一款国产的编程语言,以其独特的汉字编程语法,降低了编程的学习门槛,使得更多的人能够涉足编程领域。ReSize模块是易语言生态中的一个重要组成部分,它专注...

    HashMap之resize()方法源码解读.docx

    HashMap之resize()方法源码解读 HashMap的resize()方法是HashMap中最核心的方法之一,该方法负责扩容HashMap的容量,以便存储更多的键值对。下面我们将对HashMap的resize()方法进行源码解读,了解其扩容机制和原理...

    php缩放图片类resizeimage

    $ri = new resizeimage("path/to/image.jpg", 200, 200, 1); ``` 这将创建一个`resizeimage`对象,尝试将`image.jpg`缩放到200x200像素,并进行裁剪以适应指定的尺寸。 #### 5. 性能与优化 虽然`resizeimage`类提供...

    Flattern.zip

    后续会把bilibili上面把原视频放上去。 Laravel Vue js Blog Project Here are the things you ...* How to Image intervation with Laravel (Used for image resize) * How to Use lodash * And much more...

Global site tag (gtag.js) - Google Analytics