Re: ODBC Connection Problem from Linux to SQL Server Daabase
Nick Gorham <[email protected]> Fri, 11 Mar 2016 09:58:32 +0000
| Newsgroups | gmane.comp.db.unixodbc.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============0717653832==
Content-Type: multipart/alternative;
boundary="------------010607020301010401050304"
This is a multi-part message in MIME format.
--------------010607020301010401050304
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
On 10/03/16 19:06, Funny,Solomon wrote:
>
> Our Unix Admin installed the SQL Server ODBC Drivers for Linux on our
> Linux server, but when I attempt to connect to a SQL Server, I receive
> the following error message:
>
> *[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on
> SQL_HANDLE_HENV failed*
>
> *[ISQL]ERROR: Could not SQLConnect *
>
> I did successfully test the SQL Server authenticated account and
> password, I am trying to connect to within SQL server
>
> When I googled the error, it indicated either the ODBC drivers are not
> mentioned properly, or environment variable are not set ODBCSYSINI
> ODBCINI.
>
> I performed the command env from the command line and the environment
> variables were set ODBCSYSINI ODBCINI:
>
> ODBCINI=/etc/odbc.ini
>
> ODBCSYSINI=/etc
>
> I checked the data source and driver configurations set by the Unix
> Admin, and they looked correct:
>
> /etc/odbc.ini
>
> [TITAN]
>
> Description=SQL Server ODBC Driver
>
> Driver=SQL Server Native Client 11.0
>
> Server=nts-entdbd1
>
> Port=1433
>
> Database=prod01
>
> /etc/odbcinst.ini
>
> [SQL Server Native Client 11.0]
>
> Description=Microsoft SQL Server ODBC Driver V1.0 for Linux
>
> Driver=/usr/lib64/libodbc.so.1.0.0
>
> Threading=1
>
> UsageCount=1
>
> Trace=Yes
>
That driver looks like the driver manager, I would expect something like:
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.0.0
BTW, you need to join the mailing list to post, its to prevent spam.
--
NIck
--------------010607020301010401050304
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mail.lurcher.org id u2B9wIJL020207
<html>
<head>
<meta content=3D"text/html; charset=3Dwindows-1252"
http-equiv=3D"Content-Type">
</head>
<body text=3D"#000000" bgcolor=3D"#FFFFFF">
<div class=3D"moz-cite-prefix">On 10/03/16 19:06, Funny,Solomon wrote=
:<br>
</div>
<blockquote
cite=3D"mid:[email protected]=
ADS"
type=3D"cite">
<meta http-equiv=3D"Content-Type" content=3D"text/html;
charset=3Dwindows-1252">
<meta name=3D"Generator" content=3D"Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Our Unix Admin installed the SQL Server
ODBC Drivers for Linux on our Linux server, but when I attempt
to connect to a SQL Server, I receive the following error
message:<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>=A0</o:p></p>
<p class=3D"MsoNormal"><b>[IM004][unixODBC][Driver
Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed<o:p=
></o:p></b></p>
<p class=3D"MsoNormal"><b>[ISQL]ERROR: Could not SQLConnect <o:p>=
</o:p></b></p>
<p class=3D"MsoNormal"><o:p>=A0</o:p></p>
<p class=3D"MsoNormal">I did successfully test the SQL Server
authenticated account and password, I am trying to connect to
within SQL server<o:p></o:p></p>
<p class=3D"MsoNormal"
style=3D"line-height:13.85pt;background:white">When I googled
the error, it indicated either the ODBC drivers
<span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222">are
not mentioned properly, or environment variable are not set
ODBCSYSINI ODBCINI.<o:p></o:p></span></p>
<p class=3D"MsoNormal"
style=3D"line-height:13.85pt;background:white"><span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222"><o:p>=A0</o:p></span></p>
<p class=3D"MsoNormal"
style=3D"line-height:13.85pt;background:white"><span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222">I
performed the command env from the command line and the
environment variables were set ODBCSYSINI ODBCINI:<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"
style=3D"line-height:13.85pt;background:white"><span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222"><o:p>=A0</o:p></span></p>
<p class=3D"MsoNormal"><span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222">ODBCINI=3D/etc/odbc.ini<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222">ODBCSYSINI=3D/etc<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222"><o:p>=A0</o:p></span></p>
<p class=3D"MsoNormal"><span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222">I
checked the data source and driver configurations set by the
Unix Admin, and they looked correct:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222"><o:p>=A0</o:p></span></p>
<p class=3D"MsoNormal"><span
style=3D"font-size:10.0pt;font-family:"Arial","sans-serif&=
quot;;color:#222222">/etc/odbc.ini<o:p></o:p></span></p>
<p class=3D"MsoNormal">[TITAN]<o:p></o:p></p>
<p class=3D"MsoNormal">Description=3DSQL Server ODBC Driver<o:p><=
/o:p></p>
<p class=3D"MsoNormal">Driver=3DSQL Server Native Client 11.0<o:p=
></o:p></p>
<p class=3D"MsoNormal">Server=3Dnts-entdbd1<o:p></o:p></p>
<p class=3D"MsoNormal">Port=3D1433<o:p></o:p></p>
<p class=3D"MsoNormal">Database=3Dprod01<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>=A0</o:p></p>
<p class=3D"MsoNormal">/etc/odbcinst.ini<o:p></o:p></p>
<p class=3D"MsoNormal">[SQL Server Native Client 11.0]<o:p></o:p>=
</p>
<p class=3D"MsoNormal">Description=3DMicrosoft SQL Server ODBC
Driver V1.0 for Linux<o:p></o:p></p>
<p class=3D"MsoNormal">Driver=3D/usr/lib64/libodbc.so.1.0.0<o:p><=
/o:p></p>
<p class=3D"MsoNormal">Threading=3D1<o:p></o:p></p>
<p class=3D"MsoNormal">UsageCount=3D1<o:p></o:p></p>
<p class=3D"MsoNormal">Trace=3DYes</p>
</div>
</blockquote>
<br>
That driver looks like the driver manager, I would expect something
like:<br>
<br>
Driver=3D/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.0.0<br>
<br>
BTW, you need to join the mailing list to post, its to prevent spam.<=
br>
<br>
-- <br>
NIck<br>
</body>
</html>
--------------010607020301010401050304--
--===============0717653832==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
--===============0717653832==--