How to Connect to SQLServer using dynamic port

General discussion forum about all databases other than SqlBase.
stinjo

How to Connect to SQLServer using dynamic port

Post by stinjo » 07 Feb 2013, 07:16

Hi,

Im trying to connect to an Ms SQL-server that are using dynamic ports.

eg. in Net the connection string look like this

Code: Select all

<add name="PROD" providerName="System.Data.SqlClient" connectionString="Data Source=SERVERNAME\INSTANCE,PORTNUMBER;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=USER;Password=PWD" />
I think i tried everything in SQL.ini but nothing works.

Code: Select all

;SQL router
[win32client.dll]
;SQL Server
comdll=sqlodb32

;SQL Server
[odbcrtr]
;remotedbname=DATABASE1, driver=SQL Server; server=SERVERNAME\INSTANCE; database=DATABASENAME; port=PORTNUMBER; 
remotedbname=DATABASE, driver=SQL Server; server=SERVERNAME:PORTNUMBER; database=DATABASENAME;
;remotedbname=DATABASE, driver=SQL Server; server=SERVERNAME\INSTANCE:PORTNUMBER; database=DATABASENAME;
 
Help needed

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest