Posts Tagged Oracle
For security reasons and to prevent the configuration drift it is recommendable to use read only for analyzing problems.
For read only access of configuration and logs WebLogic provides out of the box the group Monitors. Unfortunately you cannot access DMS Spy Servlet with this group, which is useful for analyse runtime values of the server. Only users which belongs to the Administrators group and therefore have full access can access DMS Spy Servlet and this is not configurable in WebLogic by default.
Here you can see how to add groups on linux to the DMS Spy Servlet deployment:
pushd $ORACLE_HOME/oracle_common/modules/oracle.dms cp dms.war dms.war.`date +%y.%m.%d.%H:%M` unzip dms.war WEB-INF/weblogic.xml sed -i '/Monitors/d' WEB-INF/weblogic.xml sed -i '/^ <principal-name>Administrators<\/principal-name>$/a\ <principal-name>Monitors<\/principal-name>' WEB-INF/weblogic.xml zip dms.war WEB-INF/weblogic.xml rm -r WEB-INF popd
Following is the responsible snippet in weblogic.xml before:
<security-role-assignment> <role-name>Admin</role-name> <principal-name>Administrators</principal-name> </security-role-assignment>
and after modification:
<security-role-assignment> <role-name>Admin</role-name> <principal-name>Administrators</principal-name> <principal-name>Monitors</principal-name> </security-role-assignment>
After this modification you have to restart the WebLogic Server.
I arrived on evening before just in time for the life cooking event and later at the bar to meet lot of the people I already know and some new too.
The morning begins with a short introduction to the format of a barcamp.
As warm up Jens Schauder starts with an talk about clean code. He begins to compare what the lack of hygiene for Middle Ages mean and the statement that we are in the IT Middle ages. In extreme cases not tested and not understandable software can kills people! So the task for every day is “write an test” and refactor the code to clean code.
Then the barcamp planning starts. In short time three slots are filled up and the really barcamp starts.
Influenced by the starting talk next there was a session related to clean code and how to implement the related processes. You should teach a little bit of the theory behind it. It is essential to decide all rules with the whole team and review the continuous use of it. If the rules are not followed, then first you should ask why this happens and listen for the reasons. Jens Schauder recommends here these books. Maybe you have to adjust the rules to convince all developers. But in extreme cases of deny any of the decided rules you should escalate and delegate this to the responsible manager.
Next session was about how to test heterogeneous applications, especially SQL, PL/SQL and Forms but others too. I mentioned here two possible strategies, which both has it’s tradeoffs:
- End to end testing with expensive Tools, which provides all the required technology plugins, eg.
- Technology testing and mocking the behavior of interfaces to other technologies, you have to learn all off this and provide the infrastructure for it.
I noticed here that testing is mainly seen as to check the contract between developer and customer, sometimes useful for regression test but seldom as required for changing or refactoring the code. The participants seems to be overwhelmed by the amount of tools and effort to do automatic testing. Yes – there is a lot to do in advance, which pays off later.
In the next break I get a shortcut for actual requirement for forms change to implement some kind of SSO without additional servers. I get some nice hints and have now to check, if one of this is successful. This are the advantages of networking here.
The we discussed about Alternatives to Oracle Reports. Seems that it depends on your requirements, which tool to choose. Please do an value analysis here. So if you need pixel exact layout or want not pay much money Oracle Business Intelligence Publisher will not your friend. If you search for an active community maybe you should not choose Eclipse BIRT or at least use the commercial version from Actuate. But both of these and Jasper Reports are used from present participants. Further alternatives seem to be SAP Chrystal Reports and Pentaho. And don’t forget to test exotic features like widows and orphans!
After a coffee break we discussed the future of Oracle ADF. The punchline here was: ADF is not dead, but JDeveloper is very buggy. None of the participants does really miss any bit feature, but most struggles with the IDE. It seems, that the problems are bigger, when you work on windows. Maybe some of the product managers should be forced to worked again with windows to see our problems. I have articulated there 2 problems with the ADF community. I we try to raise the acceptance we should not try to extend the focus of the activities to alternative technologies as MAF or JET. Second we should not self call ADF into question on every conference, we should leave this part to the fans of other technologies.
The last session again turns around automatic testing of PL/SQL, some repeating to the described session above.
In closing session most of the participants said, that they want to come back next year. Maybe it is better to put some fixed sessions or workshops, as this is easier to describe to the bosses as “I will go this event, but it is not clear, what will happens there.”
I have learned not so much new things this year, but I attend these time more the known to me technologies. But I get the confirmation, that most of the things we do or plan do to are on the right track.
Unfortunately I observed some people in the sessions, which comes only to search for finding confirmations to reject for itself, what at least the initiator of the topic want to do.
You find more informations in Twitter
Another DOAG is over and here are my summary.
Unfortunately the early train from duesseldorf arrives not before 9:30, so I missed the first morning slot. But on the other hand I this was the slot where I had to decide between 8 presentations, which I’m interested in.
The first soft skill presentation was about creative techniques beyond brain storming. The mentioned 3 techniques was all unknown for me, maybe I give it a try next time.
The next presentation promises a live demo of a forms 12c migration to production. Nothing really new here and remembers me for an “beautify our village” contest. But fairly enough for customers which absolutely want to remain on Oracle Forms. As Translation Hub 12c is not available and Oracle Reports 12c will be the last version, I think 11g will the last version we will use on our side before completing migration to ADF.
I attend two presentations, which shows Auraplayer on top of Oracle Forms to provide mobile applications via Oracle Mobile Cloud Service (MCS). I understand the MCS thing, although I find it very complicated to use. But put another layer on complicated and most slowly Oracle Forms to create web services for mobile applications seems no use case for me. I doubt that the recording of web services works really well for complicated forms which switch the displayed items and canvases depending on the selected data. All samples was very simple forms, but the response time of the resulting mobile app was not acceptable for me.
The presentation about continuous integration in APEX give me some new ideas for maybe replacing our actual deployment processes for PL/SQL in the future. Will have a look at the mentioned sql-maven-plugin, when we go for Maven for ADF too. Will check Rspec as BDD framework to run PL/SQL unit tests. Promising is the feature to tie together Selenium tests and data checks in the same Rspec test definition. One drop of bitterness remains, as the presenter had no idea how to solve a merge conflict. Seems that this was only a proof of concept and not really used daily there.
Best practices for PL/SQL performance was a good reminder, what I all know about this topic but use to seldom. But will use some of the configuration things like native compilation of the system packages or PL/SQL optimization level in my docker instances for automatic testing to optimize test times.
SQL tips and tricks was a sovereign presentation, but shows me again that for several Oracle database releases only little improvements for the developer comes with.
In session “Standing at a Crossroads, ADF and JET” Duncan Mills clearly show the differences between Oracle ADF and Oracle JET. Running gag: The “Schnecke Chart” for quick decision between both. Will look, if I can reuse this for other decisions.
Next I tried an meeting at the Unconference about continuous integration for PL/SQL. But the most discussions really goes about the automation part. Most participants missed the most importantly definition of continuous integration: ” … continuous integration (CI) is the practice of merging all developer working copies to a shared mainline several times a day.”. Unfortunately I realize now that in the German Wikipedia translation this basis is completely softened: “developer should integrate as often as possible”. Not really new for me here, hope I have told something useful to the others.
“Extending Oracle ADF BC Models to REST, Cloud and Mobile” was a good time to remember what’s now possible as it really available and we now try another migration away from ADF 11g to the hottest version. I have seen this in the last conferences already.
Have read “Deep Dive Into Oracle ADF Transactions: Advanced Techniques” in the web already, but the information was a little bit clearer after seeing Eugene Fedorenko live.
Something completely different: “Free Load Testing Tools for Oracle Database”. I had known Swingbench before. SLOB is completely new for me and did not seen Apache JMeter JDBC test in this context before. Will test the last maybe in the future.
“Top 10 stumble stones for ADF 12c” was very technical but cool, good to have Markus Klenke at our site while our coming migration next weeks.
“Faster, Better, Cheaper: Oracle ADF Development in the Cloud” – with lot of problems in the demo part. Maybe really because of the DOAG WiFi. Quick Tip for all presenters: as I know at DOAG conferences there is ever an laptop available with LAN, try to put it in your laptop! For the content: DCS seems to restricting to much. I prefer Jenkins over Hudson. No push option directly with commit i JDeveloper etc.
Masking test data is very relevant in our banking busines, so I attend “Oracle Data Redaction live in Telko”. Seems that there are many fall knits here, as this doesn’t seem to solve all requirements out of the box.
Before the evening keynote Günter Stürner and Jürgen Menge was awarded, congratulations to both.
Now we are not ready for the evening party, we start the yearly German ADF Community meeting. Interesting part was a presentation of the Tools Statement of Direction, which again clearly differentiate between ADF, MAF, JET, MAX and ABCS. We get the clear statement ADF is standard for SAAS and JET for PAAS development at Oracle. In my opinion Oracle miss to communicate this in other presentations and miss to further present ADF in the public. A lot of questions of the present Community members was answered here too. Later we eat together with some of the product managers and community members and discussed topics for future presentations.
Later I go back to my hotel to remotely patch our fresh ADF 188.8.131.52 Server with patch for critical escalated bug to start our planned migration for ADF 184.108.40.206 next week. More later in a separate post.
Thank god the roll-out of SQL Developer 4.1.5 is not started already in our company. Will look how fast I can add the free PLSQL/COP SQL Developer Plugin of Philip Salvisberg from Trivadis to the silent install process. He showed in “Fighting Bad PL/SQL” the theory and the practice how his static code analysis tool for PL/SQL does work. Depending on the outcome and the price maybe we will later implement in continuous integration.
The keynote “Big Picture of digital revolution” wakes the expectation to us to take responsibility for the effects of digital revolution to the society and makes me very thoughtful.
After our hopefully successful migration to ADF 220.127.116.11 I want to change our deployment from ANT to Maven, so I attend the presentation “Migration Maven Possibilities”. This gives a good reminder what to do at that point.
Very interesting presentation, which really does not deserves so few visitors, was “Home Lab Setup and Familiarization of E-Business R12.2”. My time with E-Business Suite is over 15 years away, so I was surprised that I recognized much of the components. I think I’m sure not to install E-Business Suite for the moment, but lot of the instructions for the Home Lab Setup could I reuse for other technologies. Some concepts for the E-Business Suite, eg. double filesystem for reducing offline time for patching, are very interesting.
With last 2 presentations I enter again the world of ThickDatabase paradigm. We ever know that executing business in the database seems faster as in the middle tier, but we had no proofs. Now Toon Koppelaars from Oracle itself give us this with a deep analysis. The question remains – will the other Oracle departments will learn from this?
Tomorrow I will be trained in Continuous Delivery with Oracle Fusion Middleware and Oracle Cloud. I will release another blogs, when implementing some findings from this training.
As you see I switch often between technologies. This happens not ever voluntary. Normally I interested more in the development like ADF, MAF and JET. This year these presentation are unfortunately distributed over the conference. So I have discussed this today with the DOAG executives, they will improve this next year.
Nevertheless I get a lot of ideas from presentations in technologies I do not or not regularly use, so sometime I intentionally choose from such interesting presentations.
A recommendation for all conference visitors. Read the abstracts before you go to a conference and maybe before you book! You avoid disappointments because of wrong expectations. Often the title has the only purpose to be accept the presentation and has little to do with the real content. Abstracts give you often a better idea about the content.
Virtual Development Server: Provide Docker images in docker registry for Oracle XE Database and others
For later creation of containers as needed in the deployment process we have first to build docker images whenever we do not find suitable one in docker hub.
For most of my development I need a oracle database. On the internet you can find a lot of Dockerfile’s for this, but no ready image. This is because for running a database you have to accept a license and this happens when you download the installation software. For private testing this license often is free.
The basic cycle for all of this images is the same on my side:
- Find a Docker image
- If not found download required Software and build a Docker image
- Build the Docker image
- Push the images to private docker registry or the public registry DockerHub
Following you find an example for building Oracle XE 18.104.22.168 Image.
First you have to clone the git repository to a directory of you choice, I choose C:\shared\scmlocal\docker-images.
Put the downloaded installation source oracle-xe-11.2.0-1.0.x86_64.rpm.zip in the subdirectory C:\shared\scmlocal\docker-images\OracleDatabase\dockerfiles\22.214.171.124 as described in GitHub.
Next we have to map this directory to our virtualbox via following vagrant instructions. Additional we prepare port forwarding for accessing later the database from our host system.
... # Port Forwardings for: # - Oracle database port config.vm.network "forwarded_port", guest: 1521, host: 1521 # Oracle Application Express (APEX) config.vm.network "forwarded_port", guest: 8080, host: 8080 ... # map Oracle Docker Images installation path config.vm.synced_folder "C:\\shared\\scmlocal\\docker-images", "/docker-images", :mount_options => ["dmode=777","fmode=777"] ...
After that restart the virtualbox and connect to it via
vagrant halt vagrant up vagrant ssh
In the output you can see this mapping.
... default: 1521 (guest) => 1521 (host) (adapter 1) default: 5000 (guest) => 5000 (host) (adapter 1) default: 8080 (guest) => 8080 (host) (adapter 1) ... default: /docker-images => C:/shared/scmlocal/docker-images ...
Now you create build the image with the Oracle XE (-x) database version (-v) 126.96.36.199 via the provided scripts from oracle. -i skips the MD5 checksum check, as the checksums are not checked in as UNIX text format and so does not work in our vagrant on windows / oel virtualbox combination.
cd /docker-images/OracleDatabase/dockerfiles ./buildDockerImage.sh -v 188.8.131.52 -x -i
Now you have to wait some time. When the process is ready, you get at the time of this writing an image with the binaries installed.
docker images REPOSITORY TAG IMAGE ID CREATED SIZE oracle/database 184.108.40.206-xe 624d78c89ccb About a minute ago 1.203 GB registry latest c6c14b3960bd 5 weeks ago 33.28 MB oraclelinux latest 1988eb5b3fc6 6 weeks ago 278.2 MB
Next we tag this image for pushing to the local docker repository, which we have created in the first blog of this series and is up with every vagrant up of our virtualbox. After that we push it to the registry.
docker tag oracle/database:220.127.116.11-xe localhost:5000/oracle/database:18.104.22.168-xe docker push localhost:5000/oracle/database:22.214.171.124-xe
In the output we see the succesful push.
The push refers to a repository [localhost:5000/oracle/database] 345dfbce8859: Pushed dd4b46d40894: Pushed 11327e04fac0: Pushed 126.96.36.199-xe: digest: sha256:82058ca2c5c201ff46471a8db4d9569da9869d420727595884050f94dad0ec85 size: 955
Now we will check, if we can create a Docker container from our image in the registry and the database is working in it. Therefore at first we delete the oracle/database and oraclelinux images from our virtualbox. Then we create the container.
docker rmi 624d78c89ccb -f docker rmi 1988eb5b3fc6 sudo docker run --shm-size=1g -p 1521:1521 -p 8080:8080 --name="db188.8.131.52-xe" --restart unless-stopped localhost:5000/oracle/database:184.108.40.206-xe
In line 3 we pull the image from the local registry, start a container, open the ports 1521 and 8080 to the virtualbox and give the container a name.
Unable to find image 'localhost:5000/oracle/database:220.127.116.11-xe' locally 18.104.22.168-xe: Pulling from oracle/database 10ec637c060c: Pull complete 1902f66bc90b: Pull complete dd8942200fe1: Pull complete Digest: sha256:41ce1015c8f68ce063e855e7afa96000ededeef1e197e2181bc04c9577d73a1b Status: Downloaded newer image for localhost:5000/oracle/database:22.214.171.124-xe ORACLE AUTO GENERATED PASSWORD FOR SYS AND SYSTEM: 9f4e9a733e7983bc Oracle Database 11g Express Edition Configuration ------------------------------------------------- This will configure on-boot properties of Oracle Database 11g Express Edition. The following questions will determine whether the database should be starting upon system boot, the ports it will use, and the passwords that will be used for database accounts. Press <Enter> to accept the defaults. Ctrl-C will abort. Specify the HTTP port that will be used for Oracle Application Express : Specify a port that will be used for the database listener : Specify a password to be used for database accounts. Note that the same password will be used for SYS and SYSTEM. Oracle recommends the use of different passwords for each database account. This can be done after initial configuration: Confirm the password: Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]: Starting Oracle Net Listener...Done Configuring database...Done Starting Oracle Database 11g Express Edition instance...Done Installation completed successfully. SQL*Plus: Release 126.96.36.199.0 Production on Tue Sep 6 09:41:22 2016 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Express Edition Release 188.8.131.52.0 - 64bit Production SQL> PL/SQL procedure successfully completed. SQL> Disconnected from Oracle Database 11g Express Edition Release 184.108.40.206.0 - 64bit Production ######################### DATABASE IS READY TO USE! ######################### db_recovery_file_dest_size of 10240 MB is 0.98% used. This is a user-specified limit on the amount of space that will be used by this database for recovery-related files, and does not reflect the amount of space available in the underlying filesystem or ASM diskgroup. Starting background process CJQ0 Tue Sep 06 09:41:19 2016 CJQ0 started with pid=26, OS id=759 Tue Sep 06 09:41:24 2016 XDB installed. XDB initialized.
In line 9 you can see the autogenerated passwords.
When line 46 appears, you can connect to the database.
With following command you can change the passwords of SYS and SYSTEM:
sudo docker exec db220.127.116.11-xe /u01/app/oracle/setPassword.sh LetsDocker
You see following output:
SQL*Plus: Release 18.104.22.168.0 Production on Tue Sep 6 15:49:34 2016 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Express Edition Release 22.214.171.124.0 - 64bit Production SQL> User altered. SQL> User altered.
As long as you not remove or manually stop the container, it restarts with the virtualbox now via:
vagrant halt vagrant up
At the moment you cannot make your database instance data persistent for this container, I have opened an issue for this, but Gerald Venzl has promised to to implement this later.
Here you find the source code for this blog.
Here you find more about the topic “Virtual Development Server”.
Logging is a very useful feature of WebLogic.
Unfortunately the log levels, which are set after a clean install of WebLogic or some of the Fusion Middleware product creates a lot of noise and therefore it costs I/O performance.
Additional after analyzing an issue with logging often resetting the log level is forgotten.
Here you get a script to reset the log levels at regular intervals or after a trace session.
#!/usr/bin/python execfile('get_environment.py') connect(wlUser, wlPassword, wlAdminUrl) edit() loggers = listLoggers(target=managedServer, runtime=0) for key, value in loggers.items(): if key <> "" and key <> "ADF_PERFORMANCE_MONITOR_DATABASE" and value <> "": print "set " + key + " from " + value + " to <Inherited>" setLogLevel(target=managedServer, runtime=0, logger=key, level="") loggers = listLoggers(target=managedServer, runtime=0) exit()
In line 2 a script is called to initialize your environment variables wlUser, wlPassword, wlAdminUrl and managedServer.
In line 5 you get the list of loggers.
In line 6..9 you iterate over this list.
In line 7 you can add your own restrictions. Here are already filtered all inherited loggers and one special tool logger for performance monitoring of ADF applications.
In line 10 the loggers are shown again for the result, you can remove this.
Now call this script via
In the output you see similar output:
------------------------------------------------------------------------+----------------- Logger | Level ------------------------------------------------------------------------+----------------- ... oracle.ods.virtualization.accesslog | ERROR:1 ... set oracle.ods.virtualization.accesslog from ERROR:1 to <Inherited> ------------------------------------------------------------------------+----------------- Logger | Level ------------------------------------------------------------------------+----------------- ... oracle.ods.virtualization.accesslog | <Inherited> ...
This version of the script change only the persistent logger levels (runtime=0), because we don’t want influence running trace sessions. But as our servers are dayly started, all runtime log levels are resetted at this point to the persistent one’s.