2014-09-05 07:44:07 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 08:37:21 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-14 02:34:50 +00:00
|
|
|
<!-- State: experimental -->
|
2005-09-04 19:39:32 +00:00
|
|
|
|
2010-06-18 07:46:53 +00:00
|
|
|
<reference xml:id="ref.pdo-dblib" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
2013-05-23 17:38:21 +00:00
|
|
|
<?phpdoc extension-membership="bundledexternal" ?>
|
2005-08-12 02:03:50 +00:00
|
|
|
<title>Microsoft SQL Server and Sybase Functions (PDO_DBLIB)</title>
|
2005-08-20 23:14:57 +00:00
|
|
|
<titleabbrev>MS SQL Server (PDO)</titleabbrev>
|
2005-08-12 02:03:50 +00:00
|
|
|
<partintro>
|
|
|
|
|
2007-06-20 22:25:43 +00:00
|
|
|
<section xml:id="pdo-dblib.intro">
|
2005-08-12 02:03:50 +00:00
|
|
|
&reftitle.intro;
|
|
|
|
<para>
|
2007-12-31 15:43:38 +00:00
|
|
|
PDO_DBLIB is a driver that implements the <link linkend="intro.pdo">PHP
|
2005-09-11 06:17:09 +00:00
|
|
|
Data Objects (PDO) interface</link> to enable access from PHP to
|
|
|
|
Microsoft SQL Server and Sybase databases through the FreeTDS libary.
|
2005-08-12 02:03:50 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2010-06-14 22:00:37 +00:00
|
|
|
This extension is not available anymore on Windows with PHP 5.3 or later.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
On Windows, you should use SqlSrv, an alternative driver for MS SQL is
|
|
|
|
available from Microsoft: <link xlink:href="&url.sqlsrv;">&url.sqlsrv;
|
2010-12-06 22:45:17 +00:00
|
|
|
</link>.
|
2010-06-14 22:00:37 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If it is not possible to use SqlSrv, you can use the
|
|
|
|
<link linkend="ref.pdo-odbc">PDO_ODBC</link> driver to connect to
|
|
|
|
Microsoft SQL Server and Sybase databases, as the native Windows DB-LIB
|
|
|
|
is ancient, thread un-safe and no longer supported by Microsoft.
|
2005-08-12 02:03:50 +00:00
|
|
|
</para>
|
|
|
|
</section>
|
|
|
|
</partintro>
|
|
|
|
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xml:id="ref.pdo-dblib.connection">
|
2005-08-12 02:03:50 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>PDO_DBLIB DSN</refname>
|
|
|
|
<refpurpose>Connecting to Microsoft SQL Server and Sybase databases</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
|
|
|
<para>
|
|
|
|
The PDO_DBLIB Data Source Name (DSN) is composed of the following elements:
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>DSN prefix</term>
|
|
|
|
<listitem>
|
2005-08-12 03:31:18 +00:00
|
|
|
<para>
|
2010-09-22 08:06:24 +00:00
|
|
|
The DSN prefix is <userinput>sybase:</userinput> if PDO_DBLIB was
|
|
|
|
linked against the Sybase ct-lib libraries,
|
|
|
|
<userinput>mssql:</userinput> if PDO_DBLIB was linked against the
|
|
|
|
Microsoft SQL Server libraries, or <userinput>dblib:</userinput> if
|
|
|
|
PDO_DBLIB was linked against the FreeTDS libraries.
|
2005-08-12 03:31:18 +00:00
|
|
|
</para>
|
2005-08-12 02:03:50 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2012-02-29 05:03:14 +00:00
|
|
|
<term><literal>host</literal></term>
|
2005-08-12 02:03:50 +00:00
|
|
|
<listitem>
|
2005-08-12 03:31:18 +00:00
|
|
|
<para>
|
|
|
|
The hostname on which the database server resides.
|
2009-05-15 15:25:43 +00:00
|
|
|
Defaults to 127.0.0.1.
|
2005-08-12 03:31:18 +00:00
|
|
|
</para>
|
2005-08-12 02:03:50 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2012-02-29 05:03:14 +00:00
|
|
|
<term><literal>dbname</literal></term>
|
2005-08-12 02:03:50 +00:00
|
|
|
<listitem>
|
2005-08-12 03:31:18 +00:00
|
|
|
<para>
|
|
|
|
The name of the database.
|
|
|
|
</para>
|
2005-08-12 02:03:50 +00:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-05-15 15:25:43 +00:00
|
|
|
<varlistentry>
|
2012-02-29 05:03:14 +00:00
|
|
|
<term><literal>charset</literal></term>
|
2009-05-15 15:25:43 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The client character set.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2012-02-29 05:03:14 +00:00
|
|
|
<term><literal>appname</literal></term>
|
2009-05-15 15:25:43 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The application name (used in sysprocesses).
|
|
|
|
Defaults to "PHP Generic DB-lib" or "PHP freetds".
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2012-02-29 05:03:14 +00:00
|
|
|
<term><literal>secure</literal></term>
|
2009-05-15 15:25:43 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Currently unused.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-08-12 02:03:50 +00:00
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title>PDO_DBLIB DSN examples</title>
|
|
|
|
<para>
|
|
|
|
The following examples show a PDO_DBLIB DSN for connecting to
|
|
|
|
Microsoft SQL Server and Sybase databases:
|
|
|
|
<programlisting><![CDATA[
|
|
|
|
mssql:host=localhost;dbname=testdb
|
|
|
|
sybase:host=localhost;dbname=testdb
|
2005-09-11 06:17:09 +00:00
|
|
|
dblib:host=localhost;dbname=testdb
|
2005-08-12 02:03:50 +00:00
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
</reference>
|
|
|
|
<!-- 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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2005-08-12 02:03:50 +00:00
|
|
|
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
|
|
|
|
-->
|