Skip to main content

JDBC and CMAN and a new location for the database

I had an interesting issue this week.

The setup is as follows:

WLS with Webcenter. The Datasource point to a database for the metadata. This database sits in the database zone. As we are not allowed to connect directly to the database there is a CMAN in between.
After the setup of the CMAN and the database we had a connection using JDBC where the CMAN was our endpoint.

So far so good.

Now the IT department decided (a long time ago) to move a number of databases from one platform to another. As this meant a change in the IP and name of the database we expected that the only configuration that was needed to change was the CMAN.

Database moved, CMAN config adapted and voila: nothing works!

First test was to use the console and test the JDBC connection. Error was a

ORA-12514 TNS:listener does not currently know of service requested in connect descriptor.


This in itself was strange as from the WLS/Webcenter perspective nothing did change. Endpoint was still the CMAN, SID did not change after the move.

Second test was to see if the connection from the WLS machine to the CMAN was still OK. As there was no Oracle client on the system I just used a telnet connection to the assigned CMAN port. Perfect result: the connection was open, so something was listening on the machine on the given port. As I am positive that this machine only harbors a CMAN I was happy.

Third check - going to the CMAN folks and see if the connection from the CMAN to the DB was OK.
Worked like a charm. Config looked perfect to. 

Now this became a kind of a puzzle.

I went back to the WLS Admin console and restarted the JDBC connection. Still the same error.

I tried to change some settings in the JDBC settings but no avail.

Just for the fun of it I created a new JDBC connection pointing to the same CMAN endpoint with absolutely the same settings as before. Assigned the new JDBC datasource to a managed server (actually the cluster) and hit the test button. Now everything was the same as before but the name. It worked. Hooray!!!

As we had a number of datasources with some of them having names that are used inside the applications it seemed like a tedious idea to drop the datasources and recreate them. I did this for one cluster and it worked but I was a little bit too lazy to do this for all of them.

Then I tried something else. I went to a managed server of another domain and restarted it.
When it came back - which surprised me with a "broken" datasource - I went to the datasource and tested it again. Immediately the test can back without an error.

Trying another one - same result.
So obviously I restarted all MS (and the AS as they need db access as well). 

I wanted to let you know this as such a setting can impact your MAA environment when you change the endpoint of a database behind a CMAN.

 

Comments

hitesh said…
And after the restart of the MS in cluster , Datasources worked fine?

Popular posts from this blog

Oracle Fusion Middleware Forum in Valencia

Last week the 22nd Fusion Middleware and PaaS Partner Community Forum took place in Valencia, Spain. For me this was a very valuable experience - again as I have visited a number of #ofmForum before. Let me recap here the highlights of this meeting. After a great Welcome-Reception the evening before, where everybody had the chance to catch up with a large number of old (and soon-to-be new) friends, the conference started with a kind of the state of the union by Jürgen Kress. The community already has more than 8000 people. This - in a fact - is a tremendous achievement. Everybody agrees that this is only possible by the relentless work of Jürgen who puts a big effort into this. It shows that other areas inside the Oracle technology stack do not benefit by equivalent communities. Even other communities, when they exist at all, do not compete in the same league. So a VERY BIG THANK YOU for Jürgen is at its place here. After the opening a keynote from Alistair Hopkins showed ver...

Oracle Streams Explorer

At the recent Oracle SOA Suite community forum in Budapest I had a hands-on experience with the Oracle Streams Explorer. Having worked with the Oracle Complex Event Processing and also some hands-on exercises with the new Oracle Event Processing, the Oracle Streams Explorer is a very easy to handle and useful addition to the area of near-real-time data insight and analysis. The user interface comes along in the new Oracle look-and-feel. You can select a number of areas like IOT, Risk and Fraud Management, Transportation and Logistics, Customer Experience and Analysis and Telecommunications. Within that you get a number of predefined patterns and resources. Defining your own solution can therefore be based on an existing solution in your catalog or simply by combining input streams and defining filters on them. Now plenty of examples can (and will) be named. The essence for me - and this is a message that I will convey to customers - is the fact that by using Oracle Streams Expl...

Copy and Paste

I bounced into a funny thing when I setup a Data Guard Physical Standby Database. First I prepared some database init parameters in a document (actually I reused some old documentation I had done in a previous project). log_archive_dest_1 location=use_db_recovery_file_dest valid_for=(all_logfiles,all_roles) db_unique_name=osbsoadb The "alter system ..." command worked like a charm. During the preparations I needed to restart the database instance. To my surprise I received an error that there was an issue with an init parameter. ORA-16024:  parameter  LOG_ARCHIVE_DEST_1  cannot  be  parsed Google did not really help me. So I decided to create a pfile from the spfile and had a look into it. There it became evident what the error was. Somehow during the copy & paste the end-of-lines were copied as well - leaving my init parameter with some newlines in it. Made one line from it in the pfile, started the db and cr...