A common use case when replatforming apps is connecting to oracle databases via a user provided service instance. There are three ways these CUPs can defined as specified in the spring cloud connectors #oracle doc. There are some gotchas when defining oracle CUPs. This post provides examples of when and which form of Oracle CUPs to define ...
The connector will check for:
- If you are using oracle subprotocol , then the CUPs has to be a uri.
- If your DB url contains the ldap:// prefix before the host name in the URL then use the jdbcUrl credentials property instead of url.
cf create-user-provided-service catalog-db -p '{"jdbcUrl":"jdbc:oracle:thin:TOMHANKS/<pwd>$2011@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=TCP)(HOST=espndb.net)(PORT=1555))(ADDRESS=(PROTOCOL=TCP)(HOST=espndb.net)(PORT=1555))(ADDRESS=(PROTOCOL=TCP)(HOST=espndb.net)(PORT=1555)))(CONNECT_DATA=(SERVICE_NAME=cd_app)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=5))))"}'
cf cups ulrDataSource -p “dbURL” oracle://ulr_wsph:facebook123#@rwev10exp.abc.facebook.com:1576/e_facebooklog_rgwd.nbc.us
Significant contributions to this post by Anwar Chirakkattil , Oleg Iavorskyi and Brad Starkenberg
The connector will check for:
- uri using the scheme oracle
- jdbcUrl using the subprotocol oracle in the JDBC URL
- oracleUri, oracleuri, oracleUrl, or oracleurl fields in credentials
- If you are using oracle subprotocol , then the CUPs has to be a uri.
- If your DB url contains the ldap:// prefix before the host name in the URL then use the jdbcUrl credentials property instead of url.
cf create-user-provided-service catalog-db -p '{"jdbcUrl":"jdbc:oracle:thin:TOMHANKS/<pwd>$2011@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS=(PROTOCOL=TCP)(HOST=espndb.net)(PORT=1555))(ADDRESS=(PROTOCOL=TCP)(HOST=espndb.net)(PORT=1555))(ADDRESS=(PROTOCOL=TCP)(HOST=espndb.net)(PORT=1555)))(CONNECT_DATA=(SERVICE_NAME=cd_app)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)(RETRIES=180)(DELAY=5))))"}'
cf cups ulrDataSource -p “dbURL” oracle://ulr_wsph:facebook123#@rwev10exp.abc.facebook.com:1576/e_facebooklog_rgwd.nbc.us
The Spring cloud connectors library provides ORACLE connectors that automatically wire up your ORCL cups to your Spring datasource bean
http://cloud.spring.io/spring-cloud-connectors/spring-cloud-connectors.html#_extending_spring_cloud_connectorsSignificant contributions to this post by Anwar Chirakkattil , Oleg Iavorskyi and Brad Starkenberg
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.