私はCentOSの上だと私は、以下のものを使用して、私のデータベースにログインすることができますunixODBCとFreeTDSを使用してAzureに接続するにはどうすればいいですか?
TDSVER=7.2 tsql -H example.database.windows.net -U myname -D MyDataBase -p 1433
は、その後、私は自分のパスワードを入れて、私は-OKにログインすることができます。残念ながらisql
/osql
は同じことをやるのがはるかに難しいようです。
〜/ .odbc.iniをisql
を使用して
[AwesomeDatabase]
Description = Azure Awesome Database
Trace = off
Server = example.database.windows.net
Database = AwesomeDatabase
UID = [email protected]
PWD = mypassword
Port = 1433
TDS Version = 7.2
ForceTrace = off
Encrypt = yes
#Driver = FreeTDS
Driver = /usr/lib64/libtdsodbc.so
Ansi = True
client charset = utf-8
:
⚘ isql -v CDH
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
[01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
[ISQL]ERROR: Could not SQLConnect
まあ、それは残念だ
私の設定は次のようになります。 osql
をしよう:
⚘ osql -S AwesomeDatabase -U [email protected] -P mypassword # I've tried wayne instead of [email protected], neither works
checking shared odbc libraries linked to isql for default directories...
strings: '': No such file
trying /tmp/sql ... no
trying /tmp/sql ... no
trying /etc ... OK
checking odbc.ini files
reading /home/me/.odbc.ini
[AwesomeDatabase] found in /home/me/.odbc.ini
found this section:
[AwesomeDatabase]
Description = Azure Awesome Database
Trace = off
Server = example.database.windows.net
Database = AwesomeDatabase
UID = [email protected]
PWD = mypassword
Port = 1433
TDS Version = 7.2
ForceTrace = off
Encrypt = yes
#Driver = FreeTDS
Driver = /usr/lib64/libtdsodbc.so
Ansi = True
client charset = utf-8
looking for driver for DSN [AwesomeDatabase] in /home/me/.odbc.ini
found driver line: " Driver = /usr/lib64/libtdsodbc.so"
driver "/usr/lib64/libtdsodbc.so" found for [AwesomeDatabase] in .odbc.ini
found driver named "/usr/lib64/libtdsodbc.so"
/usr/lib64/libtdsodbc.so is an executable file
"Server" found, not using freetds.conf
Server is "example.database.windows.net"
Configuration looks OK. Connection details:
DSN: AwesomeDatabase
odbc.ini: /home/me/.odbc.ini
Driver: /usr/lib64/libtdsodbc.so
Server hostname: example.database.windows.net
Address: 191.235.192.43
Attempting connection as wayne ...
+ isql CDH wayne mypassword -v
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server
[01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
[ISQL]ERROR: Could not SQLConnect
net.c:202:FAILED Connecting to 191.235.192.43 port 1433 (TDS version 4.2)
私はLinux上でのunixODBCを使用してのAzureに接続するために行うには何が必要ですか?