`

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

分享到:
评论

相关推荐

    Shows how to resize a picture box control on a form at run t

    Shows how to resize a picture box control on a form at run time.

    How_To_Resize_RAID_Partitions.pdf

    How_To_Resize_RAID_Partitions.pdf

    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 ...

    智能图像物体移除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

    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: ...

    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 ...

    resize filterq

    use directshow to resize

    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 ...

    resize

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

    易语言模块ReSize.rar

    易语言模块ReSize.rar 易语言模块ReSize.rar 易语言模块ReSize.rar 易语言模块ReSize.rar 易语言模块ReSize.rar 易语言模块ReSize.rar

    DMA2D_bilinear_resize_resize_bilinear_dma_

    bilinear resize code embedded

    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...

    matlab实现resize()函数

    matlab实现resize函数,调用方法为MyResize(I,scale,method),其中I为图像读入矩阵,scale为放大或缩小的系数,method支持nearest和bilinear两种方式

    Android代码-Resizer

    It allows you to resize an image file to a smaller or bigger one while keeping the aspect ratio. Include Resizer into your project Add the JitPack repository to your top-level build.gradle at the ...

    最全的oracle常用命令大全.txt

    先执行“nomount”,然后执行“mount”,再打开包括Redo log文件在内的所有数据库文件, 这种方式下可访问数据库中的数据。 4、startup,等于以下三个命令 startup nomount alter database mount alter database ...

    解决firefox下resize事件无效问题

    解决firefox下resize事件无效问题

    Font resize javascript

    Change Font Size OnClick: FontSizer DX Simple Implementation Easy Global Resize Resize One or a Few Sections of ...The example documents provide demonstration of how the code can be implemented.

Global site tag (gtag.js) - Google Analytics