<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ibm-db2.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.db2-server-info.php',
    1 => 'db2_server_info',
    2 => 'Returns an object with properties that describe the DB2 database server',
  ),
  'up' => 
  array (
    0 => 'ref.ibm-db2.php',
    1 => 'IBM DB2 Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.db2-rollback.php',
    1 => 'db2_rollback',
  ),
  'next' => 
  array (
    0 => 'function.db2-set-option.php',
    1 => 'db2_set_option',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ibm_db2/functions/db2-server-info.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.db2-server-info" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">db2_server_info</h1>
  <p class="verinfo">(PECL ibm_db2 &gt;= 1.1.1)</p><p class="refpurpose"><span class="refname">db2_server_info</span> &mdash; <span class="dc-title">Returns an object with properties that describe the DB2 database server</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.db2-server-info-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>db2_server_info</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$connection</code></span>): <span class="type"><span class="type"><a href="class.stdclass.php" class="type stdClass">stdClass</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>


  <p class="para rdfs-comment">
   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 class="doctable table">
    <caption><strong>Database server properties</strong></caption>
    
     <thead>
      <tr>
       <th>Property name</th>
       <th>Return type</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>DBMS_NAME</td>
       <td>string</td>
       <td>The name of the database server to which you are
        connected. For DB2 servers this is a combination of
        <code class="literal">DB2</code> followed by the operating system on which
        the database server is running.</td>
      </tr>

      <tr>
       <td>DBMS_VER</td>
       <td>string</td>
       <td>The version of the database server, in the form of a string
       &quot;MM.mm.uuuu&quot; where <var class="varname">MM</var> is the major version,
        <var class="varname">mm</var> is the minor version,
        and <var class="varname">uuuu</var> is the update. For example, &quot;08.02.0001&quot;
        represents major version 8, minor version 2, update 1.
       </td>
      </tr>

      <tr>
       <td>DB_CODEPAGE</td>
       <td>int</td>
       <td>The code page of the database to which you are connected.</td>
      </tr>

      <tr>
       <td>DB_NAME</td>
       <td>string</td>
       <td>The name of the database to which you are connected.</td>
      </tr>

      <tr>
       <td>DFT_ISOLATION</td>
       <td>string</td>
       <td>
        <p class="para">The default transaction isolation level supported by the
        server:
        <dl>
         
          <dt>UR</dt>
          <dd>
           <span class="simpara">
            Uncommitted read: changes are immediately visible by all
            concurrent transactions.
           </span>
          </dd>
         
         
          <dt>CS</dt>
          <dd>
           <span class="simpara">
            Cursor stability: a row read by one transaction can be altered and
            committed by a second concurrent transaction.
           </span>
          </dd>
         
         
          <dt>RS</dt>
          <dd>
           <span class="simpara">
            Read stability: a transaction can add or remove rows matching a
            search condition or a pending transaction.
           </span>
          </dd>
         
         
          <dt>RR</dt>
          <dd>
           <span class="simpara">
            Repeatable read: data affected by pending transaction is not
            available to other transactions.
           </span>
          </dd>
         
         
          <dt>NC</dt>
          <dd>
           <span class="simpara">
            No commit: any changes are visible at the end of a successful
            operation. Explicit commits and rollbacks are not allowed.
           </span>
          </dd>
         
        </dl>
        </p>
       </td>
      </tr>

      <tr>
       <td>IDENTIFIER_QUOTE_CHAR</td>
       <td>string</td>
       <td>The character used to delimit an identifier.</td>
      </tr>

      <tr>
       <td>INST_NAME</td>
       <td>string</td>
       <td>The instance on the database server that contains the
        database.</td>
      </tr>

      <tr>
       <td>ISOLATION_OPTION</td>
       <td>array</td>
       <td>An array of the isolation options supported by the
        database server. The isolation options are described in
        the DFT_ISOLATION property.</td>
      </tr>

      <tr>
       <td>KEYWORDS</td>
       <td>array</td>
       <td>An array of the keywords reserved by the database
        server.</td>
      </tr>

      <tr>
       <td>LIKE_ESCAPE_CLAUSE</td>
       <td>bool</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the database server supports the
       use of <code class="literal">%</code> and <code class="literal">_</code> wildcard
       characters. <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if the database server does not
       support these wildcard characters.</td>
      </tr>

      <tr>
       <td>MAX_COL_NAME_LEN</td>
       <td>int</td>
       <td>Maximum length of a column name supported by the database
       server, expressed in bytes.</td>
      </tr>

      <tr>
       <td>MAX_IDENTIFIER_LEN</td>
       <td>int</td>
       <td>Maximum length of an SQL identifier supported by the database
       server, expressed in characters.</td>
      </tr>

      <tr>
       <td>MAX_INDEX_SIZE</td>
       <td>int</td>
       <td>Maximum size of columns combined in an index supported by the
        database server, expressed in bytes.</td>
      </tr>

      <tr>
       <td>MAX_PROC_NAME_LEN</td>
       <td>int</td>
       <td>Maximum length of a procedure name supported by the database
       server, expressed in bytes.</td>
      </tr>

      <tr>
       <td>MAX_ROW_SIZE</td>
       <td>int</td>
       <td>Maximum length of a row in a base table supported by the
       database server, expressed in bytes.</td>
      </tr>

      <tr>
       <td>MAX_SCHEMA_NAME_LEN</td>
       <td>int</td>
       <td>Maximum length of a schema name supported by the database
       server, expressed in bytes.</td>
      </tr>

      <tr>
       <td>MAX_STATEMENT_LEN</td>
       <td>int</td>
       <td>Maximum length of an SQL statement supported by the database
       server, expressed in bytes.</td>
      </tr>

      <tr>
       <td>MAX_TABLE_NAME_LEN</td>
       <td>int</td>
       <td>Maximum length of a table name supported by the database
       server, expressed in bytes.</td>
      </tr>

      <tr>
       <td>NON_NULLABLE_COLUMNS</td>
       <td>bool</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the database server supports columns that can be
        defined as NOT NULL, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if the database server does not support
        columns defined as NOT NULL.</td>
      </tr>

      <tr>
       <td>PROCEDURES</td>
       <td>bool</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the database server supports the use of the CALL
        statement to call stored procedures, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if the database
        server does not support the CALL statement.</td>
      </tr>

      <tr>
       <td>SPECIAL_CHARS</td>
       <td>string</td>
       <td>A string containing all of the characters other than
       a-Z, 0-9, and underscore that can be used in an identifier name.</td>
      </tr>

      <tr>
       <td>SQL_CONFORMANCE</td>
       <td>string</td>
       <td>
        <p class="para">The level of conformance to the ANSI/ISO SQL-92 specification
        offered by the database server:
        <dl>
         
          <dt>ENTRY</dt>
          <dd>
           <span class="simpara">
            Entry-level SQL-92 compliance.
           </span>
          </dd>
         
         
          <dt>FIPS127</dt>
          <dd>
           <span class="simpara">
            FIPS-127-2 transitional compliance.
           </span>
          </dd>
         
         
          <dt>FULL</dt>
          <dd>
           <span class="simpara">
            Full level SQL-92 compliance.
           </span>
          </dd>
         
         
          <dt>INTERMEDIATE</dt>
          <dd>
           <span class="simpara">
            Intermediate level SQL-92 compliance.
           </span>
          </dd>
         
        </dl>
        </p>
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.db2-server-info-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">connection</code></dt>
    <dd>
     <span class="simpara">
      Specifies an active DB2 client connection.
     </span>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.db2-server-info-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="simpara">
   Returns an object on a successful call, o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento
  </p>
 </div>


 


 


 <div class="refsect1 examples" id="refsect1-function.db2-server-info-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 A <span class="function"><strong>db2_server_info()</strong></span> example</strong></p>
   <div class="example-contents"><p>
    To retrieve information about the server, you must pass a valid
    database connection resource to <span class="function"><strong>db2_server_info()</strong></span>.
   </p></div>
   <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />$conn </span><span style="color: #007700">= </span><span style="color: #0000BB">db2_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">'sample'</span><span style="color: #007700">, </span><span style="color: #DD0000">'db2inst1'</span><span style="color: #007700">, </span><span style="color: #DD0000">'ibmdb2'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$server </span><span style="color: #007700">= </span><span style="color: #0000BB">db2_server_info</span><span style="color: #007700">( </span><span style="color: #0000BB">$conn </span><span style="color: #007700">);<br /><br />if (</span><span style="color: #0000BB">$server</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">"DBMS_NAME: "</span><span style="color: #007700">;                 </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">DBMS_NAME </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"DBMS_VER: "</span><span style="color: #007700">;                  </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">DBMS_VER </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"DB_CODEPAGE: "</span><span style="color: #007700">;               </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">DB_CODEPAGE </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"DB_NAME: "</span><span style="color: #007700">;                   </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">DB_NAME </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"INST_NAME: "</span><span style="color: #007700">;                 </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">INST_NAME </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"SPECIAL_CHARS: "</span><span style="color: #007700">;             </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SPECIAL_CHARS </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"KEYWORDS: "</span><span style="color: #007700">;                  </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">KEYWORDS</span><span style="color: #007700">) );<br />    echo </span><span style="color: #DD0000">"DFT_ISOLATION: "</span><span style="color: #007700">;             </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">DFT_ISOLATION </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"ISOLATION_OPTION: "</span><span style="color: #007700">;<br />    </span><span style="color: #0000BB">$il </span><span style="color: #007700">= </span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />    foreach( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">ISOLATION_OPTION </span><span style="color: #007700">as </span><span style="color: #0000BB">$opt </span><span style="color: #007700">)<br />    {<br />       </span><span style="color: #0000BB">$il </span><span style="color: #007700">.= </span><span style="color: #0000BB">$opt</span><span style="color: #007700">.</span><span style="color: #DD0000">" "</span><span style="color: #007700">;<br />    }<br />    </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$il </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"SQL_CONFORMANCE: "</span><span style="color: #007700">;           </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">SQL_CONFORMANCE </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"PROCEDURES: "</span><span style="color: #007700">;                </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">PROCEDURES </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"IDENTIFIER_QUOTE_CHAR: "</span><span style="color: #007700">;     </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">IDENTIFIER_QUOTE_CHAR </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"LIKE_ESCAPE_CLAUSE: "</span><span style="color: #007700">;        </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">LIKE_ESCAPE_CLAUSE </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"MAX_COL_NAME_LEN: "</span><span style="color: #007700">;          </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">MAX_COL_NAME_LEN </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"MAX_ROW_SIZE: "</span><span style="color: #007700">;              </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">MAX_ROW_SIZE </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"MAX_IDENTIFIER_LEN: "</span><span style="color: #007700">;        </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">MAX_IDENTIFIER_LEN </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"MAX_INDEX_SIZE: "</span><span style="color: #007700">;            </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">MAX_INDEX_SIZE </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"MAX_PROC_NAME_LEN: "</span><span style="color: #007700">;         </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">MAX_PROC_NAME_LEN </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"MAX_SCHEMA_NAME_LEN: "</span><span style="color: #007700">;       </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">MAX_SCHEMA_NAME_LEN </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"MAX_STATEMENT_LEN: "</span><span style="color: #007700">;         </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">MAX_STATEMENT_LEN </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"MAX_TABLE_NAME_LEN: "</span><span style="color: #007700">;        </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">MAX_TABLE_NAME_LEN </span><span style="color: #007700">);<br />    echo </span><span style="color: #DD0000">"NON_NULLABLE_COLUMNS: "</span><span style="color: #007700">;      </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$server</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">NON_NULLABLE_COLUMNS </span><span style="color: #007700">);<br /><br />    </span><span style="color: #0000BB">db2_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$conn</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div></div>

   <div class="example-contents"><p>Il precedente esempio visualizzerà:</p></div>
   <div class="example-contents screen"><div class="examplescode"><pre class="examplescode">DBMS_NAME: string(9) &quot;DB2/LINUX&quot;
DBMS_VER: string(10) &quot;08.02.0000&quot;
DB_CODEPAGE: int(1208)
DB_NAME: string(6) &quot;SAMPLE&quot;
INST_NAME: string(8) &quot;db2inst1&quot;
SPECIAL_CHARS: string(2) &quot;@#&quot;
KEYWORDS: int(179)
DFT_ISOLATION: string(2) &quot;CS&quot;
ISOLATION_OPTION: string(12) &quot;UR CS RS RR &quot;
SQL_CONFORMANCE: string(7) &quot;FIPS127&quot;
PROCEDURES: bool(true)
IDENTIFIER_QUOTE_CHAR: string(1) &quot;&quot;&quot;
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)</pre>
</div></div>
  </div>
 </div>



 <div class="refsect1 seealso" id="refsect1-function.db2-server-info-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.db2-client-info.php" class="function" rel="rdfs-seeAlso">db2_client_info()</a> - Returns an object with properties that describe the DB2 database client</span></li>
  </ul>
 </div>



</div><?php manual_footer($setup); ?>