The Problem
It is said impossible to use graphical tools like Enterprise Manager in Vagrant. Using Vagrant's Port Forwarding does make it possible.
On your host you are able to monitor your Oracle12c databases with the standalone EM Express like that:
On your host you are able to monitor your Oracle12c databases with the standalone EM Express like that:
click on the pictures to enlarge
EM Express running on the host |
Note the typical https port 5500. EM Express is running fine on the host.
But how do we tell your browser to execute EM Express on the guest VM ?
The Solution
Remember the line in the Vagrantfile config.vm..network "forwarded_port", guest: 1521, host: 11521. If your browser opens a page https://thinkpad3:5510/em that should work.
The Solution
Remember the line in the Vagrantfile config.vm..network "forwarded_port", guest: 1521, host: 11521. If your browser opens a page https://thinkpad3:5510/em that should work.
Note the same hostname with the port 5510. And see the different output of the SqlMonitor.
By the way: you can set / get httpsports with a little script, e.g. httpsports.sql
Beware: DBMS_XDB_CONFIG is availiable as of Oracle12c. You call this script like that:
Conclusion: The preceeding is the proof of concept - or qed as the ancients used to say.
1 comment:
Vagrant port forwarding is so cool. You gain the experience of your guest VM acting as being your local machine without your host being affected in any way. You can throw away your guest anytime. If you need it anytime later just go vagrant up and you're all set again.
The common use cases are to forward http services like apache2 but you can do the same for any tcp service, e.g. Oracle TNS (port 1521), MySQL (3306).
By the way, i find setting up port forwarding with vagrant so much easier than with the VirtualBox UI or VBoxManage.
Post a Comment