Question
CM Wang · Jun 19, 2017

How to expose the specific database via ECP

Hi,

 

I want to attach one local namespace on instance A to the database on instance B.

How could I use ECP to achieve my goal?

Should I config instance B as ECP data server? If so, how could I explicitly specify which database on instance B could be exposed ?

Thanks for your help.

0
0 397
Discussion (4)3
Log in or sign up to continue

Instance B would be the data server. You just need to make sure you enable the %Service_ECP on that machine as part of configuring the data server. As for choosing the database, that would be done on instance A. After you configure it to be an application server pointing to instance B, you can create a remote database on instance A.

Thank, it seems to work. I have a follow-up question.

Not only instance B, I also configure instance C as ECP data server and I also expose one database on instance C as a remote 

database on instance A. Is it possible that I could map both exposed databases on instance B and instance C to the same namespace on instance A ?

Thanks.

As far as ECP is concerned, you are only creating remote DATABASES. You can map 1 NAMESPACE on a system to point to any databases it has configured, local or remote. You could easily have app server instance A connect to both data server instances B and C and create a remote database for each of them. You could then have 1 namespace on A use the databases from B and C for various things (globals, routines, specific mappings).

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...
Check the "Configuring an ECP Application Server" section. However, I advise you to read everything.

Remote databases should be created on the client instance (A). They represent the connection with the local database on the server instance (B).

If you follow the steps from the guide, when creating a remote database you'll notice that the wizard will ask you for a server, that's where you should select the ECP server you just defined.

Now create a local database on the client instance if you need to store something on it (like, let's say... code). And finally create a namespace, this is where you can define where to use local or remote database (GLOBALS AND/OR ROUTINES).

CAUTION: If you configure globals to use the remote database, any changes you do on the client instance will reflect on it's provider counterpart. The same applies for routines.

EDIT: Answering your question. No, as I far as I know, using this method you can't have more than one remote database for each global or routines. But I think you can workaround it by defining another namespace, from another remote database that links a local database on instance C and map what you want.

But you'll be responsible for dealing with name conflicts.