on 2016 Nov 18 8:56 AM
Dear Sir,
I have more than 10 databases running under anywhere 12 on windows server 2012, is there any way to connect to any database as client from a pc on the domain without specify port number.
Regards
To connect to a specific database running on your server use the DatabaseName (DBN) connection parameter. Example: To connect to database "MyDatabaseFoo" running on server "myServer" you would use:
-c "ServerName=myServer;DatabaseName=MyDatabaseFoo"
Refer to the documentation for more information. HTH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is a connection string parameter for various utility programs like dbisql, as in
"%SQLANY12%\\bin64\\dbisql"^ -c "ServerName=myServer;DatabaseName=MyDatabaseFoo"
For client applications, put the string wherever the interface requires it; e.g., for PowerBuilder:
SQLCA.DBParm & = "ConnectString='ServerName=myServer;DatabaseName=MyDatabaseFoo;" & + "UID=DBA;PWD=SQL;'"
Since this is a client application, you will want the quoted values "ServerName=myServer;DatabaseName=MyDatabaseFoo" in your connection string or map them to the ODBC DSN properties. If using jConnect, please refer to http://dcx.sap.com/index.html#1201/en/dbprogramming/dbname-jconnect-jdbc.html.
If you have more than one service you can skip the port, and with more than 2 services you have to do port assignment to optimize the response times of the databases, the way to designate the ports is in the tcpip connection inside the service.
-x tcpip(serverport = 2638)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Me, too...
If all your databases run on the same database engine, they will use the same port. It would be different if some of the databases run on another database engine on the same machine - then you would have to use a different port for the second database engine...
That being said, IMHO I don't feel isvahe1's answer will help you further.
User | Count |
---|---|
68 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.