Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBD::ODBC does not connect to server, while unixodbc does #19

Open
dv-petrov opened this issue Jul 4, 2021 · 0 comments
Open

DBD::ODBC does not connect to server, while unixodbc does #19

dv-petrov opened this issue Jul 4, 2021 · 0 comments

Comments

@dv-petrov
Copy link

May be it's not related to DBD::ODBC, but I encountered problem with FreeTDS 1.3rc2, and the problem occurs only for Perl code.
All worked fine with 1.2 version of driver, but I needed to have sqlserver 2019 and utf8 collation, so I switched to new version.
And my environmet configuration is:
[application]

my $dsn_odbc  = 'dbi:ODBC:Driver=FreeTDS13;Servername=FreeTDS_local_19';
my $dbh =  $dbh = myDBI->connect(our $dsn_odbc, our $db_user, our $db_pasw);

[/etc/odbcinst.ini]

[FreeTDS13]
        Driver=/usr/lib/x86_64-linux-gnu/libtdsodbc.so
        FileUsage=1

[/etc/odbc.ini] (it seems FreeTDS ignore odbc.ini, but anyway)

[FreeTDS_local_19]
       Driver = FreeTDS13
        Server = localhost
        TDS_Version = 7.4
        Port = 1433

[/etc/freetds.conf]

[FreeTDS_local_19]
        Driver = FreeTDS13
        Server = localhost
        TDS_Version = 7.4
        Port = 1433

isql result:

$ isql -v FreeTDS_local_19 SA password
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>

Application run result:
DBI connect('Driver=FreeTDS13;Servername=FreeTDS_local_19','SA',...) failed: [unixODBC][FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist (SQL-08S01) [state was 08S01 now 08001]
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source (SQL-08001) [state was 08001 now 01000]
[unixODBC][FreeTDS][SQL Server]Unknown host machine name. (SQL-01000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant