How to connect to SQL Server through proxy server - sql-server

Is it possible to connect to SQL Server server through proxy (http) using SQLSERVER oledb provider?
How can I specify proxy address and port in connection string if it's possible?
What nonstandard methods to bypass proxy you'd recommend if it's not possible?

This article seems specific to MS ISA servers, but the theory may hold.
2008
http://msdn.microsoft.com/en-us/library/ms190801.aspx
2005
http://msdn.microsoft.com/en-us/library/ms190801(SQL.90).aspx
edit:
Perhaps a sql 2005 web service would fit your needs?
http://technet.microsoft.com/en-us/library/ms345140(SQL.90).aspx
It won't give you normal odbc functionality though. You shouldn't be exposing your SQL server to the internet btw.
Also, see comment.

Related

Connect SQL Server from SQL Developer

I searched through all threads on the web available, but none could help me.
I am trying to connect to SQL Server engine from SQL Developer. In order to do that I enabled Named Pipes and TCP/IP from SQL Configuration Manager.
Then I tried different drivers:
I tried Microsoft JDBC driver for SQL Server - I cannot choose in connection manager SQL Server database type, so it does not work..
I tried jTDS driver instead, and it worked - I can choose SQL Server database type, but then all I get is an error informing that it cannot connect to Microsoft SQL Server on localhost (I tried localhost, name of my computer, none of which worked).
Is there anything more I can do?
EDIT
This is what I have so far:
SECOND EDIT
I had more problems:
With error saying
Status: Failur-I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property
Using windows authentication, I still got asked for username and password.
(All details and solutions in my answer below)
We only support the jTDS driver for SQL Server and Sybase ASE connections, so that's the way to go.
After that, it's up to you to get a correct connection string to your SQL Server system.
Make sure you have the right port in addition to your 'localhost' network location for your SQL Server instance.
This is using version 19.1 of SQL Developer to connect to a SQL2012 instance overseas..
Actually there were more problems, which I'll post here along with solutions:
In order to ba able to connect SQL Server database type from SQL developer it is needed to install jTDS driver, as already mentioned. Other types are not supported by SQL Developer.
Next thing was to configure with SQL Configuration Manager (the easiest way IMO) SQL Server to listen on IP port 1433, not dynamic, as was previously set. In order to do that in configuration manager I had to go to SQL Server Network Configuration and make appropriate changes. More here.
Next I had problem:
Status: Failur-I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property
Which was the fault of missing file, solution was placing file ntlmauth.dll to the /jdk/bin in SQL Developer directory.
I chose Windows authentication, which apparently is not supported by jTDS, so I needed to create user in SQL Server, which I use to connect SQL Server from SQL Developer.
After all that, I had it working.

Connecting to MS SQL database using ODBC drivers from local machine

Currently we are using the odbc driver to connect to our MS SQL Server. We however want to be able to pull a directory down to our local machine, make changes, and push back to the server. We are able to connect to the MS SQL Server from our server but we cannot make the connection from our local machines. Does anyone know how to do this? We want to still use the odbc driver as that is what we are using on our server for connections.
thanks!
You may not be able to connect to the Server via ODBC because of network issues. When you are creating your ODBC connection, have you tried to use the IP address of the SQL Server as opposed to the server name? You may also need to use the DOMAIN\Server syntax.
There are quite a number of potential reasons you cannot create the ODBC connection. This link addresses some of those issues:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b479cb4a-99a8-437a-8796-7d9f77910ec8/cant-create-an-odbc-connection?forum=sqlexpress
Hope this helps. Let me know if you still have issues.

running program in computers without sql server

Is it possible to run a program in which a SQL Server database has been used in other computers where "SQL Server" has not been install?
Certainly, you'd change the connection string to connect to a remote server like this:
Server=RemoteServerName;Database=DatabaseName;...
and in fact, that's the most common production configuration. A shared database amongst multiple users.
The answer is YES. The only thing you need to do is to point where the Microsoft SQL Server is placed. Of course, you need to configure the server to accept remote connections and that the client you're tring to connect has internet access.
Configure SQL Server to accept remote connections
Guessing that you use c#...
Connection strings for c#

connect sql server 2005/2008 over internet

How do I connect to SQL Server 2005/2008 using Management Studio or other desktop application over the internet?
Check out WCF Data Services:
http://msdn.microsoft.com/en-us/data/bb931106.aspx
That way, you don't have to totally expose your database server out to the internet, but you get fine grained control over what gets exposed and who (which type of user) can see or modify what.
Marc
I finally solved this by:
Changing default SQL Port to 8080 from 1433 (our ISP was blocking)
Turning off Windows Firewall on the server. I know this is not a long term solution, but at least I was able to pinpoint the problem. I had set two inbound firewall rules to allow port 8080 and SSMS program, on the server. I created an outbound firewall rule on the client for SSMS (but don't think this mad a difference).
I had to change all apps to use the new port instead of the default port. I had to configure our router to handle the new port 8080 and forward to the database server.
I will modify the Windows Firewall settings to see what was blocking SSMS.
DB Server: Windows 7 Pro 64bit 24 GB RAM
If you put 'your' SQL server (any brand, I'm not bashing) on the internet ... it won't be yours for long, unless you add some rather effective security measures ...
I suggest you look into VPN.
To be able to access your database over the internet, you will need to make sure that the server that hosts the database is accessible over the internet and the port that the database instance uses is open on that machine. You will also need to allow remote connections using the SQL Server Configuration Tool.
For Management Studio access I would recommend rather than opening the server to the outside to use a VPN solution that allows you to create a secure connection to the server and from there you can use the server name or IP to connect as if your machine is part of that network.
For the desktop application I would recommend looking into having the data be consumed through a web service or WCF rather than needing to have a direct connection to the database over the internet.
Hope this helps.
Firstly, if we put security consideration on the side, you have to configure SQL server (sql surface area configuration) to accept traffic, then you have to open proper ports on you server and allow inbound traffic thru to your router to the SQL server.
When you open sql server management studio in connect to server window and at the server name type the IP of your server and enter your username and password.
correct format : IP\InstanceName
you should have a user on target database.

How to scan/search for active SQL Server instances with Java?

Is there an easy way, using Java, to scan/search the local network for SQL Server database instances?
You can get source code from the free SQLPing tool to port into Java if you want.
This uses several techniques for SQL Server discovery because there is no foolproof method.
Examples:
what port is the instance on and SQL Browser is turned off?
is the server configued with shared memory only
SQL Services not running

Resources