You can use the
SchemaFilter keyword to
specify a schema list to reduce the time that it takes for an application
to query database object information and reduce the number of database
objects that are listed by the application. If there are many tables
in the database, you can specify a schema list to reduce the time
that it takes for an application to query table information and reduce
the number of tables that are listed by the application. Each schema
name is case sensitive. You must delimit a schema name with single
quotation marks and separate schema names by commas, as shown in the
following example:
SchemaFilter='USER1','USER2','USER3'
For
DB2® for z/OS® server,
you can include the
CURRENT SQLID option in the list,
but without the single quotation marks, as shown in the following
example:
SchemaFilter='USER1',CURRENT SQLID,'USER3'
The
maximum length of the string is 2047 characters.
You
can use this keyword with the ZOSDBNameFilter keyword
and TableTypeFilter keyword to further limit
the number of database objects for which information is returned.
For DB2 for i server,
DBQ or DefaultLibraries specifies the IBM i
libraries to add to the server job's library list. The libraries are
delimited by commas or spaces, and the user library
list (*USRLIBL) can be used as a place holder for the server
job's current library list. The library list is used for resolving
unqualified stored procedure calls and finding libraries in catalog
API calls. If *USRLIBL is not specified, the specified
libraries replace the server job's current library list.
You
can specify the
*USRLIBL or
*ALL option
in the list of schema names
to
find libraries in a catalog API call. Specify the
*USRLIBL option
to search the current libraries of the server job. Specify the
*ALL option
to search all schemas in the connected database. If you are migrating
from the IBM i Access ODBC driver
and you specified the
*USRLIBL option for the DBQ
or DefaultLibraries connection string keyword, add the
*USRLIBL option
to the list of schema names for the
SchemaFilter keyword,
as shown in the following example:
<parameter name="SchemaFilter" value="*USRLIBL"/>
If
you are migrating from the IBM i
Access for Windows .NET provider
and you specified the
*ALL option for the
searchSchemaFilter property,
specify the
*ALL option for the
SchemaFilter keyword,
as shown in the following example:
<parameter name="SchemaFilter" value="*ALL"/>
Following catalog functions are affected by the
*USRLIBL option
for the
SchemaFilter keyword when connecting
to the
DB2 for i
server:
- SQLTables
- SQLTablePrivileges
- SQLColumns
- SQLColumnPrivileges
Before Version 10.1 Fix Pack 1, if you specify the *USRLIBL with
one or more schema names for the SchemaFilter keyword
option, a call to a catalog function (for CLI)
or a GetSchema() function (for .NET data provider) call in DB2 for i
server returns a result set that contains only the database objects
with schema associated with the user library list (*USRLIBL)
and not the schema names.
In Version 10.1 Fix Pack 1 and later fix packs, a catalog
function (for
CLI)
or a GetSchema() function (for .NET data provider) call to
DB2 for i server
returns a result set that contains database objects with schema that
belong to user library list (
*USRLIBL) and schema
names that are listed in the
SchemaFilter keyword.
For example, following
SchemaFilter keyword example
returns a result set that contains database objects with schemas associated
with the user library list , “schema1” name and “schema2” name:
<parameter name="SchemaFilter" value="*ALL", ‘schema1’, ‘schema2’/>
To
obtained database objects with combined user library list (
*USRLIBL)
and schema names that you specified for the
SchemaFilter keyword,
the
DB2 for i server
must meet the following requirements:
- You must apply PTF Group SF99601 Version 21 or later on DB2 for i V6R1.
- You must apply PTF Group SF99701 Version 11 or later on DB2 for i V7R1.