.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server 3pm" .TH DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server 3pm "2011-05-10" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server \- Support specific to Microsoft SQL Server over ODBC .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class implements support specific to Microsoft \s-1SQL\s0 Server over \s-1ODBC\s0. It is loaded automatically by by DBIx::Class::Storage::DBI::ODBC when it detects a \&\s-1MSSQL\s0 back-end. .PP Most of the functionality is provided from the superclass DBIx::Class::Storage::DBI::MSSQL. .SH "USAGE NOTES" .IX Header "USAGE NOTES" .SS "Basic Linux Setup (Debian)" .IX Subsection "Basic Linux Setup (Debian)" .Vb 1 \& sudo aptitude install tdsodbc libdbd\-odbc\-perl unixodbc .Ve .PP In case it is not already there put the following in \f(CW\*(C`/etc/odbcinst.ini\*(C'\fR: .PP .Vb 5 \& [FreeTDS] \& Description = FreeTDS \& Driver = /usr/lib/odbc/libtdsodbc.so \& Setup = /usr/lib/odbc/libtdsS.so \& UsageCount = 1 .Ve .PP Set your \f(CW$dsn\fR in connect_info as follows: .PP .Vb 1 \& dbi:ODBC:server=;port=1433;driver=FreeTDS;tds_version=8.0 .Ve .PP If you use the EasySoft driver (): .PP .Vb 1 \& dbi:ODBC:server=;port=1433;driver=Easysoft ODBC\-SQL Server .Ve .SS "Basic Windows Setup" .IX Subsection "Basic Windows Setup" Use the following \f(CW$dsn\fR for the Microsoft \s-1ODBC\s0 driver: .PP .Vb 1 \& dbi:ODBC:driver={SQL Server};server=SERVER\eSQL_SERVER_INSTANCE_NAME .Ve .PP And for the Native Client: .PP .Vb 1 \& dbi:ODBC:driver={SQL Server Native Client 10.0};server=SERVER\eSQL_SERVER_INSTANCE_NAME .Ve .PP Go into Control Panel \-> System and Security \-> Administrative Tools \-> Data Sources (\s-1ODBC\s0) to check driver names and to set up data sources. .PP Use System DSNs, not User DSNs if you want to use DSNs. .PP If you set up a \s-1DSN\s0, use the following \f(CW$dsn\fR for connect_info: .PP .Vb 1 \& dbi:ODBC:dsn=MY_DSN .Ve .SH "MULTIPLE ACTIVE STATEMENTS" .IX Header "MULTIPLE ACTIVE STATEMENTS" The following options are alternative ways to enable concurrent executing statement support. Each has its own advantages and drawbacks and works on different platforms. Read each section carefully. .PP In order of preference, they are: .IP "\(bu" 8 mars .IP "\(bu" 8 dynamic_cursors .IP "\(bu" 8 server_cursors .SH "METHODS" .IX Header "METHODS" .SS "connect_call_use_mars" .IX Subsection "connect_call_use_mars" Use as: .PP .Vb 1 \& on_connect_call => \*(Aquse_mars\*(Aq .Ve .PP in your connection info, or alternatively specify it directly: .PP .Vb 6 \& Your::Schema\->connect ( \& $original_dsn . \*(Aq; MARS_Connection=Yes\*(Aq, \& $user, \& $pass, \& \e%attrs, \& ) .Ve .PP Use to enable a feature of \s-1SQL\s0 Server 2005 and later, \*(L"Multiple Active Result Sets\*(R". See \*(L"Does \s-1DBD::ODBC\s0 support Multiple Active Statements?\*(R" in \s-1DBD::ODBC::FAQ\s0 for more information. .PP This does not work on FreeTDS drivers at the time of this writing, and only works with the Native Client, later versions of the Windows \s-1MS\s0 \s-1ODBC\s0 driver, and the Easysoft driver. .SS "connect_call_use_dynamic_cursors" .IX Subsection "connect_call_use_dynamic_cursors" Use as: .PP .Vb 1 \& on_connect_call => \*(Aquse_dynamic_cursors\*(Aq .Ve .PP Which will add \f(CW\*(C`odbc_cursortype => 2\*(C'\fR to your \s-1DBI\s0 connection attributes, or alternatively specify the necessary flag directly: .PP .Vb 1 \& Your::Schema\->connect (@dsn, { ... odbc_cursortype => 2 }) .Ve .PP See \*(L"odbc_cursortype\*(R" in \s-1DBD::ODBC\s0 for more information. .PP If you're using FreeTDS, \f(CW\*(C`tds_version\*(C'\fR must be set to at least \f(CW8.0\fR. .PP This will not work with \s-1CODE\s0 ref connect_info's. .PP \&\fB\s-1WARNING:\s0\fR on FreeTDS (and maybe some other drivers) this will break \&\f(CW\*(C`SCOPE_IDENTITY()\*(C'\fR, and \f(CW\*(C`SELECT @@IDENTITY\*(C'\fR will be used instead, which on \s-1SQL\s0 Server 2005 and later will return erroneous results on tables which have an on insert trigger that inserts into another table with an \f(CW\*(C`IDENTITY\*(C'\fR column. .PP \&\fB\s-1WARNING:\s0\fR on FreeTDS, changes made in one statement (e.g. an insert) may not be visible from a following statement (e.g. a select.) .SS "connect_call_use_server_cursors" .IX Subsection "connect_call_use_server_cursors" Use as: .PP .Vb 1 \& on_connect_call => \*(Aquse_server_cursors\*(Aq .Ve .PP May allow multiple active select statements. See \&\*(L"odbc_SQL_ROWSET_SIZE\*(R" in \s-1DBD::ODBC\s0 for more information. .PP Takes an optional parameter for the value to set the attribute to, default is \&\f(CW2\fR. .PP \&\fB\s-1WARNING\s0\fR: this does not work on all versions of \s-1SQL\s0 Server, and may lock up your database! .PP At the time of writing, this option only works on Microsoft's Windows drivers, later versions of the \s-1ODBC\s0 driver and the Native Client driver. .SS "using_freetds" .IX Subsection "using_freetds" Tries to determine, to the best of our ability, whether or not you are using the FreeTDS driver with \s-1DBD::ODBC\s0. .SH "AUTHOR" .IX Header "AUTHOR" See \*(L"\s-1AUTHOR\s0\*(R" in DBIx::Class and \*(L"\s-1CONTRIBUTORS\s0\*(R" in DBIx::Class. .SH "LICENSE" .IX Header "LICENSE" You may distribute this code under the same terms as Perl itself.