add datafile to oracle
add datafile to oracle
However,
you can follow these steps to reclaim space efficiently:
Run the following query to check free and used space in the USERS tablespace:
Fragmentation occurs when objects are scattered in different file blocks. You can move
objects to defragment space:
If you have another tablespace, move the tables and then shrink the datafile:
If you don’t want to use another tablespace, move them within the same one:
If USERS is an Automatic Segment Space Management (ASSM) tablespace, you can shrink
segments:
💡 Important Notes:
Oracle only allows shrinking unallocated free space at the end of the file.
If fragmentation is severe, consider exporting and importing data (EXPDP/IMPDP).
Always take a backup before performing these operations.