10g reclaim free space
Hello
I would like to make a few space optimization in Oracle 10.2 data.
Select sum (bytes) / 1024/1024/1024 dba_segments; give me 26.2 GB
Select sum (bytes) / 1024/1024/1024 of dba_data_files; gives me 43.9 GB
Select sum (bytes) / 1024/1024/1024 dba_free_space; gives me 17.5 GB
So I would get 17.5 GB unused disk space.
I can't use Segment space Adviser due to lack of license.
What is the best way to identify 'bad' TABLES/INDEX objects that are the best candidates for the SHRINK operation.
I know that I have free unused space in the DB, but now I am only able to find storage space of (from dba_free_space) who have an amount of free space. I don't know how to find specific TABLES/INDEXES with the wasted space.
I tried to run the script bellow. A space has been recovered, but still 17.5 GB of unused space in the data files.
set pages 0 set lin 150 set verify off column file_name format a60 word_wrapped column smallest format 999,990 heading "Smallest|Size|Poss." column currsize format 999,990 heading "Current|Size" column savings format 999,990 heading "Poss.|Savings" column sum format 999,999,999 break on report compute sum of savings on report column value new_val blksize select value from v$parameter where name = 'db_block_size' / select file_name, ceil( (nvl(hwm,1)*&&blksize)/1024/1024 ) smallest, ceil( blocks*&&blksize/1024/1024) currsize, ceil( blocks*&&blksize/1024/1024) - ceil( (nvl(hwm,1)*&&blksize)/1024/1024 ) savings from dba_data_files a, ( select file_id, max(block_id+blocks-1) hwm from dba_extents group by file_id ) b where a.file_id = b.file_id(+) / column cmd format a95 word_wrapped select 'alter database datafile '''||file_name||''' resize ' || ceil( (nvl(hwm,1)*&&blksize)/1024/1024 ) || 'm;' cmd from dba_data_files a, ( select file_id, max(block_id+blocks-1) hwm from dba_extents group by file_id ) b where a.file_id = b.file_id(+) and ceil( blocks*&&blksize/1024/1024) - ceil( (nvl(hwm,1)*&&blksize)/1024/1024 ) > 0 /
Thanks for some tips
The following SQL * more example uses the DBMS_SPACE package to get information from the unused space.
SQL > total_blocks VARIABLE NUMBER
SQL > total_bytes VARIABLE NUMBER
SQL > unused_blocks VARIABLE NUMBER
SQL > unused_bytes VARIABLE NUMBER
SQL > lastextf VARIABLE NUMBER
SQL > last_extb VARIABLE NUMBER
SQL > lastusedblock VARIABLE NUMBER
SQL > exec DBMS_SPACE. UNUSED_SPACE ('SCOTT', 'EMP', 'TABLE',: total_blocks,-)
>: total_bytes,: unused_blocks,: unused_bytes,: lastextf, -.
(>: last_extb,: lastusedblock);
PL/SQL procedure successfully completed.
SQL > PRINT
TOTAL_BLOCKS
------------
5
TOTAL_BYTES
-----------
10240
...
LASTUSEDBLOCK
-------------
3
Management of space for schema objects
Please read ORACLE-BASE - recovery of the space not used in the data files
Tags: Database
Similar Questions
-
Reclaim free space after deleting Partition Bootcamp
After installing a new SSD and gives back to the top of time Machine, I deleted my Bootcamp partition on my MBP using Boot Camp Assistant. The Boot Camp partition, although MS-FAT was no longer bootable after recovery, and I thought again and use Winclone to retrieve my Windows backup. The result of delete Boot Camp seems good:
XXXs-MacBook-Pro: ~ the name list $ diskutil
/ dev/disk0 (internal, physical):
#: NAME SIZE TYPE IDENTIFIER
0: GUID_partition_scheme * 960,2 GB disk0
1: disk0s1 EFI EFI 209.7 MB
2: Apple_HFS Macintosh HD 959,3 GB disk0s2
3: disk0s3 Apple_Boot Recovery 650.0 MB HD
But when I look at the storage, I find that I went 113 GB on my hard drive MacIntosh partition (or says my Time prior Machine backup) to more than 300 GB. The Boot Camp 118.5 GB partition is gone, but the 'Other' segment seems to have increased to 284 GB.
I see a lot of solutions online for free space recovery after the removal of Boot Camp, but they do not seem to apply to me. Many are for removals of Boot Camp failed using disk utility. Several involve CS, but I have no basic storage. I tried to boot into recovery and repair. I tried several reboots to clear space.
Any ideas, please?
Please after the release of the following OSX Terminal commands...
diskutil list
Cs diskutil list
sudo TPG - vv - r see the/dev/disk0
Please enter your password when you are prompted by the command 'sudo '.
-
Calculate the free space of the lob segment / reclaim space?
Friends...
DB: 11 GR 2
OS: Linux
I am trying shrink lob segment and recover the free space between the business segments.
This area in Oracle DB is new to me so try to learn and to shrink the segment.
I went through various metalink doco (386341.1) but not be able to get answers for below...
Issues related to the:
1. how much free space is available in the lob segment?
2 can I assume 'no LOB DATA' as the free space currently and even will be recovered once the segment will be shrunk?
3. no disadvantage of using "ALTER TABLE... SHRINK SPACE.
4. is it true if storage segment is 100 GB as many redo will be generated when trying to alter table... shrink the space?
I'm following the steps below.
1 find Segment name-> sys_lob123
2. find the size of storage - > 100 GB
3. find the size of the LOB data-> 70
4. find the size of the data not LOB-> 30
2. the storage size
Select 'storage' from dba_extents bytes
where nom_segment = 'sys_lob123. '
100 GB
3. the size of the LOB
Select dbms_lob.getlength (col_lob) in the table_lob;
70 GB
4. the size of the LOB data not
100-70 = 30 GB (i.e. #3 - #2)
Thanks in advance and enjoy your time looking into this...
Use DBMS_REDEFINITION to reorganize the LOB segment, it is the best way to retrieve a LOB segment space. Also use the clause "MEANS of COMPRESS" and SECURE LEADER, creating the temp table. There is no reason that you can use the BASIC FILE. It's online process, which means that your app can stay up to... However, make sure that monitor you the database when executing redef, as it can cause conflicts and slow down your application, in which case you must kill the reorg...
If this process is not feasible or overwhelms you, "ALTER TABLE MOVE" is another option.
With 'Displacement of Alter table', you need to rebuild all indexes after you move the LOB segment. Don't forget this is an offline process and your application needs a time out while you do this.
Here is the query to list the 10 LOBs albums in your database-
fixed line 160
Col a20 PROPRIETARY format
Col TABLE_NAME format a30
Col COLUMN_NAME format a30
Col nom_segment format a30
size col 999 999 999 format
SELECT *.
FROM (SELECT b.owner,
b.table_name,
b.column_name,
a.segment_name,
SUM (a.bytes) / (1024 * 1024) "size".
FROM dba_segments a, b dba_lobs
WHERE a.segment_name LIKE '% SYS_LOB '.
AND a.segment_name = b.segment_name
AND a.owner NOT IN ('SYS', 'SYSTEM', 'GENERAL', "OUTLN")
B.owner GROUP,
b.table_name,
b.column_name,
a.segment_name
ORDER BY DESC 5)
WHERE ROWNUM<>
-
Recovery of free space Compellent
Hi guys, I installed a new Dell SCv2020 Compellent storage with vSphere U3b 5.5 for an existing customer
I have a deep knowledge of Dell PowerVault storage, but I'm new with Dell Compellent. I read that the snapshots for backups or running Storage vMotion can affect free space on the end due to the native LUN provisioning storage: communities.vmware.com/.../436628; TSTART = 0
The suggestion is run or plan the command "esxcli storage vmfs unmap-l MyDatastore" which calls the primitive SCSI UNMAP manually
I tested a Storage vMotion and indeed space on the source LUN are assigned until this only manually 'no '. I have not yet tested how instant backup affect free space on the storage because I've not yet migrated any VM on the new infrastructure (by the way I use v8 of Veeam Backup who insist a lot about VMware snapshots)
Anyone here can share ideas and comments? Thanks a lot guys
Marco
You are on point, use the tool unmap to reclaim space on the LUN. Compellent thin provisions at the end back and depending on your environment, you should probably be thin provisioning your LUN on the end of VMware. To the wire when you remove VMware servers and vmotion of data store to data store space, will not be recovered on Compellent b/c, that storage is ignorant because data are only is more used. The "fix" for what there is complete integration between VMware and Dell is to run that unmap tool.
What started doing every quarter or so is to run the tool unmap on all LUNS that are thin and put into service (in our environment all volumes). I tested unmap several times and I had no problems with running the tool while the servers are running on this volume. I would say that the tool running on a server that does not have a lot of load work because the CPU spike during unmap (datastore readings will boost as well).
Regarding backups and snapshots, I have no problems with the space about those. Replays freeze blocks of reference data, but once this review has expired the space is recovered. Regarding backups depends on what you use for backups - we use CommVault who will take a glance of the LUN, copy the data off power then release the tension (so for a short period of time, he didn't there ate during the backup space, but it takes a few minutes to copy the data).
-
Request for information add tablespace free space
Dear Expert.I add 40G of required tablespace PSARS3. Data files has been added successfully, but the free space add are almost 16G and 40G not see the query in the tables below. No idea how it works?
Add 4 new datafile with 10G of each
Before the request to ADD
Tablespace name size (MB) Free (MB) Used (%) Autoextend Total Size (MB)
PSAPSR3 600,383.93 27,409.44 95% YES 752,383.95
After query ADD
PSAPSR3 359549,00 11,728.94 95% YES 75539.94
Respect of
William
Hello
You have added the file with a size of 2G of size which will extend to a maximum size of 10g if necessary. This means that you have only added 2 X 4 or 8 G of space.
-
Is it difficult for oracle follow the news of free space in the tablespace Temp?
DB version: 11.1
http://docs.Oracle.com/CD/B28359_01/server.111/b28320/statviews_5056.htm
!!!!FREE_SPACE : Total free space available, in bytes, including space that is currently allocated and available for reuse and space that is currently unallocated ALLOCATED_SPACE : Total allocated space, in bytes, including space that is currently allocated and used and space that is currently allocated and available for reuse
I know that temporary tablespace is 'temporary' and varies according to gender, creating index... etc. But, can't they say just free space in bytes.
Lets say my temporary tablespace size is 2 GB and if the DBA_TEMP_FREE_SPACE.free_space column is 500 MB. What does that mean?>
Lets say my temporary tablespace size is 2 GB and if the DBA_TEMP_FREE_SPACE.free_space column is 500 MB. What does that mean?
>
This means for a locally managed temporary tablespace, reduce the size to the amount of space currently in use; in other words, reclaim the space unallocated and allocated space is unused.TABLESPACE_SIZE - FREE_SPACE
See Shrinking a temporary Tablespace locally managed in the DBA Guide
http://docs.Oracle.com/CD/B28359_01/server.111/b28310/tspaces007.htm
>
The great sorting operations performed by the database can cause a temporary tablespace more and taking a considerable amount of disk space. When the sort operation is complete, the extra space is not released; It is just marked as free and available for reuse. Therefore, a single operation of large size can result in a large amount of temporary space that remains unused, once the sort operation. For this reason, the database allows to shrink the locally managed temporary tablespaces and free up unused space.
. . .
Shrinking frees as much space as possible while maintaining the other attributes of the tablespace or tempfile. -
Hello
I deleted the unnecessary data in the table, but after removal also not able to leave space is there an option I think there shrink for this option no solution without error for this
and analyse the option of free table space table
Thank youHello
As previously posted, it depends on your Version. Otherwise, you will find enclosed a few way to reclaim the space lost (in 11.2):
http://docs.Oracle.com/CD/E11882_01/server.112/e25494/schema003.htm
Hope this helps.
Best regards
Jean Valentine -
Free space in the data store is lower we shouldn't
Hello
I'm under VMware ESXi on HP Proliant DL380 G5 server - the data store has a global capacity of 678 GB, with now 34 GB free. I have 5 VMs running:
reader1/lecteur2
(1) Win2k3: 50 / 100
(3) Win2k3: 50 / 50
(1) Windows XP: 10
Oh - and the two models, one for the server (50) and a XP (10)
Yesterday, I created a couple of clones of the XP, 1 with Vmkfstools - i and the other with vConverter - especially for the practice, but they are only 10 GB. Before my creations, free space read about 115 GB - then she got at the moment, I noticed 34GB. I deleted the two new virtual machines thinking I came home back from space, but no dice. Math is not my best subject, but this does not seem to add up. Do something wrong, I missed something?
Is it possible to reclaim that space? Before I thought to check with you guys, it dawned on me that I could stop all VMs and restart the host, but if there is another way, I want to know it.
Linda
Browse the data store - go to the "Home" view - inventory - data warehouses, click a data store, and then select Browse.
Look in the subdirectory for each virtual computer and determine that seem abnormal large size files and total size of all files that exceed the size of the virtual disks assigned to the virtual machine. If you specify then what are the names of the files a plan for how to get rid of them.
-
No free space after deleting files - trouble with optimized storage?
Hi, I have macos Sierra and I deleted many files to my main drive and also to my external hard drive (both to the Mac OS Extended format) in preparation for the boot camp. I also emptied the Recycle Bin, although there is much less space on the two disks that it should be and the majority of the space is obviously indicated under "purgeable". I thought it would not be a problem, because I assumed that the space would be released, if I move all of the files there and if I need for the new Windows partition. However, this assumption was false. I can't simply use storage that I released. I can't move there all the files and I can't create the partition from free space. What can I do with it? It's pretty frustrating... Thanks for the help!
You must use the Bootcamp Assistant to create the Bootcamp partition.
Please provide details on the total space and free space on your internal drive. Post screenshots of what you see in system-> storage information. In addition, select the drive in Finder-I press control and post a screenshot of the window read the information.
-
Upgrade to Sierra: restart upgrade procedure (free space)
Hello
today I tried to upgrade El Capitan in Sierra, after restarting the installation said that there is not enough free space left. Therefore, I changed the boot volume on my system disk and initialized in El Capitan.
How the upgrade process restarted after deleting old files?
The spectacle of the App Store of only Sierra is loaded.
see you soon
Gregor
Hello gregor gregor gregor.
Thank you for using communities of Apple Support. It's my understanding you are needing help with upgrading to Sierra, as the Mac App Store gives more the possibility to download. I want to assure you that you can upgrade and enjoy Sierra successfully.
If you quit the Installer do not click on continue, you can open it later in your Applications, Launchpad or Spotlight folder. Looking for a file named Install macOS Sierra. During the installation, your Mac may restart several times. It performs then a few initial configuration in the background tasks. Although these tasks are ongoing activities such as the use of Spotlight or Mail may not seem as fast as they were before.
Have an amazing day!
-
Whenever I try to update my iPhone 6 for the ios10 it is said it is impossible and that an error occurred during the installation? I ' have enough free space, so I'm not real why he keeps now.
Try to update via iTunes.
See you soon,.
GB
-
Free space of hard drive in the MacBook air changes seemingly at random
In recent days, my hard drive went a few GB of free space, zero KB. I check with clean my mac and see, first that my free space of RAM with the passage of time is reduced up to 10 mg and space free hard drive then start reduced up to zero KB and after 20 sec RAM & hard return to normal space (increased).
What is the problem?
You seem to be two distinct topics: storage and RAM. It is normal that all RAM to use. Please read the section of memory to use the activity monitor to your Mac - Apple Support.
Never use a 'cleansing' of utilities for any purpose. Uninstall "CleanMyMac.
-
What is the actual free space on my drive?
It shows that my apps take 139,73 GB of storage. However, he also says that the size of my disk is 499,06 GB and free space is 460,58 GB, how is that possible?
The article Apple below can help.
-
How can I transfer my photos to iCloud by using a MacBook Air to an external hard drive? After downloading, my iCloud pictures can be deleted to free space on my iPhone 6 s?
-
Disk space is full with 143 GB free space
Hello
I found a strange math calculations to Apple here. My disk space is filled with 143 GB free space.
Here's the new math = 507 GB Apps + 119 movies GB 50 GB + 38 GB Audio 143 GB of space free Photos Plus 500 GB
I use MacBook Pro (retina, 15 inch, mid-2014) with Mac OS X 10.11.4 running
Thank you
Kiran
Hi Kirin, for more information on the other category in the view of storage , see this support article.
There seems to be a bug in the about this Mac Look storage tab > system report > storage. It's probably different.
Omni DiskSweeper can show you the exact size and location of all your files. It will be the inventory of your disc from files that occupy more space. It can also give you a fairer read disk space than the Finder or storage tab of the about this Mac. If you want you can even delete files from OmniDisk Sweeper. But beware, some items may be important for your system.
For more information about the category others in storage to display, see this support article.
Maybe you are looking for
-
ITunes connect for iBooks application
-
MacBook Air 13 "2011 Middle temperatures
base model 2011 with 1.7 Ghz i5. You wonder if it's a hot model by itself or only mine is. I have temperatures of 60 light web browsing mode and full 100 c while watching youtube at 1080@60 or shake, even in the middle. Parallels heat my macbook up t
-
How to avoid the built-up for the events of "move cursor?
-
HP ENVY m6-k010dx Sleekbook - Windows 7 drivers
I have a friend who bought a HP ENVY m6-k010dx Sleekbook with windows 8 on it. I removed 8 and put on 7. I am looking for windows 7 drivers bluetooth and ethernet but can't find them. Can someone point me in the right direction? Hp machine support pa
-
Hello My DVD/RW drive stopped responding on my Acer Aspire laptop computer 4510Z I checked the Device Manager which is gives the following error message: Windows cannot start this hardware device because its information of configuration (in the regis