Sql-server – Connect to SQL Server without specifying port

sql serversql-server-2008-r2

I am trying to use what appears to be a rather badly written application which connects to an SQL Server database which I specify.

I cannot seem to connect to the SQL Server instance I wish to use without specifying the port with a comma e.g. DBServer\DBInstance,<port_number>

Now, the problem that this causes, and why I think the application is badly written, is that for some reason the application then thinks that the port number is the name of the database, and the server\instance name is DBServer\DBInstance. I believe it is not expecting to have to deal with a port number like this.

Now, I have used SQL Server instances before which did not require the port number to be specified. I know this must be some setting under the TCP/IP settings in SQL Server Configuration manager, and I have tried setting the port to the default 1433 as well as turning on dynamic ports, but neither of these have worked.

I am still fairly new to SQL Server, if anybody could point me in the right direction it would be greatly appreciated.

Edit

Having solved the problem as per Ste Bov's answer, I also now know why the application could not handle the port being specified. Internally, the application was storing its data in a temporary csv file and didn't bother to check input for commas or enclose it in quotes, so when it came to the port in the csv it thought it was the next field which was supposed to be the Database Name.

So yes, a badly written application indeed!

Best Answer

If you have named instances and don't want to declare your ports then you need to ensure that SQL Server Browser is running

By default this runs through port UDP 1434