myGully.com

myGully.com (https://mygully.com/index.php)
-   Linux & BSD (https://mygully.com/forumdisplay.php?f=401)
-   -   SQLCMD Timeout 0x2AF9 (https://mygully.com/showthread.php?t=4498634)

logan517 14.07.16 22:56

SQLCMD Timeout 0x2AF9
 
Hi,

ich bin gerade dabei auf einem Testserver PHP7.0 mit meinem MS-SQL Server zu verbinden
([Link nur für registrierte und freigeschaltete Mitglieder sichtbar. Jetzt registrieren...])

Ich habe die benötigten Dateien (unixodbc und msodbcsql) installiert, bekomme aber trotzdem eine Fehlermeldung (s. unten).

Das Problem müsste noch irgendwo auf der Clientseite / Linuxserver liegen, weil ich testweise die Firewall vom MSSQL komplett deaktiviert habe und auch das Kommando (sqlcmd) funktioniert auf dem Windows Server problemlos.


Ich liste mal alle Befehle auf, welche ich auf dem Server ausgeführt habe. (Ist ein frisches Ubuntu 16, welches nun nur zum testen ist)

Zitat:

add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install libstdc++6 libc6 libkrb5-3 libgss3 e2fsprogs openssl build-essential libodbc1

tar xvzf msodbcsql-13.0.0.0.tar.gz
cd msodbcsql-13.0.0.0/
./build_dm.sh
cd /tmp/unixODBC.5476.3319.20534/unixODBC-2.3.1
make install
cd /home/user/msodbcsql-13.0.0.0/
./install.sh verify
./install.sh install
odbcinst -q -d -n "ODBC Driver 13 for SQL Server"
ln -s /usr/lib64/libodbcinst.so.2 /lib/x86_64-linux-gnu/libodbcinst.so.2

sqlcmd -S 192.168.20.110\SQLEXPRESS -U sa -Q "SELECT @@VERSION"


root@testserver:~# sqlcmd -S 192.168.20.110\SQLEXPRESS -U sa -Q "SELECT @@VERSION"
Password:
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : TCP Provider: Error code 0x2AF9.
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
root@testserver:~#
Habt ihr ne Idee, woran das noch liegen könnte?

Grüße
Logan517

nibi030 15.07.16 22:01

ich bin da auch kein Profi, aber das sollte die Syntax sein:

-S [protocol:] server[\instance_name][,port]

Dann musst du noch sicherstellen das die Kiste auch auf TCP lauscht und nicht UDP.

Mach doch blöd nen : telnet 192.168.20.110 PORT -> und schau ob überhaupt ne Verbindung akzeptiert wird.


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:31 Uhr.

Powered by vBulletin® (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.