107 lines
6.8 KiB
HTML
107 lines
6.8 KiB
HTML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="dc.language" scheme="rfc1766" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<meta name="dc.date" scheme="iso8601" content="2005-09-19" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow"/>
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="keywords" content="description, catalog view, catalog, view,
|
||
|
INFORMATION_SCHEMA" />
|
||
|
<title>DB2 UDB for iSeries catalog views</title>
|
||
|
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="ic.css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
|
||
|
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
|
||
|
|
||
|
|
||
|
<a name="catalog"></a>
|
||
|
<h1 id="catalog"><a href="rbafzmst02.htm#ToC_1512">Appendix F. DB2 UDB for iSeries catalog views</a></h1><a id="idx3479" name="idx3479"></a><a id="idx3480" name="idx3480"></a><a id="idx3481" name="idx3481"></a>
|
||
|
<p>The views contained in a DB2 UDB for iSeries catalog are described in this section.
|
||
|
The database manager maintains a set of tables containing information about
|
||
|
the data in each relational database. These tables are collectively known
|
||
|
as the <span class="italic">catalog</span>. The <span class="italic">catalog tables</span> contain information about tables, user-defined functions, distinct types, parameters,
|
||
|
procedures, packages, views, indexes, aliases, sequences, constraints, triggers,
|
||
|
and languages supported by DB2 UDB for iSeries. The catalog also contains information about
|
||
|
all relational databases that are accessible from this system.</p>
|
||
|
<p>There are three classes of catalog views:</p>
|
||
|
<ul>
|
||
|
<li>iSeries™ catalog tables and views
|
||
|
<p>The iSeries catalog tables and views are modeled
|
||
|
after the ANS and ISO catalog views, but are not identical to the ANS and
|
||
|
ISO catalog views. These tables and views are compatible with prior releases
|
||
|
of DB2 UDB for iSeries.</p>
|
||
|
<p>These tables and views exist in schemas QSYS and QSYS2.</p>
|
||
|
<p>The catalog tables and views contain information about all tables, parameters,
|
||
|
procedures, functions, distinct types, packages, views, indexes, aliases, sequences,
|
||
|
triggers, and constraints in the entire relational database. When an SQL schema
|
||
|
is created, an additional set of these views (except SYSPARMS, SYSPROCS, SYSFUNCS,
|
||
|
SYSROUTINES, SYSROUTINEDEP, and SYSTYPES) are created into the schema that
|
||
|
only contain information about tables, packages, views, indexes, and constraints
|
||
|
in that schema.</p></li>
|
||
|
<li>ODBC and JDBC catalog views
|
||
|
<p>The ODBC and JDBC catalog views are designed
|
||
|
to satisfy ODBC and JDBC metadata API requests. For example, SQLCOLUMNS. These
|
||
|
views are compatible with views on DB2 UDB for z/OS and DB2 UDB LUW Version 8. These views
|
||
|
will be modified as ODBC or JDBC enhances or modifies their metadata APIs.</p>
|
||
|
<p>These views exist in schema SYSIBM.</p></li>
|
||
|
<li>ANS and ISO catalog views
|
||
|
<p>The ANS and ISO catalog views are designed
|
||
|
to comply with the ANS and ISO SQL standard (the Information Schema catalog
|
||
|
views). These views will be modified as the ANS and ISO standard is enhanced
|
||
|
or modified.</p>
|
||
|
<p>There are several columns in these views that are reserved
|
||
|
for future standard enhancements.</p>
|
||
|
<p>There are two versions of these views:</p>
|
||
|
<ul><a id="idx3482" name="idx3482"></a>
|
||
|
<li>The first version of these views exist in schema INFORMATION_SCHEMA<sup class="fn"><a id="wq2159" name="wq2159" href="rbafzmstcatalog.htm#wq2160">109</a></sup>. Only rows associated with
|
||
|
objects to which the user has some privilege are included in the views. This
|
||
|
version is compatible with the ANS and ISO SQL standard.
|
||
|
<p>If you use of this
|
||
|
set of catalog views to prevent users from seeing any information about objects
|
||
|
to which they have no privilege, you should revoke privileges to the other
|
||
|
catalog views from users and PUBLIC.</p></li>
|
||
|
<li>The second version of these views exist in schema SYSIBM. All rows are
|
||
|
included in these views whether or not the user has some privilege to the
|
||
|
objects associated with rows in the views. These views are compatible with
|
||
|
views on DB2 UDB LUW Version 8 and will generally perform better than the ANS and
|
||
|
ISO views in QSYS2.</li></ul>
|
||
|
<p>For example, assume that a user has the SELECT privilege to the
|
||
|
QSYS2.TABLES and SYSIBM.TABLES catalog views but does not have any privilege
|
||
|
to a table called WORK.EMPLOYEE. The following SQL statement will not return
|
||
|
a result row: </p>
|
||
|
<pre class="xmp"> <span class="bold">SELECT *</span>
|
||
|
<span class="bold">FROM</span> QSYS2.TABLES
|
||
|
<span class="bold">WHERE</span> TABLE_SCHEMA = 'WORK' <span class="bold">AND</span> TABLE_NAME = 'EMPLOYEE' </pre><p class="indatacontent">However, the following
|
||
|
SQL statement will return a result row: </p>
|
||
|
<pre class="xmp"> <span class="bold">SELECT *</span>
|
||
|
<span class="bold">FROM</span> SYSIBM.TABLES
|
||
|
<span class="bold">WHERE</span> TABLE_SCHEMA = 'WORK' <span class="bold">AND</span> TABLE_NAME = 'EMPLOYEE' </pre></li></ul>
|
||
|
<a name="wq2161"></a>
|
||
|
<div class="notetitle" id="wq2161">Note:</div>
|
||
|
<div class="notebody">Some of these views use special catalog functions as part
|
||
|
of the view definition. These functions exist in SYSIBM, but should not be
|
||
|
used directly in applications. The functions are created for specific independent
|
||
|
auxiliary storage pools (IASP) and will likely change in future releases.</div>
|
||
|
<hr /><div class="fnnum"><a id="wq2160" name="wq2160" href="rbafzmstcatalog.htm#wq2159">109</a>.</div>
|
||
|
<div class="fntext">INFORMATION_SCHEMA is the ANS and ISO SQL standard schema name that contains
|
||
|
catalog views. It is a synonym for QSYS2.</div>
|
||
|
<br />
|
||
|
<hr /><br />
|
||
|
[ <a href="#Top_Of_Page">Top of Page</a> | <a href="rbafzmstsidvals.htm">Previous Page</a> | <a href="rbafzmstcatalognotes.htm">Next Page</a> | <a href="rbafzmst02.htm#wq1">Contents</a> |
|
||
|
<a href="rbafzmstindex.htm#index">Index</a> ]
|
||
|
|
||
|
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
|
||
|
</body>
|
||
|
</html>
|