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分区不释放处理, 感谢原作者分享。

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1
Powerful PHP integrated development environment

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
