diff options
-rw-r--r-- | THANKS.in | 1 | ||||
-rwxr-xr-x | plugins-scripts/check_oracle.sh | 7 |
2 files changed, 5 insertions, 3 deletions
@@ -199,3 +199,4 @@ Craig Orsinger | |||
199 | Robby Giffin | 199 | Robby Giffin |
200 | Henning Schmiedehausen | 200 | Henning Schmiedehausen |
201 | Markus Baertschi | 201 | Markus Baertschi |
202 | Florian Gleixner | ||
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh index 9956491..02ca111 100755 --- a/plugins-scripts/check_oracle.sh +++ b/plugins-scripts/check_oracle.sh | |||
@@ -244,13 +244,14 @@ EOF` | |||
244 | result=`sqlplus -s ${3}/${4}@${2} << EOF | 244 | result=`sqlplus -s ${3}/${4}@${2} << EOF |
245 | set pagesize 0 | 245 | set pagesize 0 |
246 | set numf '9999999.99' | 246 | set numf '9999999.99' |
247 | select b.free,a.total,100 - trunc(b.free/a.total * 1000) / 10 prc | 247 | select NVL(b.free,0.0),a.total,100 - trunc(NVL(b.free,0.0)/a.total * 1000) / 10 prc |
248 | from ( | 248 | from ( |
249 | select tablespace_name,sum(bytes)/1024/1024 total | 249 | select tablespace_name,sum(bytes)/1024/1024 total |
250 | from dba_data_files group by tablespace_name) A, | 250 | from dba_data_files group by tablespace_name) A |
251 | LEFT OUTER JOIN | ||
251 | ( select tablespace_name,sum(bytes)/1024/1024 free | 252 | ( select tablespace_name,sum(bytes)/1024/1024 free |
252 | from dba_free_space group by tablespace_name) B | 253 | from dba_free_space group by tablespace_name) B |
253 | where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}'; | 254 | ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name='${5}'; |
254 | EOF` | 255 | EOF` |
255 | 256 | ||
256 | if [ -n "`echo $result | grep ORA-`" ] ; then | 257 | if [ -n "`echo $result | grep ORA-`" ] ; then |