cancel
Showing results for 
Search instead for 
Did you mean: 

service with multiple databasefiles

1,311

The database server (dbsrv12) starts 20 databases.

We create a service (CREATE SERVICE ws_getAnimalData TYPE 'XML' AUTHORIZATION OFF USER DBA AS SELECT..).

How can we retrieve the data from the correct databasefile?

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

AFAIK, there are several methods, depending on whether the database server uses one port for all databases or different ports for each database (or a combination):

  1. You can use different ports for each database by using -xs with several http options, such as this one taken from the docs - in that case the client has to use the according port and thereby specifies the desired database:

    dbsrv17 -xs http(PORT=80;DBN=your-first-database),http(PORT=8800;DBN=your-second-database) your-first-database.db your-second-database.db

  2. You can use the same port and include the database name in the URL the client specifies, as described here. In that case the "-xs http" option should include "DBN=REQUIRED".

Note that in both cases the according web service definition has to be created in each database, as web service definitions are parts of the database, not the database server. So in your case the CREATE SERVICE statement needs to be run in each database.

Answers (0)