php-doc-en/reference/ibm_db2/functions/db2-server-info.xml
Daniel Egeberg 96c9d88bad Converted to utf-8
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297028 c90b9560-bf6c-de11-be94-00142212c4b1
2010-03-28 22:10:10 +00:00

428 lines
13 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<refentry xml:id="function.db2-server-info" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>db2_server_info</refname>
<refpurpose>Returns an object with properties that describe the DB2 database server</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>object</type><methodname>db2_server_info</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
This function returns an object with read-only properties that return
information about the IBM DB2, Cloudscape, or Apache Derby database server.
The following table lists the database server properties:
<table>
<title>Database server properties</title>
<tgroup cols="3">
<thead>
<row>
<entry>Property name</entry>
<entry>Return type</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>DBMS_NAME</entry>
<entry>string</entry>
<entry>The name of the database server to which you are
connected. For DB2 servers this is a combination of
<literal>DB2</literal> followed by the operating system on which
the database server is running.</entry>
</row>
<row>
<entry>DBMS_VER</entry>
<entry>string</entry>
<entry>The version of the database server, in the form of a string
"MM.mm.uuuu" where <varname>MM</varname> is the major version,
<varname>mm</varname> is the minor version,
and <varname>uuuu</varname> is the update. For example, "08.02.0001"
represents major version 8, minor version 2, update 1.
</entry>
</row>
<row>
<entry>DB_CODEPAGE</entry>
<entry>int</entry>
<entry>The code page of the database to which you are connected.</entry>
</row>
<row>
<entry>DB_NAME</entry>
<entry>string</entry>
<entry>The name of the database to which you are connected.</entry>
</row>
<row>
<entry>DFT_ISOLATION</entry>
<entry>string</entry>
<entry>
<para>The default transaction isolation level supported by the
server:
<variablelist>
<varlistentry>
<term>UR</term>
<listitem>
<para>
Uncommitted read: changes are immediately visible by all
concurrent transactions.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CS</term>
<listitem>
<para>
Cursor stability: a row read by one transaction can be altered and
committed by a second concurrent transaction.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RS</term>
<listitem>
<para>
Read stability: a transaction can add or remove rows matching a
search condition or a pending transaction.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RR</term>
<listitem>
<para>
Repeatable read: data affected by pending transaction is not
available to other transactions.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>NC</term>
<listitem>
<para>
No commit: any changes are visible at the end of a successful
operation. Explicit commits and rollbacks are not allowed.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</entry>
</row>
<row>
<entry>IDENTIFIER_QUOTE_CHAR</entry>
<entry>string</entry>
<entry>The character used to delimit an identifier.</entry>
</row>
<row>
<entry>INST_NAME</entry>
<entry>string</entry>
<entry>The instance on the database server that contains the
database.</entry>
</row>
<row>
<entry>ISOLATION_OPTION</entry>
<entry>array</entry>
<entry>An array of the isolation options supported by the
database server. The isolation options are described in
the DFT_ISOLATION property.</entry>
</row>
<row>
<entry>KEYWORDS</entry>
<entry>array</entry>
<entry>An array of the keywords reserved by the database
server.</entry>
</row>
<row>
<entry>LIKE_ESCAPE_CLAUSE</entry>
<entry>bool</entry>
<entry>&true; if the database server supports the
use of <literal>%</literal> and <literal>_</literal> wildcard
characters. &false; if the database server does not
support these wildcard characters.</entry>
</row>
<row>
<entry>MAX_COL_NAME_LEN</entry>
<entry>int</entry>
<entry>Maximum length of a column name supported by the database
server, expressed in bytes.</entry>
</row>
<row>
<entry>MAX_IDENTIFIER_LEN</entry>
<entry>int</entry>
<entry>Maximum length of an SQL identifier supported by the database
server, expressed in characters.</entry>
</row>
<row>
<entry>MAX_INDEX_SIZE</entry>
<entry>int</entry>
<entry>Maximum size of columns combined in an index supported by the
database server, expressed in bytes.</entry>
</row>
<row>
<entry>MAX_PROC_NAME_LEN</entry>
<entry>int</entry>
<entry>Maximum length of a procedure name supported by the database
server, expressed in bytes.</entry>
</row>
<row>
<entry>MAX_ROW_SIZE</entry>
<entry>int</entry>
<entry>Maximum length of a row in a base table supported by the
database server, expressed in bytes.</entry>
</row>
<row>
<entry>MAX_SCHEMA_NAME_LEN</entry>
<entry>int</entry>
<entry>Maximum length of a schema name supported by the database
server, expressed in bytes.</entry>
</row>
<row>
<entry>MAX_STATEMENT_LEN</entry>
<entry>int</entry>
<entry>Maximum length of an SQL statement supported by the database
server, expressed in bytes.</entry>
</row>
<row>
<entry>MAX_TABLE_NAME_LEN</entry>
<entry>int</entry>
<entry>Maximum length of a table name supported by the database
server, expressed in bytes.</entry>
</row>
<row>
<entry>NON_NULLABLE_COLUMNS</entry>
<entry>bool</entry>
<entry>&true; if the database server supports columns that can be
defined as NOT NULL, &false; if the database server does not support
columns defined as NOT NULL.</entry>
</row>
<row>
<entry>PROCEDURES</entry>
<entry>bool</entry>
<entry>&true; if the database server supports the use of the CALL
statement to call stored procedures, &false; if the database
server does not support the CALL statement.</entry>
</row>
<row>
<entry>SPECIAL_CHARS</entry>
<entry>string</entry>
<entry>A string containing all of the characters other than
a-Z, 0-9, and underscore that can be used in an identifier name.</entry>
</row>
<row>
<entry>SQL_CONFORMANCE</entry>
<entry>string</entry>
<entry>
<para>The level of conformance to the ANSI/ISO SQL-92 specification
offered by the database server:
<variablelist>
<varlistentry>
<term>ENTRY</term>
<listitem>
<para>
Entry-level SQL-92 compliance.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>FIPS127</term>
<listitem>
<para>
FIPS-127-2 transitional compliance.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>FULL</term>
<listitem>
<para>
Full level SQL-92 compliance.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>INTERMEDIATE</term>
<listitem>
<para>
Intermediate level SQL-92 compliance.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
<para>
Specifies an active DB2 client connection.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an object on a successful call. Returns &false; on failure.
</para>
</refsect1>
<!-- Use when ERRORS exist
<refsect1 role="errors">
&reftitle.errors;
<para>
When does this function throw E_* level errors, or exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>db2_server_info</function> example</title>
<para>
To retrieve information about the server, you must pass a valid
database connection resource to <function>db2_server_info</function>.
</para>
<programlisting role="php"><![CDATA[<?php
$conn = db2_connect('sample', 'db2inst1', 'ibmdb2');
$server = db2_server_info( $conn );
if ($server) {
echo "DBMS_NAME: "; var_dump( $server->DBMS_NAME );
echo "DBMS_VER: "; var_dump( $server->DBMS_VER );
echo "DB_CODEPAGE: "; var_dump( $server->DB_CODEPAGE );
echo "DB_NAME: "; var_dump( $server->DB_NAME );
echo "INST_NAME: "; var_dump( $server->INST_NAME );
echo "SPECIAL_CHARS: "; var_dump( $server->SPECIAL_CHARS );
echo "KEYWORDS: "; var_dump( sizeof($server->KEYWORDS) );
echo "DFT_ISOLATION: "; var_dump( $server->DFT_ISOLATION );
echo "ISOLATION_OPTION: ";
$il = '';
foreach( $server->ISOLATION_OPTION as $opt )
{
$il .= $opt." ";
}
var_dump( $il );
echo "SQL_CONFORMANCE: "; var_dump( $server->SQL_CONFORMANCE );
echo "PROCEDURES: "; var_dump( $server->PROCEDURES );
echo "IDENTIFIER_QUOTE_CHAR: "; var_dump( $server->IDENTIFIER_QUOTE_CHAR );
echo "LIKE_ESCAPE_CLAUSE: "; var_dump( $server->LIKE_ESCAPE_CLAUSE );
echo "MAX_COL_NAME_LEN: "; var_dump( $server->MAX_COL_NAME_LEN );
echo "MAX_ROW_SIZE: "; var_dump( $server->MAX_ROW_SIZE );
echo "MAX_IDENTIFIER_LEN: "; var_dump( $server->MAX_IDENTIFIER_LEN );
echo "MAX_INDEX_SIZE: "; var_dump( $server->MAX_INDEX_SIZE );
echo "MAX_PROC_NAME_LEN: "; var_dump( $server->MAX_PROC_NAME_LEN );
echo "MAX_SCHEMA_NAME_LEN: "; var_dump( $server->MAX_SCHEMA_NAME_LEN );
echo "MAX_STATEMENT_LEN: "; var_dump( $server->MAX_STATEMENT_LEN );
echo "MAX_TABLE_NAME_LEN: "; var_dump( $server->MAX_TABLE_NAME_LEN );
echo "NON_NULLABLE_COLUMNS: "; var_dump( $server->NON_NULLABLE_COLUMNS );
db2_close($conn);
}
?>]]></programlisting>
&example.outputs;
<screen><![CDATA[DBMS_NAME: string(9) "DB2/LINUX"
DBMS_VER: string(10) "08.02.0000"
DB_CODEPAGE: int(1208)
DB_NAME: string(6) "SAMPLE"
INST_NAME: string(8) "db2inst1"
SPECIAL_CHARS: string(2) "@#"
KEYWORDS: int(179)
DFT_ISOLATION: string(2) "CS"
ISOLATION_OPTION: string(12) "UR CS RS RR "
SQL_CONFORMANCE: string(7) "FIPS127"
PROCEDURES: bool(true)
IDENTIFIER_QUOTE_CHAR: string(1) """
LIKE_ESCAPE_CLAUSE: bool(true)
MAX_COL_NAME_LEN: int(30)
MAX_ROW_SIZE: int(32677)
MAX_IDENTIFIER_LEN: int(18)
MAX_INDEX_SIZE: int(1024)
MAX_PROC_NAME_LEN: int(128)
MAX_SCHEMA_NAME_LEN: int(30)
MAX_STATEMENT_LEN: int(2097152)
MAX_TABLE_NAME_LEN: int(128)
NON_NULLABLE_COLUMNS: bool(true)]]></screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>db2_client_info</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->