473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

querying from sysibm or syscat tables

Can I get the equivalent information for the following commands
using SYSCAT or SYSIBM tables.

db2 list tablespace containers for 14 show detail

db2 list history backup since 20061018 for dbname

I would like to use perl DBI to get the relevant information.

Oct 24 '06 #1
8 14572
dc********@aim.com wrote:
Can I get the equivalent information for the following commands
using SYSCAT or SYSIBM tables.

db2 list tablespace containers for 14 show detail

db2 list history backup since 20061018 for dbname

I would like to use perl DBI to get the relevant information.
There are administrative functions and views to get the information.
E.g.:
http://publib.boulder.ibm.com/infoce...c/r0022351.htm
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Oct 24 '06 #2

Serge Rielau wrote:
dc********@aim.com wrote:
Can I get the equivalent information for the following commands
using SYSCAT or SYSIBM tables.

db2 list tablespace containers for 14 show detail

db2 list history backup since 20061018 for dbname

I would like to use perl DBI to get the relevant information.
There are administrative functions and views to get the information.
E.g.:
http://publib.boulder.ibm.com/infoce...c/r0022351.htm
this is for ver 9.

we are using 8.2.3

I found out the sql to get tablespace containers information

select * from
table(sysproc.snapshot_container('dbname',dbpartit ionnum))

Looks like there is no query to get db2 list history backup since
20061018 for dbname

also what is sql query to get information of

db2 list db directory

I want to avoid use "db2 " commands inside. Would prefer direct perl
DBI calls.

Oct 24 '06 #3
dc********@aim.com wrote:
db2 list db directory
I think you'll need to write a C UDF for that:
http://publib.boulder.ibm.com/infoce...c/r0001492.htm

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Oct 24 '06 #4

dc********@aim.com wrote:
db2 list history backup since 20061018 for dbname
found one for this.

select * from table(admin_list_hist()) where operation = 'B';

will give the same information as list history backup

Oct 24 '06 #5
dc********@aim.com wrote:
Can I get the equivalent information for the following commands
using SYSCAT or SYSIBM tables.
The question doesn't even arise. Since the SYSCAT views are documented and
the SYSIBM tables are not (with the exception of SYSIBM.SYSDUMMY1), you
should never rely on the SYSIBM tables. Those may change at any time (and
they do change once in a while). If you rely on them and your application
breaks, its your problem.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Oct 25 '06 #6
Looks like ADMIN_LIST_HIST table function requires something to be
installed.
On some of the servers when I run the query against that table table
function
I get the following error:-

SQL0440N No authorized routine named "ADMIN_LIST_HIST" of type
"FUNCTION"
having compatible arguments was found. SQLSTATE=42884

The same query works fine on other servers. The version of Db2 is same.
8.2.3
However all failed boxes were 64bit Db2.

What needs to be done?

Oct 25 '06 #7
Ian
dc********@aim.com wrote:
Looks like ADMIN_LIST_HIST table function requires something to be
installed.
On some of the servers when I run the query against that table table
function
I get the following error:-

SQL0440N No authorized routine named "ADMIN_LIST_HIST" of type
"FUNCTION"
having compatible arguments was found. SQLSTATE=42884

The same query works fine on other servers. The version of Db2 is same.
8.2.3
However all failed boxes were 64bit Db2.

What needs to be done?
You probably didn't execute the 'db2updv8' command after applying a
fixpack.

db2updv8 -d SAMPLE (or whatever the name of your database is).

Oct 25 '06 #8
Ian wrote:
You probably didn't execute the 'db2updv8' command after applying a
fixpack.

db2updv8 -d SAMPLE (or whatever the name of your database is).
yes that was the reason.

thanks.

Oct 25 '06 #9

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

Similar topics

2
by: Patrick Finnegan | last post by:
DB2DART detects problems with SYSIBM.SYSSECTION and SYSIBM.SYSSTMT .. I cannot connect to or drop these tables(system objects). What are my options besides a db restore? Thanks in advance. ...
5
by: Andrew Werden | last post by:
I've inherited some code that calls SYSIBM.SQLPROCEDURES to validate user provided parameters and text prior to executing a stored procedure. This code was written on an early UDB release (V6?)...
7
by: Robert Stearns | last post by:
I ran the following bit of SQL and my PRIMARY KEY wound up in schema SYSIBM called SQL.... not schema is3 called primary. The index registation did wind up there. Obviously there's something I...
9
by: Raquel | last post by:
When I create a package (by db2sqljcustomize command), the new package does not immediately appear in SYSIBM.SYSPLAN for that database. It appears after some time. Does anyone know when...
3
by: Michael Rudolph | last post by:
Hi, at the moment i try to use the federated database feature (DB2/NT 8.2.3) to use a remote host db2 (DB2 OS/390 7.1.2). I am unsure what privileges are needed for the host db2 user. A...
10
by: Lennart | last post by:
I see a bunch of packages where valid <'Y'. What I cant figure out is how to relate the package to a procedure, function or whatever. Does anyone have a reference to share on the relationship...
4
by: d0m_at0m | last post by:
hello, how to select a table that has a highest amount of columns (compared to other tables) using syscat? thanks in advance
0
by: deangc | last post by:
We have a number of client installations where dynamic sql snapshots show that: CALL SYSIBM.SQLSTATISTICS(?,?,?,?,?,?) is the top consumer of CPU, usually by a wide margin. We regularly do...
1
by: SilRay | last post by:
I will admit up front that this is to help with an assignment for a class, however, I'm looking for information outside the scope of the assignment because I want to do something cooler. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...

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.