xoxomos
asked on
OS X MSSQL Connection
Any of the experts out there have a way to connect to SQL Server from OS X without adding the iODBC?
ASKER
The first goal would be to get tsql to return a prompt ( >) rather that counting from 1 - 149 and bombing out. Next I would want to be able to write queries. Next learn some python coding.
There is an application, DBVisualizer, that uses JDBC. Made one unsuccessful attempt with that yesterday and i'll be trying to determine why today.
There is an application, DBVisualizer, that uses JDBC. Made one unsuccessful attempt with that yesterday and i'll be trying to determine why today.
ASKER
Attempting to connect to SQLServers from OSX
A206394:~ ctaylor$ tsql -H warehouse2 -U sa -P master! -p 1433
tsql -H warehouse2.csueastbay.edu -U sa -P masteping warehouse2 -p 1433
Missing argument -p, looking for default instance ... found default instance, port 1433
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Msg 18456 (severity 14, state 1) from [warehouse2] Line 50135040:
"Login failed for user 'sa'."
Error 20020 (severity 9):
Bad token from the server: Datastream processing out of sync
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
A206394:~ ctaylor$ tsql -H 134.154.228.217 -U sa -P Indigent -p 1433
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
149Error 20009 (severity 9):
Unable to connect: Adaptive Server is unavailable or does not exist
OS error 60, "Operation timed out"
There was a problem connecting to the server
A206394:~ ctaylor$ A206394:~ ctaylor$ ping 134.154.228.217
PING 134.154.228.217): 56 data bytes
64 bytes from 134.154.228.217: icmp_seq=0 ttl=126 time=2.077 ms
64 bytes from 134.154.228.217: icmp_seq=1 ttl=126 time=5.150 ms
64 bytes from 134.154.228.217: icmp_seq=2 ttl=126 time=5.064 ms
64 bytes from 134.154.228.217: icmp_seq=3 ttl=126 time=5.970 ms
64 bytes from 134.154.228.217: icmp_seq=4 ttl=126 time=4.544 ms
64 bytes from 134.154.228.217: icmp_seq=5 ttl=126 time=5.174 ms
64 bytes from 134.154.228.217: icmp_seq=6 ttl=126 time=5.063 ms
64 bytes from 134.154.228.217: icmp_seq=7 ttl=126 time=4.873 ms
A206394:~ ctaylor$ tsql -H warehouse2 -U sa -P master! -p 1433
tsql -H warehouse2.csueastbay.edu -U sa -P masteping warehouse2 -p 1433
Missing argument -p, looking for default instance ... found default instance, port 1433
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Msg 18456 (severity 14, state 1) from [warehouse2] Line 50135040:
"Login failed for user 'sa'."
Error 20020 (severity 9):
Bad token from the server: Datastream processing out of sync
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
A206394:~ ctaylor$ tsql -H 134.154.228.217 -U sa -P Indigent -p 1433
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
149Error 20009 (severity 9):
Unable to connect: Adaptive Server is unavailable or does not exist
OS error 60, "Operation timed out"
There was a problem connecting to the server
A206394:~ ctaylor$ A206394:~ ctaylor$ ping 134.154.228.217
PING 134.154.228.217): 56 data bytes
64 bytes from 134.154.228.217: icmp_seq=0 ttl=126 time=2.077 ms
64 bytes from 134.154.228.217: icmp_seq=1 ttl=126 time=5.150 ms
64 bytes from 134.154.228.217: icmp_seq=2 ttl=126 time=5.064 ms
64 bytes from 134.154.228.217: icmp_seq=3 ttl=126 time=5.970 ms
64 bytes from 134.154.228.217: icmp_seq=4 ttl=126 time=4.544 ms
64 bytes from 134.154.228.217: icmp_seq=5 ttl=126 time=5.174 ms
64 bytes from 134.154.228.217: icmp_seq=6 ttl=126 time=5.063 ms
64 bytes from 134.154.228.217: icmp_seq=7 ttl=126 time=4.873 ms
You can use SQLDeveloper.
Download from http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
Configure JDBC Driver in SQL Developer
http://www.oracle.com/technetwork/database/migration/jdbc-migration-1923524.html
Here's a Flash movie which shows you how to configure a SQL Server connection.
http://www.oracle.com/technetwork/developer-tools/sql-developer/sql-server-connection-viewlet-swf-089886.html
Download from http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
Configure JDBC Driver in SQL Developer
http://www.oracle.com/technetwork/database/migration/jdbc-migration-1923524.html
Here's a Flash movie which shows you how to configure a SQL Server connection.
http://www.oracle.com/technetwork/developer-tools/sql-developer/sql-server-connection-viewlet-swf-089886.html
ASKER
Thanks. I do have SQLDeveloper that i've used to connect to an SQLServer on which i have a database userid/pw and that works fast and fine with both DBVisualizer and SQLDeveloper. There are some other SQLServers on which I'm trying to access using Windows authentication. I have a Windows logon but no SQLServer logon. When i try Windows authentication with my Windows userid the test fails. I'm guessing that is telling me i can use Windows authentication, but i still need a database account. Please correct me if i'm wrong. I know i can just go in and create a SQLServer account, but there is about a month long ritual that is SUPPOSED :-) to be followed before making any kind of change on production servers. I'll start that process if you confirm that is in fact necessary.
The reason I need to get the tsql to connect is once that works, i can practice some python.
The reason I need to get the tsql to connect is once that works, i can practice some python.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. I do have server running in mixed mode. I was hoping I could avoid the ODBC layer, but yes it has been looking like i will have to succumb after all. I've gone through configuring the .conf file from version 7.0, 7.2 and 8.0.
Another thing i can't figure out is why when i run tsql -C , version always comes out as 5.0 regardless of what i put into the .conf file.
Another thing i can't figure out is why when i run tsql -C , version always comes out as 5.0 regardless of what i put into the .conf file.
ASKER
Thanks again.
ASKER
Just got to the point in that richbs article where he says to try telnet. That comes back with a clear 'unable to connect to host'
What was the exact telnet command you used?
ASKER
Ran telnet 1433. Looked at a netstat and got some other ports that made the connection successfully.
Uninstalled all my sqlserver stuff , 2008,2010, 2012 etc so i can reinstall just one instance. I should have tried 1434 before uninstalling stuff though.
Uninstalled all my sqlserver stuff , 2008,2010, 2012 etc so i can reinstall just one instance. I should have tried 1434 before uninstalling stuff though.
The telnet command should be in the form
telnet server port
telnet server port
telnet server portnumber
ASKER
Sorry, that's what i did. Tried server and IP, but i was using 1433 even though i had one version already running at 1433 when i installed a second (full trial) version which must have taken 1434. Cleaned everything off and will be installing again later today.
Thanks again.
Thanks again.
Port 1433 is usually used for a direct connection to the SQL Server. Port 1434 is usually reserved for the 'sqlbrowser.exe' service which accepts server names like "MYSERVER\SQLSERVER" and connects to the correct "server instance". This is more useful when there is more than one 'instance' on a server.
If you are using Java, you can connect via JDBC.