Question
· 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.

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

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.