Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tb_size.sql script #12

Open
astronono opened this issue Dec 27, 2021 · 1 comment
Open

tb_size.sql script #12

astronono opened this issue Dec 27, 2021 · 1 comment
Assignees

Comments

@astronono
Copy link

I implemented the zabora agent on my oracle DB and found out that the tb_size.sql in the package was not giving the right value.
I wrote another script that shows the right value now

SET pagesize 0
SET heading OFF
SET feedback OFF
SET verify OFF
select round((1-sum(nvl(fre.bytes,0))/tot.bytes)*100,2) "pct_used"
from dba_free_space fre,
(select tablespace_name, sum(bytes) bytes
from dba_data_files
group by tablespace_name) tot, dba_tablespaces tbs
where tot.tablespace_name = tbs.tablespace_name
and fre.tablespace_name(+) = tbs.tablespace_name
and fre.tablespace_name = UPPER('&1')
group by tot.bytes/1024, tot.bytes;
QUIT;

@sergiotocalini
Copy link
Owner

Hi @astronono,

Thanks for opening this issue. Which oracle version are you using? maybe it is related with the versioning?
I would suggest you to replace this file in your installation and I will introduce based on oracle versions different sql scripts.
Your input will be much appreciated.

Regards,
Sergio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants