Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9238

Re: Crontab Script to monitor tablespace

$
0
0

Hi,

Do you have solution manager?

 

Why don't you activate the CCMS monitoring for the Table space check.

 

Ok now to see the table space you can used the below command to see the table space.

 

brspace -f dbshow -c tsinfo

 

what you need to have in the crontab is

 

ss hh * * * . /location of the script/tablespacecheck.sh

 

vi tablespacecheck.sh

you need to write a code to call the below command when you are at SQL prompt.

 

 

This query will help you to find the table space free size

 

SELECT /* + RULE */df.tablespace_name AS "Tablespace",df.bytes / (1024 * 1024 * 1024) AS "Size (GB)",Trunc(fs.bytes / (1024 * 1024 * 1024)) AS "Free (GB)" FROM(SELECT tablespace_name,Sum(bytes) AS bytes FROM dba_free_space GROUP BY tablespace_name) fs, ( SELECT tablespace_name,SUM(bytes) AS bytes FROM dba_data_files GROUP BY tablespace_name) df WHERE fs.tablespace_name = df.tablespace_name ORDER BY 3 desc

 

Hope this helps.

 

Thanks

Rishi Abrol


Viewing all articles
Browse latest Browse all 9238

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>