1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<refentry id="function.db2-server-info">
<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>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>
</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>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>
</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:"../../../../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
-->
|