The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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

asked 18 Nov '16, 08:56

thaerlb's gravatar image

thaerlb
1278912
accept rate: 0%


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

permanent link

answered 18 Nov '16, 09:00

Mark%20Culp's gravatar image

Mark Culp
22.3k9129262
accept rate: 40%

thank you,but where i put : -c "ServerName=myServer;DatabaseName=MyDatabaseFoo" ??

(18 Nov '16, 09:05) thaerlb
Replies hidden

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;'"
(18 Nov '16, 09:59) Breck Carter

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.

(18 Nov '16, 10:02) Chris Keating

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)

permanent link

answered 24 Nov '16, 12:01

isvahe1's gravatar image

isvahe1
504
accept rate: 0%

Sorry i didn't understand.

(25 Nov '16, 02:08) thaerlb
Replies hidden

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.

(25 Nov '16, 03:38) Volker Barth

I work when I have more than one database and more than 1gb in size, so each service has its own resources and not shared and before windows has a direct address by the designated port.

(25 Nov '16, 11:16) isvahe1
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×97

question asked: 18 Nov '16, 08:56

question was seen: 200 times

last updated: 25 Nov '16, 11:20