473,882 Members | 1,591 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Schema size(Size of all the tables in a schema)

Hi ,

I was trying to find the size of a schema (Size of all the tables in a
schema). Can some one tell me an easy way to do this. There are more
than 200 tables in my schema and it is very tedious job for me to
calculate each table size manually.

Thanks in advance,
Kamalnath.V
Jul 7 '08 #1
7 12460
On Jul 7, 10:08 am, Gladiator <vkamalnath1... @gmail.comwrote :
Hi ,

I was trying to find the size of a schema (Size of all the tables in a
schema). Can some one tell me an easy way to do this. There are more
than 200 tables in my schema and it is very tedious job for me to
calculate each table size manually.
If you know how to calculate the size of one table, you can apply that
to all tables in a schema:

db2 "select tabschema, tabname, size_of_table(t abschema, tabname) from
syscat.tables where tabschema = ? and type = T"

For a grand totall as well, something like:

db2 "select tabschema, tabname, sum(size_of_tab le(tabschema, tabname))
from syscat.tables where tabschema = ? and type = T group by grouping
sets ((tabschema, tabname),())"

should do.
/Lennart


Thanks in advance,
Kamalnath.V
Jul 7 '08 #2
On Jul 7, 2:26 pm, Lennart <Erik.Lennart.J ons...@gmail.co mwrote:
On Jul 7, 10:08 am, Gladiator <vkamalnath1... @gmail.comwrote :
Hi ,
I was trying to find the size of a schema (Size of all the tables in a
schema). Can some one tell me an easy way to do this. There are more
than 200 tables in my schema and it is very tedious job for me to
calculate each table size manually.

If you know how to calculate the size of one table, you can apply that
to all tables in a schema:

db2 "select tabschema, tabname, size_of_table(t abschema, tabname) from
syscat.tables where tabschema = ? and type = T"

For a grand totall as well, something like:

db2 "select tabschema, tabname, sum(size_of_tab le(tabschema, tabname))
from syscat.tables where tabschema = ? and type = T group by grouping
sets ((tabschema, tabname),())"

should do.

/Lennart
Thanks in advance,
Kamalnath.V
Hi Lennart ,

Thanks for the reply ,

But i dont there is a function/routine called size_of_table in DB2 UDB
for LUW . Instead i guess it is available in Db2 for mainframes. I
need some thing in LUW.

Thanks & Regards,
Kamalnath.V
Jul 7 '08 #3
Gladiator wrote:
On Jul 7, 2:26 pm, Lennart <Erik.Lennart.J ons...@gmail.co mwrote:
>On Jul 7, 10:08 am, Gladiator <vkamalnath1... @gmail.comwrote :
>>Hi ,
I was trying to find the size of a schema (Size of all the tables in a
schema). Can some one tell me an easy way to do this. There are more
than 200 tables in my schema and it is very tedious job for me to
calculate each table size manually.
If you know how to calculate the size of one table, you can apply that
to all tables in a schema:

db2 "select tabschema, tabname, size_of_table(t abschema, tabname) from
syscat.table s where tabschema = ? and type = T"

For a grand totall as well, something like:

db2 "select tabschema, tabname, sum(size_of_tab le(tabschema, tabname))
from syscat.tables where tabschema = ? and type = T group by grouping
sets ((tabschema, tabname),())"

should do.

/Lennart
>>Thanks in advance,
Kamalnath.V

Hi Lennart ,

Thanks for the reply ,

But i dont there is a function/routine called size_of_table in DB2 UDB
for LUW . Instead i guess it is available in Db2 for mainframes. I
need some thing in LUW.
Which version of DB2 for LUW?
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 7 '08 #4
On Jul 7, 3:23 pm, Serge Rielau <srie...@ca.ibm .comwrote:
Gladiator wrote:
On Jul 7, 2:26 pm, Lennart <Erik.Lennart.J ons...@gmail.co mwrote:
On Jul 7, 10:08 am, Gladiator <vkamalnath1... @gmail.comwrote :
>Hi ,
I was trying to find the size of a schema (Size of all the tables in a
schema). Can some one tell me an easy way to do this. There are more
than 200 tables in my schema and it is very tedious job for me to
calculate each table size manually.
If you know how to calculate the size of one table, you can apply that
to all tables in a schema:
>db2"select tabschema, tabname,size_of _table(tabschem a, tabname) from
syscat.tables where tabschema = ? and type = T"
For a grand totall as well, something like:
>db2"select tabschema, tabname, sum(size_of_tab le(tabschema, tabname))
from syscat.tables where tabschema = ? and type = T group by grouping
sets ((tabschema, tabname),())"
should do.
/Lennart
>Thanks in advance,
Kamalnath.V
Hi Lennart ,
Thanks for the reply ,
But i dont there is a function/routine calledsize_of_t ableinDB2UDB
for LUW . Instead i guess it is available inDb2for mainframes. I
need some thing in LUW.

Which version ofDB2for LUW?
--
Serge RielauDB2Soluti ons Development
IBM Toronto Lab
Hi Serge ,
---Version 9.5

Thanks,
Kamalnath.V
Jul 7 '08 #5
http://publib.boulder.ibm.com/infoce.../r0052897.html

Since it's an SQL API you can easily roll it up to schema level as
indicated by previous posters.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 7 '08 #6
On Jul 7, 5:32 pm, Serge Rielau <srie...@ca.ibm .comwrote:
http://publib.boulder.ibm.com/infoce...pic/com.ibm.db...

Since it's an SQL API you can easily roll it up to schema level as
indicated by previous posters.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Hi Serge ,

Thanks a lot for the information.

Is this applicable only for V9.5 ? What about the older versions ? If
i have the same requirement for the databases on V8+. How do i do
this.

One more thing when i used the query given by Lennart , it gave me
the below error
db2 "select tabschema, tabname, size_of_table(t abschema, tabname) from
syscat.tables where tabschema ='PANELSTAGE' and type ='T'"
SQL0440N No authorized routine named "SIZE_OF_TA BLE" of type
"FUNCTION"
having compatible arguments was found. SQLSTATE=42884
Thanks in advance ,

Kamalnath.V
Jul 7 '08 #7
Gladiator wrote:
On Jul 7, 5:32 pm, Serge Rielau <srie...@ca.ibm .comwrote:
>http://publib.boulder.ibm.com/infoce...pic/com.ibm.db...

Since it's an SQL API you can easily roll it up to schema level as
indicated by previous posters.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Hi Serge ,

Thanks a lot for the information.

Is this applicable only for V9.5 ? What about the older versions ? If
i have the same requirement for the databases on V8+. How do i do
this.

One more thing when i used the query given by Lennart , it gave me
the below error
db2 "select tabschema, tabname, size_of_table(t abschema, tabname) from
>syscat.table s where tabschema ='PANELSTAGE' and type ='T'"
SQL0440N No authorized routine named "SIZE_OF_TA BLE" of type
"FUNCTION"
having compatible arguments was found. SQLSTATE=42884
size_of_table() does not exist. He just explained how to "roll up" to a
schema assuming you have teh information for a specific table.
So I just gave you that piece. At that point it's time to earn your
living :-)

If you snoop around in the 9.5 information center around the function I
posted you will find "deprecated functions" which have different names.
They obviously were introduced in earlier versions.
I don't know if they were there in DB2 V8.2 or only in DB2 9.1

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 7 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2754
by: Bart Torbert | last post by:
Hello, I have created some XML schemas for my company's data. I now need to convert these to relational databasse schemas. Does anyone know of tools that will do this? I have been working with XMLSpy and tried their conversion routine. It does work, but it assumes a high degree of normalization is desired. It does the conversion its way, and there is no abillity to intervene in the process.
0
1451
by: Philippe Poulard | last post by:
People familiar with DTD, Relax NG, W3C XML Schema, Schematron, and that are aware of more recent works such as DSDL should recognize all of them in the Active Schema Language. Anyway, ASL differs slightly because it allows to switch from a content model to another with any arbitrary complex condition that can't be expressed usually in grammar based model for example ; another difference is that ASL allows to compute content model...
0
1502
by: Eric van Wijk | last post by:
Hi, When I try to assign a schema to a dataset using the ReadXmlSchema method, that schema does not import any schemas included with xs:import. Both schema's are stored in the assembly as embedded resources (in the same namespace).: The Code: templateDocument = new XmlDataDocument();
1
2322
by: Wallace | last post by:
Hi all, I have a problem on validating a xml fragment using a single namespace schema which spread across multiple schema files using include in the master schema file. No matter how I change the xml fragment (to include default namespace xmlns='urn:xxx:yy' and any other namespace it may have), I still get the same error. 'urn:xxx:yy:Header' element is not declared. An error occurred at , (1, 2).
1
1584
by: mflll | last post by:
How does one say in one schema that one wants an element defined in another schema. For example, I want to include in the Employee definition, an Address element defined in the schema http://test.org.Address Here is the schema defining the Employee: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://test.org/emp" xmlns="http://test.org/emp"
1
1690
by: cidney001 | last post by:
Hi, I am trying to create a schema with an inline schema in it. I have looked for a simple example of how to do this but i can't find one. I have included 2 simple schemas. How would i make the DataTypes.xsd as an inline schema within the Vendor.xsd --- DataTypes.xsd --- <?xml version="1.0"?> <xsd:schema xmlns:ardt="urn:AR:DataTypes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:AR:DataTypes" version="1.1">...
2
2439
by: Robin9876 | last post by:
How can you find out the size of tables in a database without having to export each of the tables?
1
2433
by: nileshp | last post by:
How to convert XSD schema form to XDR schema form?
2
3754
by: harrysdu | last post by:
May be someone has asked similar question here. If so, please point me to the link. one of our Access application has many linked tables. For testing purpose, I would like get it connected to the test database. I found what the application really needs is the data source name, as long as you created the data source entry whose name matches that in the linked table, it doesn't matter what you entered for the TNS service name or user ID in...
0
9777
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11108
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10725
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7956
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7113
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5781
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5978
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.