1DBIx::Class::Storage::DUDBsBIeI:rx::OC:DoCBnlCta:rs:isMb:iu:ctSretodosroPafegtre_l:S:QDDLoB_cISu:em:reOvnDetBraC(t:3i:)oMnicrosoft_SQL_Server(3)
2
3
4

NAME

6       DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server - Support
7       specific to Microsoft SQL Server over ODBC
8

DESCRIPTION

10       This class implements support specific to Microsoft SQL Server over
11       ODBC.  It is loaded automatically by DBIx::Class::Storage::DBI::ODBC
12       when it detects a MSSQL back-end.
13
14       Most of the functionality is provided from the superclass
15       DBIx::Class::Storage::DBI::MSSQL.
16

USAGE NOTES

18   Basic Linux Setup (Debian)
19         sudo aptitude install tdsodbc libdbd-odbc-perl unixodbc
20
21       In case it is not already there put the following (adjust for non-64bit
22       arch) in "/etc/odbcinst.ini":
23
24         [FreeTDS]
25         Description = FreeTDS
26         Driver      = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
27         Setup       = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
28         UsageCount  = 1
29
30       Set your $dsn in connect_info as follows:
31
32         dbi:ODBC:server=<my.host.name>;port=1433;driver=FreeTDS;tds_version=8.0
33
34       If you use the EasySoft driver (<http://www.easysoft.com>):
35
36         dbi:ODBC:server=<my.host.name>;port=1433;driver=Easysoft ODBC-SQL Server
37
38   Basic Windows Setup
39       Use the following $dsn for the Microsoft ODBC driver:
40
41         dbi:ODBC:driver={SQL Server};server=SERVER\SQL_SERVER_INSTANCE_NAME
42
43       And for the Native Client:
44
45         dbi:ODBC:driver={SQL Server Native Client 10.0};server=SERVER\SQL_SERVER_INSTANCE_NAME
46
47       Go into Control Panel -> System and Security -> Administrative Tools ->
48       Data Sources (ODBC) to check driver names and to set up data sources.
49
50       Use System DSNs, not User DSNs if you want to use DSNs.
51
52       If you set up a DSN, use the following $dsn for connect_info:
53
54         dbi:ODBC:dsn=MY_DSN
55

MULTIPLE ACTIVE STATEMENTS

57       The following options are alternative ways to enable concurrent
58       executing statement support. Each has its own advantages and drawbacks
59       and works on different platforms. Read each section carefully.
60
61       For more details about using MAS in MSSQL over DBD::ODBC see this
62       excellent document provided by EasySoft:
63       <http://www.easysoft.com/developer/languages/perl/multiple-active-statements.html>.
64
65       In order of preference, they are:
66
67       ·       mars
68
69       ·       dynamic_cursors
70
71       ·       server_cursors
72

METHODS

74   connect_call_use_mars
75       Use as:
76
77         on_connect_call => 'use_mars'
78
79       in your connection info, or alternatively specify it directly:
80
81         Your::Schema->connect (
82           $original_dsn . '; MARS_Connection=Yes',
83           $user,
84           $pass,
85           \%attrs,
86         )
87
88       Use to enable a feature of SQL Server 2005 and later, "Multiple Active
89       Result Sets". See "Does DBD::ODBC support Multiple Active Statements?"
90       in DBD::ODBC::FAQ for more information.
91
92       This does not work on FreeTDS drivers at the time of this writing, and
93       only works with the Native Client, later versions of the Windows MS
94       ODBC driver, and the Easysoft driver.
95
96   connect_call_use_dynamic_cursors
97       Use as:
98
99         on_connect_call => 'use_dynamic_cursors'
100
101       Which will add "odbc_cursortype => 2" to your DBI connection
102       attributes, or alternatively specify the necessary flag directly:
103
104         Your::Schema->connect (@dsn, { ... odbc_cursortype => 2 })
105
106       See "odbc_cursortype" in DBD::ODBC for more information.
107
108       If you're using FreeTDS, "tds_version" must be set to at least 8.0.
109
110       This will not work with CODE ref connect_info's.
111
112       WARNING: on FreeTDS (and maybe some other drivers) this will break
113       "SCOPE_IDENTITY()", and "SELECT @@IDENTITY" will be used instead, which
114       on SQL Server 2005 and later will return erroneous results on tables
115       which have an on insert trigger that inserts into another table with an
116       "IDENTITY" column.
117
118       WARNING: on FreeTDS, changes made in one statement (e.g. an insert) may
119       not be visible from a following statement (e.g. a select.)
120
121       WARNING: FreeTDS versions > 0.82 seem to have completely broken the
122       ODBC protocol. DBIC will not allow dynamic cursor support with such
123       versions to protect your data. Please hassle the authors of FreeTDS to
124       act on the bugs that make their driver not overly usable with
125       DBD::ODBC.
126
127   connect_call_use_server_cursors
128       Use as:
129
130         on_connect_call => 'use_server_cursors'
131
132       May allow multiple active select statements. See "odbc_SQL_ROWSET_SIZE"
133       in DBD::ODBC for more information.
134
135       Takes an optional parameter for the value to set the attribute to,
136       default is 2.
137
138       WARNING: this does not work on all versions of SQL Server, and may lock
139       up your database!
140
141       At the time of writing, this option only works on Microsoft's Windows
142       drivers, later versions of the ODBC driver and the Native Client
143       driver.
144

FURTHER QUESTIONS?

146       Check the list of additional DBIC resources.
147
149       This module is free software copyright by the DBIx::Class (DBIC)
150       authors. You can redistribute it and/or modify it under the same terms
151       as the DBIx::Class library.
152
153
154
155perl v5.30.1          DBIx::Class:2:0S2t0o-r0a1g-e2:9:DBI::ODBC::Microsoft_SQL_Server(3)
Impressum