Figuring out how much space a database is using
Posted in 2016
Topics: Storage & Space Management
IDS 11.50.FC7 Solaris 10 I have 2 database in an instance sharing 2 dbspaces. Is there a good way to figure out how much space one of the databases is using as well as how much in each dbspace for that database? Larry
Try this SQL against the sysmaster database:
select
n.dbsname[1,20],
dbinfo("DBSPACE", n.partnum)::char(30) dbspace,
sum(trunc((i.ti_nptotal * i.ti_pagesize)/1024)) size_kb
from systabnames n, systabinfo i
where n.partnum = i.ti_partnum
and n.tabname != "TBLSpace"
group by 1,2
order by 1,2
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of LARRY
SORENSEN
Sent: Thursday, August 11, 2016 9:55 AM
To: ids@iiug.org
Subject: Figuring out how much space a database is using [37580]
IDS 11.50.FC7
Solaris 10
I have 2 database in an instance sharing 2 dbspaces. Is there a good way to
figure out how much space one of the databases is using as well as how much
in each dbspace for that database?
Larry
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
That was a 999.99-dollar answer from Mike for a thousand-dollar question from
Larry. Allow me to add 1cent to this by using the old school style, perhaps:
oncheck -pe <1stdbspacename> | grep -w <1st dbname> then use awk to sum up the3 column (used in page)
oncheck -pe <2nddbspacename> | grep -w <1st dbname> then use awk to sum up the3 column (used in page)
do the above for the 2nd database ...
but then again, Mike's way is still better.
Let's go GreenThis email contains 100% recycled electrons.
From: Mike Walker <mike@advancedatatools.com>
To: ids@iiug.org
Sent: Thursday, August 11, 2016 12:11 PM
Subject: RE: Figuring out how much space a database is .... [37581]
Try this SQL against the sysmaster database:
select
n.dbsname[1,20],
dbinfo("DBSPACE", n.partnum)::char(30) dbspace,
sum(trunc((i.ti_nptotal * i.ti_pagesize)/1024)) size_kb
from systabnames n, systabinfo i
where n.partnum = i.ti_partnum
and n.tabname != "TBLSpace"
group by 1,2
order by 1,2
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of LARRY
SORENSEN
Sent: Thursday, August 11, 2016 9:55 AM
To: ids@iiug.org
Subject: Figuring out how much space a database is using [37580]
IDS 11.50.FC7
Solaris 10
I have 2 database in an instance sharing 2 dbspaces. Is there a good way to
figure out how much space one of the databases is using as well as how much
in each dbspace for that database?
Larry
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Thank you. I will give it a try.
Larry
________________________________
From: ids-bounces@iiug.org <ids-bounces@iiug.org> on behalf of Mike Walker
<mike@advancedatatools.com>
Sent: Thursday, August 11, 2016 10:11 AM
To: ids@iiug.org
Subject: RE: Figuring out how much space a database is .... [37581]
Try this SQL against the sysmaster database:
select
n.dbsname[1,20],
dbinfo("DBSPACE", n.partnum)::char(30) dbspace,
sum(trunc((i.ti_nptotal * i.ti_pagesize)/1024)) size_kb
from systabnames n, systabinfo i
where n.partnum = i.ti_partnum
and n.tabname != "TBLSpace"
group by 1,2
order by 1,2
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of LARRY
SORENSEN
Sent: Thursday, August 11, 2016 9:55 AM
To: ids@iiug.org
Subject: Figuring out how much space a database is using [37580]
IDS 11.50.FC7
Solaris 10
I have 2 database in an instance sharing 2 dbspaces. Is there a good way to
figure out how much space one of the databases is using as well as how much
in each dbspace for that database?
Larry
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.