When the data of Oracle database takes up a large space, and the data stored in it does not take up such a large space, the reason may be that the user has deleted some data, but the size of the data file will not automatically shrink. At this time, if you want to reduce the size of the data file, you can use the following methods.
1、 Use the following statement to query data files that can free up space:
select a.file#,
a.name,
a.bytes/1024/1024 CurrentMB,
ceil(HWM * a.block_ size)/1024/1024 ResizeTo,
(a.bytes – HWM * a.block_ size)/1024/1024 ReleaseMB,
‘alter database datafile ”’ || a.name || ”’ resize ‘ ||
ceil(HWM * a.block_ size)/1024/1024 || ‘M;’ ResizeCmd
from v$datafile a,
(SELECT file_ id, MAX(block_ id + blocks – 1) HWM
FROM DBA_ EXTENTS
GROUP BY file_ id) b
where a.file# = b.file_ id(+)
And (a.bytes – HWM * a.block_ size) >0
and rownum < 10
View the data file that belongs to the system table space, and reset it.
2、 Find out the data file that needs to be reset, and execute the reset statement
An error is reported because the reset data file size needs to be set to an integer.
Adjust the size of resize to 16GB, 16384mb;
3、 View free disk space
The size of the system file is reduced to 16GB, the remaining space of the root disk is greatly increased to 19.6gb, and the utilization rate is reduced to 78%.
Read More:
- Oracle quick replacement undo table space method
- Oracle database file is damaged, Error:ORA-01033 :ORACLE initialization or shutdown in progress
- appear Error:java : javacTask: source release 1.7 requires target release 1.7
- javac Task Error source release 1.7 requires target release
- Java in idea: warning: source release 11 needs to be resolved by target release 11
- Microsoft Visual C++ Runtime library not enough space for thread data
- ArcGIS publishing service analysis report error unresolved 00002 data frame has no space reference
- Android studio reported an error in the release package: Lint found fatal errors while assembling a release target
- Oracle can’t start the database due to deleting DBF file by mistake
- Failed to create Oracle Oracle home user solution appears in oracle12c installation
- -bash: cannot create temp file for here-document: No space left on device
- Windows can’t delete the file, indicating that it is in use. (release of document occupation)
- Oracle Data Guard Ping [arc2]: heartbeat failed to connect to standby “. Error is 12514 fault analysis
- [Solved] SpringBoot Integrating Oracle reports errors: ORA-12504, TNS:listener was not given the SID in CONNECT_DATA
- How to save big data in Oracle to CLOB
- Error splicing file: No space left on device
- 【Oracle】IMP-00010: not a valid export file, header failed verification
- Oracle12c client32 bit installation error: [ins-20802] Oracle net configuration assistant failed
- R load(xxx.Rdata) Error bad restore file magic number (file may be corrupted) — no data loaded
- Read in wannier90 output file hr.dat to construct real space Hamiltonian to calculate Fermi surface