Accessing SQL Server Using IP Address and Port Number ... Help!

I need to access SQL Server which is on a machine behind a firewall and you access that machine using an IP address such as 95.95.95.33:6930 (not the real IP address) ... But you get the idea, that by accessing 95.95.95.33 on port 6930, the firewall directs requests to that particular machine ...

My question is, how do I build a connection string to access the machine at 95.95.95.33:6930 and then continue accessing SQL Server on port 1433 or maybe another port like 8484 ???

thanks

Mike

+2


a source to share


2 answers


well you are building a connection string like this

"Server=95.95.95.33,6930;database=mydb;..."

      



the firewall / nat will have to redirect this to the correct computer / port of the SQL server for you.

+7


a source


All you have to worry about is the public address and port number of the SQL server. It doesn't matter to you which extension number of the machine and port the connection connects to.

Then you create a connection string as described at connectionstrings.com :



Data Source=95.95.95.33,6930;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;

      

DBMSSOCN = TCP / IP. This is how to use TCP / IP instead of Named Pipes. At the end of the data source is the port to use. 1433 is the default port for SQL Server.

0


a source







All Articles