The value indicates the list of schemas to be included when GetSchema is called without a schema restriction value.
[Visual Basic]
Public Property SchemaList As String
[C#]
public string SchemaList {get; set;}
[C++]
public: __property String* get_SchemaList();
public: __property void set_SchemaList(String*);
[JScript]
public function get SchemaList() : String;
public function set SchemaList(String);
A string that represents the list of schemas to use. Each schema name is case-sensitive, must be delimited with single quotation marks, and separated by commas.
SchemaList is used to provide a more restrictive default, and therefore improve performance, for those applications that list every table in the DBMS.
SchemaList="'USER1','USER2','USER3'"
SchemaList="'USER1',CURRENT SQLID,'USER3'"
The maximum length of the string is 256 characters.
This option can be used with DBName and TableType to further limit the number of tables for which information is returned.
You can specify *USRLIBL or *ALL along with the existing list of schema names to resolve unqualified stored procedure calls or to find database objects in GetSchema() calls.
SCHEMALIST=”*USRLIBL”
In DB2 Version 9.7 Fix Pack 5, if SchemaList contains *USRLIBL along with other schema names and SchemaFilter contains *USRLIBL, the GetSchema() call to DB2 for i returns result set that contains only database objects with schema that belongs to *USRLIBL.
To reduce a performance cost associated with retrieval of the *USRLIBL value, *USRLIBL value is cached by default. Caching behavior of *USRLIBL is controlled by DB2Connection.CacheUSRLIBLValue property and *USRLIBL cache can be cleared by using the DB2Connection.ClearUSRLIBLCache() method.
Using .NET SchemaList connection string keyword:
DB2Connection conn = new DB2Connection
(“database=mydb;uid=user;pwd=password;SchemaList = SCHEMA1, *USRLIBL, schema3;“);
Conn.Open();
DataTable tables = conn.GetSchema(DB2MetaDataCollectionNames.Tables);
Using SchemaFilter db2dsdriver.cfg keyword
<cnfiguration>
<dncollection>
<dn alias="alias1" name="db1" host="host1" port="50000">
<prameter name = ”SchemaFilter” value = "'SCHEMA1', *USRLIBL, 'schema3'”/>
</dsn>
</dsncollection>
</configuration>
DB2Connection conn = new DB2Connection(“database=alias1;uid=user;pwd=password;“);
Conn.Open();
DataTable tables = conn.GetSchema(DB2MetaDataCollectionNames.Tables);