How to specify a port number in an OLEDB connection string

  • 20 April 2021
  • 0 replies
  • 248 views

Userlevel 2
Badge +2

Sometimes customers do not use the default listener port for a SQL Server database server. In that case you may have to specify the port number in the connection string.

This is the full syntax and some example you could use in the USoft binder:

[Windows servername],[port number]\[named instance server name[:[database name]

NTSERVER01,12345 (Windows server + comma + port number)

NTSERVER01,12345:myDatabase (Windows server + comma + port number + colon + database name)

Laptop123,12345\SQLEXPRESS:myDatabase

(Windows servername + comma + port number + backslash + Instance name + colon + database name)

 

Named instance is the name of the database server in case of an “Always On” SQL server installation or when you install SQL Server express edition.  

 


0 replies

Be the first to reply!

Reply