Home » RDBMS Server » Server Administration » SYSAUX tablespace (linux,windows)
SYSAUX tablespace [message #537664] |
Fri, 30 December 2011 02:28  |
 |
sandeip
Messages: 23 Registered: May 2011 Location: pune
|
Junior Member |
|
|
Hi,
Please help,
Used space of sysaux tablespace of my production database decreases instead of increase.
To moniter the same i use following query
--Tablespace avail,used,free space--
SELECT
dts.tablespace_name,
(ddf.bytes / 1024 / 1024) "AvailSpace",
(ddf.bytes - (dfs.bytes))/1024/1024 "UsedSpace",
(dfs.bytes / 1024/1024 ) "FreeSpace",
TO_CHAR(((ddf.bytes - (dfs.bytes)) / ddf.bytes * 100),'990.00') "Used %"
FROM
sys.dba_tablespaces dts,
(select tablespace_name, sum(bytes) bytes
from dba_data_files group by tablespace_name) ddf,
(select tablespace_name, sum(bytes) bytes
from dba_free_space group by tablespace_name) dfs
WHERE
dts.tablespace_name = ddf.tablespace_name(+)
AND dts.tablespace_name = dfs.tablespace_name(+)
AND NOT (dts.extent_management like 'LOCAL'
AND dts.contents like 'TEMPORARY')
UNION ALL
SELECT dts.tablespace_name,
(dtf.bytes / 1024 / 1024) "AvailSpace",
(t.bytes)/1024/1024 "UsedSpace",
(dtf.bytes - (t.bytes))/1024/1024 "FreeSpace",
TO_CHAR((t.bytes / dtf.bytes * 100), '990.00') "Used %"
FROM
sys.dba_tablespaces dts,
(select tablespace_name, sum(bytes) bytes
from dba_temp_files group by tablespace_name) dtf,
(select tablespace_name, sum(bytes_used) bytes
from v$temp_space_header group by tablespace_name) t
WHERE
dts.tablespace_name = dtf.tablespace_name(+)
AND dts.tablespace_name = t.tablespace_name(+)
AND dts.extent_management like 'LOCAL'
AND dts.contents like 'TEMPORARY'
and save the result of same daily.
Please help me to troubleshoot from the same.
|
|
|
|
|
|
Re: SYSAUX tablespace [message #537690 is a reply to message #537689] |
Fri, 30 December 2011 04:38   |
 |
sandeip
Messages: 23 Registered: May 2011 Location: pune
|
Junior Member |
|
|
Hi,
I used following query to moniter the space of tablespace ==>
SELECT
dts.tablespace_name,
(ddf.bytes / 1024 / 1024) "AvailSpace",
(ddf.bytes - (dfs.bytes))/1024/1024 "UsedSpace",
(dfs.bytes / 1024/1024 ) "FreeSpace",
TO_CHAR(((ddf.bytes - (dfs.bytes)) / ddf.bytes * 100),'990.00') "Used %"
FROM
sys.dba_tablespaces dts,
(select tablespace_name, sum(bytes) bytes
from dba_data_files group by tablespace_name) ddf,
(select tablespace_name, sum(bytes) bytes
from dba_free_space group by tablespace_name) dfs
WHERE
dts.tablespace_name = ddf.tablespace_name(+)
AND dts.tablespace_name = dfs.tablespace_name(+)
AND NOT (dts.extent_management like 'LOCAL'
AND dts.contents like 'TEMPORARY')
UNION ALL
SELECT dts.tablespace_name,
(dtf.bytes / 1024 / 1024) "AvailSpace",
(t.bytes)/1024/1024 "UsedSpace",
(dtf.bytes - (t.bytes))/1024/1024 "FreeSpace",
TO_CHAR((t.bytes / dtf.bytes * 100), '990.00') "Used %"
FROM
sys.dba_tablespaces dts,
(select tablespace_name, sum(bytes) bytes
from dba_temp_files group by tablespace_name) dtf,
(select tablespace_name, sum(bytes_used) bytes
from v$temp_space_header group by tablespace_name) t
WHERE
dts.tablespace_name = dtf.tablespace_name(+)
AND dts.tablespace_name = t.tablespace_name(+)
AND dts.extent_management like 'LOCAL'
AND dts.contents like 'TEMPORARY'
Daily,i used to save the output of given query.
Please find the attachment for same,in which used space goes on decreasing.
|
|
|
|
Re: SYSAUX tablespace [message #537702 is a reply to message #537690] |
Fri, 30 December 2011 05:39   |
 |
ramoradba
Messages: 2457 Registered: January 2009 Location: AndhraPradesh,Hyderabad,I...
|
Senior Member |
|
|
@ Michel,
SELECT dts.tablespace_name,
( ddf.bytes / 1024 / 1024 )
"AvailSpace",
( ddf.bytes - ( dfs.bytes ) ) / 1024 / 1024
"UsedSpace",
( dfs.bytes / 1024 / 1024 )
"FreeSpace",
To_char(( ( ddf.bytes - ( dfs.bytes ) ) / ddf.bytes * 100 ), '990.00')
"Used %"
FROM sys.dba_tablespaces dts,
(SELECT tablespace_name,
SUM(bytes) bytes
FROM dba_data_files
GROUP BY tablespace_name) ddf,
(SELECT tablespace_name,
SUM(bytes) bytes
FROM dba_free_space
GROUP BY tablespace_name) dfs
WHERE dts.tablespace_name = ddf.tablespace_name(+)
AND dts.tablespace_name = dfs.tablespace_name(+)
AND NOT ( dts.extent_management LIKE 'LOCAL'
AND dts.contents LIKE 'TEMPORARY' )
UNION ALL
SELECT dts.tablespace_name,
( dtf.bytes / 1024 / 1024 ) "AvailSpace",
( t.bytes ) / 1024 / 1024 "UsedSpace",
( dtf.bytes - ( t.bytes ) ) / 1024 / 1024 "FreeSpace",
To_char(( t.bytes / dtf.bytes * 100 ), '990.00') "Used %"
FROM sys.dba_tablespaces dts,
(SELECT tablespace_name,
SUM(bytes) bytes
FROM dba_temp_files
GROUP BY tablespace_name) dtf,
(SELECT tablespace_name,
SUM(bytes_used) bytes
FROM v$temp_space_header
GROUP BY tablespace_name) t
WHERE dts.tablespace_name = dtf.tablespace_name(+)
AND dts.tablespace_name = t.tablespace_name(+)
AND dts.extent_management LIKE 'LOCAL'
AND dts.contents LIKE 'TEMPORARY'
@ OP
Any purge on sysaux occupants ?
cleared any logs ?or AWR data ? etc .....any clue ?
Sriram
|
|
|
|
|
|
Re: SYSAUX tablespace [message #537715 is a reply to message #537707] |
Fri, 30 December 2011 07:14  |
 |
Michel Cadot
Messages: 68737 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
sandeip wrote on Fri, 30 December 2011 13:03Hi sriram,
i have neither purge sysaux occupants nor cleared any logs or AWR data.
On weekly basis i used to truncate AUD$ table,which is present in SYSTEM Tablespace.
SQL> select table_name,tablespace_name from dba_tables where table_name like 'AU
D$';
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
AUD$ SYSTEM
SQL>
Michel Cadot wrote on Fri, 30 December 2011 10:39Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
Regards
Michel
[Updated on: Fri, 30 December 2011 07:15] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Feb 27 06:00:49 CST 2025
|