Query to check tablespace size and freespace
hi experts
i am using oracle 9i .
want ot check freespace and size of tablespace could u plz tell me the query
thanks
varun
add following for temp files -
select sum(bytes)/1024 kbytes_alloc, tablespace_name
from sys.dba_temp_files
group by tablespace_name
the new query will be
select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb
from
(select tablespace_name, round(sum(bytes)/1024/1024 ,2) as free_space
from dba_free_space group by tablespace_name) a,
(select tablespace_name, sum(bytes)/1024/1024 as tbs_size
from dba_data_files group by tablespace_name
UNION
select tablespace_name, sum(bytes)/1024/1024 tbs_size
from dba_temp_files
group by tablespace_name ) b
where a.tablespace_name(+)=b.tablespace_name;
cheers
Similar Messages
-
How to check image size and 500PX upload action please!
Hi,
Two questions please.
1. How do you check the overall size of an image in Lightroom 4 before exporting. In Photoshop it is image/size so what is it in Lightroom please?
2. I have Canon raw files and tiffs and want to upload to 500PX and other web site galleries in one action. Is it possible? How do you set up an action to convert an image, say a tiff, to a certain size and then save as a jpeg and upload to 500pX using the plugin all in one action? At the moment I am saving the tiff as a jpeg to a correct size using a pre set, but then exporting to another folder ready to either manually upload or re-import to Lightroom as a jpeg then upload. Surely there is a quicker way than this?1. The size is visible in the metadata panel, set the dropdown to EXIF. In addition, in the Grid, with Ctrl-J, you can set the options so that you will see the cropped size in the rectangle surrounding the photo.
2. You cannot, in one action, upload to multiple galleries. Each upload is its own action. I don't know if there is a plug-in to let you upload from LR to 500px in one action; clearly there are plug-ins for Flickr and Smugmug and several others. There should be no need to re-import. Normally, the plug-ins I mentioned will take a TIFF, resize it according to your directions, convert to JPG and upload. -
Checking Image Size and Dimensions
How do I check the size of an image like a Signature or another image without having to save it and then checking it? Is there a way to check it in Safari?
What? I don't see "Inspect Element" anywhere.
Are there any plugins (perhaps at pimpmysafari.com) where we can add functions such as "Properties" for viewing image size and dimensions, as well as "View Image" to view the image by itself? I'm trying to convert from Firefox, but these are a couple of the things getting in the way. -
Check tablespace capacity and quota left?
How do I check a specific tablespace capacity and quota left?
Thanks!I guess you do not have 'Select any table' privilege,
Be granted 'Select any table' by SYS or any DBA user. then try.
SELECT Total.name "Tablespace Name",
nvl(Free_space, 0) Free_space,
nvl(total_space-Free_space, 0) Used_space,
total_space
FROM
(select tablespace_name, sum(bytes/1024/1024) Free_Space
from sys.dba_free_space
group by tablespace_name
) Free,
(select b.name, sum(bytes/1024/1024) TOTAL_SPACE
from sys.v_$datafile a, sys.v_$tablespace B
where a.ts# = b.ts#
group by b.name
) Total
WHERE Free.Tablespace_name(+) = Total.name
and Free.Tablespace_name='USERS'
ORDER BY Total.name
Tablespace Name FREE_SPACE USED_SPACE TOTAL_SPACE
USERS 38.1875 11.8125 50 -
Temporary tablespace - used and freespace size and percentage
Hi,
anyone here have a gd script to query the above?
need to correctly calculate.
thanksYou should be more concerned of what's being used in temporary tablespace. As Oracle will reuse temp segment, free space in temp tablespace is not a good indicator.
select * from v$sort_usage; -
Cacluation of undo tablespace size and retenion
How to calaculate the expected size of the undo tablespace and undo retention parameter from the exisitng data.
The easiest way to calculate undo requirementes is using the undo advisor, it is available in 10g and 9i. This is a graphical tool that lets you know the amount of required undo space according to your generated undo data.
Regards. -
DB Query to get table sizes and classification in OIM Schema
My customer's OIM Production DB size has gone upto 300 gb. They want to know why. Like they want to know "what kind of data" is the reason for such a large size of DB. Is there a way to find out, from OIM schema, what are sizes for each table (like ACT, USR etc) and classify them into User Data, Config Data, Audit Data, Recon Data, etc?
Any help is very much appreciated in this regard.
Regards
VinayYou can categorize tables using information from below link:
http://rajnishbhatia19.blogspot.in/2008/08/oim-tables-descriptions-9011.html
You can count number of rows for tables using:
select count(*) from tablename;
Find major tables whose size is to be calculated and find avg length of a row (by adding attribute lengths defined).
Finally, calculate the table size using below query:
select TABLE_NAME, ROUND((AVG_ROW_LEN * NUM_ROWS / 1024), 2) SIZE_KB from USER_TABLES order by TABLE_NAME;
regards,
GP -
Query for checking overdue payments and trigger approval process
Hi All
I need a query to be executed when a user is tries to add a AR Delivery Document for a customer with invoices that have overdue DocDueDates.
Regards
BonganiYou probably want to check overdue dates against closed and canceled items, too:
(This allows a zero dollar document to go through, for repairs or replacements)
SELECT DISTINCT 'TRUE' FROM DBO.OINV T0
WHERE T0.[DocStatus] = N'O' AND T0.[CANCELED] = N'N' AND ($[$22.0.Number]) > 0
AND T0.CardCode = ($[$4.0.0]) AND T0.[DocDueDate] < GETDATE() -
Tablespace size and autoextend
hi,
if i am to create a tablespace with one datafile, i can size it to say 100M and set autoextend on. If it reaches 100M and then starts growing, does it make things run slower as it is constantly growing? would it be better if i had done some analysis and say sized it at 2000M? And if autoextend does make it slow down, how much does it slow it down by?
thanksMy personal preference is to create at 100m with autoextend on next 100m maxsize 16000m or so. But I don't think I'd do that for a tablespace that was going to be on the receiving end of thousands of concurrent inserts a minute in a heavy OLTP environment. For that sort of situation, I think I would prefer to create at 2000m autoextend on next 2000m maxsize 16000m.
Because the poor transaction that causes the autoextend obviously suffers from a nasty bout of waiting ...but no-one else will for quite a long while, thanks to that large 2GB jump in size. Meanwhile, my hard disk is not stuck there with an over-sized monster of a datafile that was over-sized by an overly-cautious DBA.
The thing being begged in your question, in other words, is "does it make things run slower as it is constantly growing".
If your files are truly CONSTANTLY growing, yes, you're in deep trouble and you will be suffering from severe slow-down. But if you choose an appropriate NEXT clause, you can have an OCCASIONAL growth of the file, sufficient for maybe a week or more's use, that only slows down one or two people for just a relatively short time.
Where you have heavy inserts going on, increase the NEXT clause to make the incidence of file growth keep at the 'not too often' level.
In the days of multi-hundred-gig disks, I would think that any DBA sitting there still trying to predict the future as far as disk space usage is concerned is just wasting his time. As jgarry put it, there are lots of other things more deserving of your attention. There's no pressing need to ration out carefully something (ie, space) which is abundant, in other words. -
Tablespace used and free space size in 9i
Hi,
How to find the tablespace used space and tablespace free space in 9i.
Normally i uses below query in 10g and 11g, but this query not working in 9i. Please help the query for 9i....
SELECT /* + RULE */ df.tablespace_name "Tablespace",
df.bytes / (1024 * 1024) "Size (MB)",
SUM(fs.bytes) / (1024 * 1024) "Free (MB)",
Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free",
Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used"
FROM dba_free_space fs,
(SELECT tablespace_name,SUM(bytes) bytes
FROM dba_data_files
GROUP BY tablespace_name) df
WHERE fs.tablespace_name (+) = df.tablespace_name
GROUP BY df.tablespace_name,df.bytes
UNION ALL
SELECT /* + RULE */ df.tablespace_name tspace,
fs.bytes / (1024 * 1024),
SUM(df.bytes_free) / (1024 * 1024),
Nvl(Round((SUM(fs.bytes) - df.bytes_used) * 100 / fs.bytes), 1),
Round((SUM(fs.bytes) - df.bytes_free) * 100 / fs.bytes)
FROM dba_temp_files fs,
(SELECT tablespace_name,bytes_free,bytes_used
FROM v$temp_space_header
GROUP BY tablespace_name,bytes_free,bytes_used) df
WHERE fs.tablespace_name (+) = df.tablespace_name
GROUP BY df.tablespace_name,fs.bytes,df.bytes_free,df.bytes_used
ORDER BY 4 DESC;
Regards,
Pravinhi,
try this
/* TOTAL, FREE AND USED SPACE IN TABLESPACES */ SET LINESIZE 100 COLUMN TABLESPACE FORMAT A15 select t.tablespace, t.totalspace as " Totalspace(MB)", round((t.totalspace-fs.freespace),2) as "Used Space(MB)", fs.freespace as "Freespace(MB)", round(((t.totalspace-fs.freespace)/t.totalspace)*100,2) as "% Used", round((fs.freespace/t.totalspace)*100,2) as "% Free" from (select round(sum(d.bytes)/(1024*1024)) as totalspace, d.tablespace_name tablespace from dba_data_files d group by d.tablespace_name) t, (select round(sum(f.bytes)/(1024*1024)) as freespace, f.tablespace_name tablespace from dba_free_space f group by f.tablespace_name) fs where t.tablespace=fs.tablespace order by t.tablespace;
and you can have a look this thred. it will be hellp you
query to check tablespace size and freespace
regards, -
Tablespace size. System data vs user data.
Hi,
I have Oracle 11.2.0.1 on Solaris 11 x86_64. Software using SYSTEM tablespace. The free space on this tablespace is allmost end,
When i check what amount of data is collected in database i get strange value:
select SUM(qq.MB) from (select table_name,(num_rows*avg_row_len)/(1024*1024) MB, num_rows, avg_row_len from user_tables) qq;
SUM(QQ.MB)
6,43802738189697265625
So i suppose that data using only 6.4MB.... But statistic for this tablespace is
Tablespace Used MB Free MB Total MB Pct. Free
SYSAUX 655 35 690 5
UNDOTBS1 27 18 45 40
TQTBS 11 489 500 98
USERS 0 5 5 100
SYSTEM 707 93 800 12
What is using 700MB?!It is a very good thing to use the command line queries to understand these things. But it is also good to know your tools. You should check tablespace size with dbconsole, it shows nice little pictures of how much space is used. Note that your system tablespace is autoextend, and this is a good thing, since as Sybrand noted, that's where the PL/SQL is stored. As a practical matter, unless you are adding a lot of new code, that tablespace tends to expand to a steady size and just stay there. You don't want to fix it there, because you might add new code in the future.
On the other hand, sysaux and your data may need some watching. If you are curious, you can use the tablespace map function in dbconsole to see what is where in tablespaces (and there are scripts floating about to see it command line style). But don't stress over it, Oracle is really good about doing things right. What you have to watch out for is things like auditing or plan maintenance becoming space hogs in sysaux, and some apps, sometimes combined with some bugs, can use too much data space. But really, you shouldn't bother with it too much unless you see something using way more space than you would reasonably expect.
If you want to obsess over something, consider patching. 11.2.0.1 is not a good sign. -
hi,
I am using Oracle 8i. From DBA studio i see that the space assigned to data files is 98.5% full. will it affect performance ?? Ther is very few much space avaiable in the drive. Data file size is around 12 GB auto extend is 50% and free space is 3 GB.
Please suggest...If the data blocks are not cached in your shared pool , then it will read data blocks from the datafiles and this will leads to some performance issuies.Kuljit already pointed out from your answer that data blocks resides in buffer cache not in the shared pool.
My point is, sometimes, physical reads are better than logical reads. To tune a query, one must concentrate to reduce logical reads. (buffer gets).
Regarding tablespace size and performance problem, as long as there is free space is avaialble then no problems.
If the tablespace is 100% used and its data files are autoextend enabled, then, when oracle needs space to insert datafile and tbs is 100% and its datafile are autoextend, then, oracle has to allocate new exten to keep the data. In this scinario, there might be a slight issue.
If the tbs is locally managed, it will not be that must.
Moreover, if the database is OLTP with heavey transactions, then, its always better to have good amount of free space i the tablespaces.
Jaffar -
MTE class for total tablespace size
Hi,
We start a monitoring over the solutionmanager and i asked myself, if it's possible to show the total size of a tablespace.
I only see the free and used space, but not the total.
In moment we calculate the total space with these 2 results, but it is possible to have large difference in total. But i need these data for the reporting.
Thanks in AdvanceIt is a very good thing to use the command line queries to understand these things. But it is also good to know your tools. You should check tablespace size with dbconsole, it shows nice little pictures of how much space is used. Note that your system tablespace is autoextend, and this is a good thing, since as Sybrand noted, that's where the PL/SQL is stored. As a practical matter, unless you are adding a lot of new code, that tablespace tends to expand to a steady size and just stay there. You don't want to fix it there, because you might add new code in the future.
On the other hand, sysaux and your data may need some watching. If you are curious, you can use the tablespace map function in dbconsole to see what is where in tablespaces (and there are scripts floating about to see it command line style). But don't stress over it, Oracle is really good about doing things right. What you have to watch out for is things like auditing or plan maintenance becoming space hogs in sysaux, and some apps, sometimes combined with some bugs, can use too much data space. But really, you shouldn't bother with it too much unless you see something using way more space than you would reasonably expect.
If you want to obsess over something, consider patching. 11.2.0.1 is not a good sign. -
How to see tablespace size in data dictionary
How can I see the tablespace size, and used tablespace size in data dictionary view?
it is not in dba_tablespaces, and v$tablespace
Thanks.I like this little piece of code of mine:
SQL> SELECT
2 TABLESPACE_NAME,
3 RPAD(RPAD('|',100-PCT_FREE,'X'),100) || '|' USED
4 FROM (SELECT TABLESPACE_NAME,
5 100 -
6 ROUND(100 -(SUM(BYTES)/1024/1024/1024)*100/
7 (SELECT SUM(BYTES)/1024/1024/1024
8 FROM DBA_DATA_FILES DF
9 WHERE DF.TABLESPACE_NAME=FS.TABLESPACE_NAME),2
10 ) PCT_FREE,
11 ROUND(SUM(BYTES)/1024/1024/1024,2) GIBFREE
12 FROM DBA_FREE_SPACE FS
13 GROUP BY TABLESPACE_NAME) TABLESPACE_SPACE
14* ORDER BY TABLESPACE_NAME;
TABLESPACE_NAME USED
ARCHDATA |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
DATBIGGX |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
DATGX |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
DATLOWGX |XXXXXXXXXXXXXXXXXXXXXX |
IDXBIGGX |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
IDXLGX |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
IDXGX |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
LOGMNRTS |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
SYSTEM |XXXXXXXXXXXXXXXX |
TOOLS |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
UNDOGX |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |Yoann. -
Ive noticed low available space on my system how i do go through each folder to find ou thowmuch it contains?
like in windowsxp [i know its a diff os..but in comparison] how owuld i see the file sizes through out each folder ?
thank youan easier solution is to click that little gear icon at the top of the finder window (make sure you have nothing selected) the click "show view options" then check off "size" and "calculate all sizes" and make sure at the top that "all windows" is selected....that should do the trick
(@work) eMac G4 1.25 GHz OS X 10.3.9 (@home) Mac Pro 2.66 GHz Intel Quad-Xeon Mac OS X (10.4.9)
Maybe you are looking for
-
Netbeans and setDefaultLookAndFeelDecorated
I have recently started using the Netbeans 5.0 IDE to make my GUI's because its easier than typing it all myself... The problem I am having is when I create a new JFrame and set it visible it doesn't look like my original windows. i have tried using
-
I am constantly presented with an "update available" message (27.0 beta) but the update never downloads and the link to more information goes to your "Ooops" page. I see to be on the Beta update path. My browser is currently 26.0.
-
When I try to add m4a files in itunes it did not add it. Please help how can I add m4a files in itunes.
-
I just upgraded to OS X Yosemite and now I cannot open an existing project in ibooks author
I just upgraded to OS X Yosemite and now I cannot open an existing project in ibooks author
-
Editing existing Dreamweaver project?
Hi all, Here's my situation: I have been working on a Dreamweaver website for a university project for a few weeks. Last week I had to email it to a group member to add some of his work on to it. He did his part but not all of it, so I sent him a lis