Subscribe to
Posts
Comments

Well it took me a while to figure out the easiest way to connect to a SQL server listening on a non standard port. The standard sql server port is 1433. When you connect

to SQL server using enterprise manager or Query Analyzer this is the port the tools automatically connect to on the server. However when you change SQL Server so that it runs on a non standard port for security reason you will have to do additional trick in order to be able to connect to sql server.

One way to do that is to insert an entry using SQL Server client network utility and specify the port corresponding to the SQL Server you want to connect to. The easiest however way is to embed the port number in the SQL Server name. But how? An almost universal format to specify port with host name is in this way, “ServerName:ServerPort”. For instance 127.0.0.1:1433. However SQL Server doesn’t take this format. It has its own format, “ServerName, ServerPort”. For example 127.0.0.1,1433. So next time when you connect to a SQL Server listening on a non standard port you can put the server name and port number together in above format and place it into where you usual enter the SQL Srver name. It works perfect for both Enterprise Manager and Query Analyzer. And I recalled that was one of the interview question I was asked when I was looking for a job last year.


Related Posts:

  • Can Not Connect to SQL Server Named Instance Remotely?
  • Trouble Shooting SQL Server Connection Problems, Tricks and Solutions
  • IPTables Port Forwarding on Virtual IP Doesn’t Work For Tomcat
  • Link MySQL Server Into MSSQL Server
  • List All Permissions a User Has in SQL Server Database and Error 4064


  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...

    RSS feed | Trackback URI

    Comments »

    No comments yet.

    Name (required)
    E-mail (required - never shown publicly)
    URI
    Subscribe to comments via email
    Your Comment (smaller size | larger size)
    You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.