Hi Monks, One of the file I have to process is anticipated to be a very large file when we go into production and so I've chosen perl instead of my usual VB script. However, I've run into problem with DBI throwing up the below error:
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error (SQL-0 +8001) [state was 08001 now 01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (SECCreate +Credentials()). (SQL-01000) [state was 01000 now 01S00]
SSL has been turned off on the server where my script is run from. TLS1.0 and TLS1.1 are turned off also. I tested turning TLS1.0 back on my script will run without issue, but I'm not supposed to to use TLS1.0. So my question is what do I need to do to get my code work with TLS1.2? Below is how to currently attempt to get the DB connection using DBI:
sub get_connection { my ($DSN, $DBServer, $DBUser, $PW) = @_; my $dbh = DBI->connect("dbi:ODBC:Driver={SQL Server};Server=${DBSe +rver};DSN=${DSN};UID=${DBUser};PWD=${PW};KeepAlive=1"); return $dbh; }
Thanks for your help!

In reply to DBI connecting to MS SQL Server TLS 1.2 by PearlNovice

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.