重建回滚表空间
因为意外原因(掉电,人为杀死进程)导致回滚段中的数据没有提交,回滚段中保留大量数据无法去除,我想到的办法就是重建表空间。当Oracle中当读写大批量数据时候,如果不及时提交任务,会导致回滚表空间的迅速增加,回滚表空间会一直增大,而不自动释放它占
因为意外原因(掉电,人为杀死进程)导致回滚段中的数据没有提交,回滚段中保留大量数据无法去除,我想到的办法就是重建表空间。当Oracle中当读写大批量数据时候,如果不及时提交任务,会导致回滚表空间的迅速增加,回滚表空间会一直增大,而不自动释放它占用的硬盘空间,(当然,几个小时后,系统会自动释放它自身的占用率,但不会释放它所占用的硬盘空间),这时,也可以通过重建表空间来解决。
1、重建回滚表空间方法,
思路:先新建回滚表空间,再重新定向到新建的回滚表空间,然后删除掉原来的回滚表空间。如果觉得有必要,可以再重建原来的表空间,删除新建的表空间。
-- 创建备用undo表空间
create undo tablespace undotbs2 datafile '/opt/app/oracle/oradata/orcl/undotbs02.dbf' size 100m
-- 切换undo表空间,使系统使用新建的回滚表空间
alter system set undo_tablespace=undotbs2 scope=spfile
--关闭服务
shutdown immediate
--重新启动服务
startup
-- 删除掉原来的混滚表空间
drop tablespace undotbs1 including contents and datafiles;
-- 创建原undo表空间
create undo tablespace undotbs1 datafile '/opt/app/oracle/oradata/orcl/undotbs01.dbf' size 1000m;
-- 切换undo表空间
alter system set undo_tablespace=undotbs1 scope=spfile;
-- 关闭重起并把备用undo表空间drop
shutdown immediate
startup
drop tablespace undotbs2 including contents and datafiles;
2、回滚段无法删除的处理
症状:
删除回滚段表空间(drop tablespace undotbs1 including contents)的时候报下面的错
ORA-01548: 已找到活动回退段'_SYSSMU1$',终止删除表空间
处理过程:
1 create undo tablespace undotbs2 datafile '/opt/app/oracle/oradata/orcl/undotbs02.dbf' size 100m;
alter system set undo_tablespace=undotbs2;
drop tablespace undotbs1 including contents;(进行这部操作的时候会报下面的错):
ORA-01548: 已找到活动回退段'_SYSSMU1$',终止删除表空间
2 修改文件/opt/app/oracle/admin/orcl/pfile/init.ora.913201117448,如下:
undo_management=manual
undo_retention=10800
undo_tablespace=undotbs2
_CORRUPTED_ROLLBACK_SEGMENTS =(_SYSSMU1$,_SYSSMU2$,_SYSSMU3$,_SYSSMU3$,_SYSSMU4$,_SYSSMU5$,_SYSSMU6$,_SYSSMU7$,_SYSSMU8$,_SYSSMU9$,_SYSSMU10$)
3 启动服务
startup pfile=/opt/app/oracle/admin/orcl/pfile/init.ora.913201117448
4 删除表空间
drop tablespace undotbs1 including contents;
create undo tablespace undotBS1 datafile '/opt/app/oracle/oradata/orcl/undotbs01.dbf' size 1000m;
5 修改init.ora.913201117448,如下:
undo_management=auto
undo_retention=10800
undo_tablespace=undotBS1
#_CORRUPTED_ROLLBACK_SEGMENTS =(_SYSSMU1$,_SYSSMU2$,_SYSSMU3$,_SYSSMU3$,_SYSSMU4$,_SYSSMU5$,_SYSSMU6$,_SYSSMU7$,_SYSSMU8$,_SYSSMU9$,_SYSSMU10$)
6 关闭服务shutdown immediate,并且用下面的命令重新启动服务
startup pfile=/opt/app/oracle/admin/orcl/pfile/init.ora.913201117448
7 拷贝spfile文件,原先的spfile文件做好备份
create spfile='/opt/app/oracle/product/10.1.0/db_1/dbs/spfileorcl.ora' from pfile='/opt/app/oracle/admin/orcl/pfile/init.ora.913201117448'
8 关闭服务器shutdown immediate,重新启动服务器startup,删除新建表空间,即可。
drop tablespace undotbs2 including contents and datafiles;
select segment_name,status,tablespace_name from dba_rollback_segs;
SEGMENT_NAME STATUS TABLESPACE_NAME
------------------------------ ---------------- ------------------------------
SYSTEM ONLINE SYSTEM
_SYSSMU1$ ONLINE UNDOTBS1
_SYSSMU2$ ONLINE UNDOTBS1
_SYSSMU3$ ONLINE UNDOTBS1
_SYSSMU4$ ONLINE UNDOTBS1
_SYSSMU5$ ONLINE UNDOTBS1
_SYSSMU6$ ONLINE UNDOTBS1
_SYSSMU7$ ONLINE UNDOTBS1
_SYSSMU8$ ONLINE UNDOTBS1
_SYSSMU9$ ONLINE UNDOTBS1
_SYSSMU10$ ONLINE UNDOTBS1
11 rows selected.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What process is explorer.exe? When we use the Windows operating system, we often hear the term "explorer.exe". So, are you curious about what this process is? In this article, we will explain in detail what process explorer.exe is and its functions and effects. First of all, explorer.exe is a key process of the Windows operating system. It is responsible for managing and controlling Windows Explorer (Window

ccsvchst.exe is a common process file that is part of the Symantec Endpoint Protection (SEP) software, and SEP is an endpoint protection solution developed by the well-known network security company Symantec. As part of the software, ccsvchst.exe is responsible for managing and monitoring SEP-related processes. First, let’s take a look at SymantecEndpointProtection(

Why does wireless screencasting fail to connect? Some friends have reported that the connection fails when using wireless screen mirroring. What is going on? What should I do if the wireless screen mirroring connection fails? Please confirm whether your computer, TV and mobile phone are connected to the same WiFi network. Screen mirroring software requires devices to be on the same network to work properly, and Quick Screen Mirroring is no exception. Therefore, please quickly check your network settings. It is important to determine whether the screen mirroring function is supported. Smart TVs and mobile phones usually support DLNA or AirPlay functionality. If the screencast function is not supported, screencasting will not be possible. Confirm whether the device is connected correctly: There may be multiple devices under the same WiFi. Make sure you are connecting to the device you want to share the screen with. 4. Ensure that the network

When connecting a printer to a local area network and starting a print job, some minor problems may occur. For example, the problem "wpsoffice cannot start the print job..." occasionally occurs, resulting in the inability to print out files, etc., delaying our work and study, and causing a bad impact. , let me tell you how to solve the problem that wpsoffice cannot start the print job? Of course, you can upgrade the software or upgrade the driver to solve the problem, but this will take you a long time. Below I will give you a solution that can be solved in minutes. First of all, I noticed that wpsoffice cannot start the print job, resulting in the inability to print. To solve this problem, we need to investigate one by one. Also, make sure the printer is powered on and connected. Generally, abnormal connection will cause

A Comprehensive Guide to PHP 500 Errors: Causes, Diagnosis, and Fixes During PHP development, we often encounter errors with HTTP status code 500. This error is usually called "500InternalServerError", which means that some unknown errors occurred while processing the request on the server side. In this article, we will explore the common causes of PHP500 errors, how to diagnose them, and how to fix them, and provide specific code examples for reference. Common causes of 1.500 errors 1.

I believe many friends have encountered the problem of system blue screen, but I don’t know what is the cause of win11 blue screen. In fact, there are many reasons for system blue screen, and we can investigate and solve them in order. Reasons for win11 blue screen: 1. Insufficient memory 1. It may occur when running too many software or the game consumes too much memory. 2. Especially now there is a memory overflow bug in win11, so it is very likely to be encountered. 3. At this time, you can try to set up virtual memory to solve the problem, but the best way is to upgrade the memory module. 2. CPU overclocking and overheating 1. The causes of CPU problems are actually similar to those of memory. 2. It usually occurs when using post-processing, modeling and other software, or when playing large-scale games. 3. If the CPU consumption is too high, a blue screen will appear.

Some users may encounter slow charging speeds when using Apple phones. There are many reasons for this problem. It may be caused by low power of the charging device, device failure, problems with the USB interface of the mobile phone, or even battery aging and other factors. Why does Apple mobile phone charge very slowly? Answer: charging equipment problem, mobile phone hardware problem, mobile phone system problem. 1. When users use charging equipment with relatively low power, the charging speed of the mobile phone will be very slow. 2. Using third-party inferior chargers or charging cables will also cause slow charging. 3. It is recommended that users use the official original charger, or replace it with a regular certified high-power charger. 4. There is a problem with the user’s mobile phone hardware. For example, the USB interface of the mobile phone cannot be contacted.

In Linux systems, zombie processes are special processes that have been terminated but still remain in the system. Although zombie processes do not consume many resources, if there are too many, they may cause system resource exhaustion. This article will introduce how to correctly remove zombie processes to ensure the normal operation of the system. 1Linux zombie process After the child process completes its task, if the parent process does not check the status in time, the child process will become a zombie process. The child process is waiting for confirmation from the parent process, and the system will not recycle it until it is completed. Otherwise, the zombie process will continue to hang in the system. To check whether there are zombie processes in the system, you can run the command top to view all running processes and possible zombie processes. The result of the ‘top’ command can be seen from the figure above in Linux.
