martinrybak / SQLClient

Native Microsoft SQL Server client for iOS
http://objcsharp.wordpress.com/2013/10/15/an-open-source-sql-server-library-for-ios/
MIT License
124 stars 51 forks source link

Connecting IPV6 #37

Closed sureshr207 closed 7 years ago

sureshr207 commented 7 years ago

Hi Martin, I found this very useful for connecting to SQL Server. For IPV4 connections, I used In client connect:@"server:port" - XXX.XXX.XXX.XXX:XXXX & its working perfectly. I have specific IPV6 address & port for the server & still I am not able to connect the same in IPV6. Also I use freeTDS 1.00.15 & it supports IPV6 too. Is there something which I need to do or am I missing something?

martinrybak commented 7 years ago

Hm, I'm not sure. Are you saying you are able to connect to your database server using FreeTDS directly from a computer on the same network?

sureshr207 commented 7 years ago

I am able to connect only in my SQL Server using that specific IPV6 address & port.

For IPV6 connections, I tried - client connect:@"server:port" - XXXX:XXXX:X:X::X:XXXX & http://[XXXX:XXXX:X:X::X]:XXXX

Is there any format to specify for IPV6?

Using your repository, I get error - Unable to connect: Adaptive Server is unavailable or does not exist (Severity 9).

martinrybak commented 7 years ago

Can you try connecting directly using the FreeTDS binary directly?

sureshr207 commented 7 years ago

Just installed FreeTDS using Homebrew & checked in Terminal. Still I get the same issue in IPV6 whereas IPV4 is working perfectly.

So does this mean I need to change settings in FreeTDS to support IPV6 or I need to check my SQL server?

martinrybak commented 7 years ago

Can you confirm which version of FreeTDS you have installed? Looks like you need v0.95 and above to support IPV6:

http://stackoverflow.com/questions/34883036/remote-connection-to-sql-server-with-freetds-and-ipv6

sureshr207 commented 7 years ago

There was some server side issue.

client connect:@"server:port" - XXXX:XXXX:X:X::X:XXXX format is working fine now.

Thanks.

martinrybak commented 7 years ago

Happy to hear!