mv oracle数据文件os分区不释放处理
生产系统的oracle数据文件的分区/home满了,需要移动部分oracle datafile到别的空闲分区 [oracle@localhost ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 97G 9.6G 83G 11% / /dev/sda6 582G 552G 0 100% /home /dev/sda2 388G 95G 274G
生产系统的oracle数据文件的分区/home满了,需要移动部分oracle datafile到别的空闲分区<br>
[oracle@localhost ~]$ df -h<br>
Filesystem Size Used Avail Use% Mounted on<br>
/dev/sda3 97G 9.6G 83G 11% /<br>
/dev/sda6 582G 552G 0 100% /home<br>
/dev/sda2 388G 95G 274G 26% /oracle<br>
/dev/sda1 190M 12M 169M 7% /boot<br>
tmpfs 16G 9.2G 6.6G 58% /dev/shm
[oracle@localhost ~]$ mv /home/rman_backup/sms_01.dbf /oracle/oracle_back/sms_01.dbf
You have new mail in /var/spool/mail/oracle
[oracle@localhost ~]$ mv /home/rman_backup/sms_02.dbf /oracle/oracle_back/sms_02.dbf
移动完成后发现 /home 分区依旧占用率100%
[oracle@localhost ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 97G 9.6G 83G 11% /
/dev/sda6 582G 552G 0 100% /home
/dev/sda2 388G 127G 242G 35% /oracle
/dev/sda1 190M 12M 169M 7% /boot
tmpfs 16G 9.2G 6.6G 58% /dev/shm
由于linux下都是由文件组成的,对于大型文件的mv或者rm操作,很有可能由于相应进程没有释放对这个文件的锁定,我们用lsof查看下oracle占用的数据文件
[root@localhost ~]# lsof |grep delete|grep oracle
oracle 32173 oracle 257u REG 8,6 34359730176 94142471 /home/rman_backup/sms_01.dbf (deleted)
oracle 32173 oracle 258u REG 8,6 34359730176 94142473 /home/rman_backup/sms_02.dbf (deleted)
oracle 32173 oracle 261u REG 8,6 11010056192 94142490 /home/rman_backup/temp001.dbf (deleted)
oracle 32175 oracle 256u REG 8,6 34359730176 94142473 /home/rman_backup/sms_02.dbf (deleted)
oracle 32175 oracle 257u REG 8,6 34359730176 94142471 /home/rman_backup/sms_01.dbf (deleted)
oracle 32175 oracle 258u REG 8,6 11010056192 94142490 /home/rman_backup/temp001.dbf (deleted)
oracle 32250 oracle 256u REG 8,6 34359730176 94142473 /home/rman_backup/sms_02.dbf (deleted)
看看这几个进程对应的是哪些进程,如果是核心的后台进程那么请慎重了,这里由于是服务器进程可以直接kiil掉来释放这些文件的锁定。
[root@localhost ~]# ps -ef|grep 32173|grep -v grep
oracle 32173 1 0 May10 ? 00:02:39 oracledxdb (LOCAL=NO)
[root@localhost ~]# ps -ef|grep 32175|grep -v grep
oracle 32175 1 0 May10 ? 00:02:40 oracledxdb (LOCAL=NO)
[root@localhost ~]# ps -ef|grep 32250|grep -v grep
oracle 32250 1 0 May10 ? 00:00:00 oracledxdb (LOCAL=NO)
[root@localhost ~]# kill -9 32173
[root@localhost ~]# kill -9 32175
[root@localhost ~]# kill -9 32250
Kill掉进程再进行查看发现空间已经释放了。
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 97G 9.6G 83G 11% /
/dev/sda6 582G 478G 75G 87% /home
/dev/sda2 388G 159G 210G 44% /oracle
/dev/sda1 190M 12M 169M 7% /boot
tmpfs 16G 9.2G 6.6G 58% /dev/shm
原文地址:mv oracle数据文件os分区不释放处理, 感谢原作者分享。

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

On July 29, at the roll-off ceremony of AITO Wenjie's 400,000th new car, Yu Chengdong, Huawei's Managing Director, Chairman of Terminal BG, and Chairman of Smart Car Solutions BU, attended and delivered a speech and announced that Wenjie series models will be launched this year In August, Huawei Qiankun ADS 3.0 version was launched, and it is planned to successively push upgrades from August to September. The Xiangjie S9, which will be released on August 6, will debut Huawei’s ADS3.0 intelligent driving system. With the assistance of lidar, Huawei Qiankun ADS3.0 version will greatly improve its intelligent driving capabilities, have end-to-end integrated capabilities, and adopt a new end-to-end architecture of GOD (general obstacle identification)/PDP (predictive decision-making and control) , providing the NCA function of smart driving from parking space to parking space, and upgrading CAS3.0

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

On April 11, Huawei officially announced the HarmonyOS 4.2 100-machine upgrade plan for the first time. This time, more than 180 devices will participate in the upgrade, covering mobile phones, tablets, watches, headphones, smart screens and other devices. In the past month, with the steady progress of the HarmonyOS4.2 100-machine upgrade plan, many popular models including Huawei Pocket2, Huawei MateX5 series, nova12 series, Huawei Pura series, etc. have also started to upgrade and adapt, which means that there will be More Huawei model users can enjoy the common and often new experience brought by HarmonyOS. Judging from user feedback, the experience of Huawei Mate60 series models has improved in all aspects after upgrading HarmonyOS4.2. Especially Huawei M

To find the number of occurrences of a character in Oracle, perform the following steps: Get the total length of a string; Get the length of the substring in which a character occurs; Count the number of occurrences of a character by subtracting the substring length from the total length.

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

To create a scheduled task in Oracle that executes once a day, you need to perform the following three steps: Create a job. Add a subjob to the job and set its schedule expression to "INTERVAL 1 DAY". Enable the job.
