Bluemix Local: How to add an existing DB2 database as a service?

I use Bluemix Local and have an existing local database (DB2 LUW) that I want to use with the Cloud Foundry application. How can I make this “testDB” database available as a service so that my application can use the VCAP_SERVICES variable to access this database?

Do I need a special broker or will the service provided by the user do the trick?

cf cups db2-testdb Adds only a service, but does not have JDBC properties.

+4
source share
1 answer

- DB2 , Cloud Foundry Bluemix ( Cloud Foundry).

  • Bluemix/Cloud Foundry

.

, : cf cups db2-testdb -p '{"jdbcURL" : "jdbc:db2://yourMachine.com:50000/TESTDB"}'

(update-user-provided-service): cf uups db2-testdb -p '{"jdbcURL" : "jdbc:db2://yourMachine2.com:40000/TESTDB02"}'

, , : cf bind-service yourAppName db2-testdb VCAP_SERVICES jdbcURL. . .

+3

All Articles