Monthly Archive: February 2016

Houston – we have deleted all SYS DBMS_SCHEDULER Jobs !

Bad, bad PL/SQL….

A customer of me has executed a simple script to cleanup DBMS_SCHEDULER jobs and programs for an application. Unfortunately he did as user SYS. The content of the SQL script:

All the Oracle internal maintenance jobs and programs like the AUTO_SPACE_ADVISOR_PROG, GATHER_STATS_PROG, FILE_WATCHER_PROGRAM are deleted.

On a single instance database on Linux are per default 19 DBA_SCHEDULER_JOBS and 10 DBA_SCHEDULER_PROGRAMS pre-configured.

Oracle has a MOS note called  How to Rebuild DBMS_SCHEDULER Default Jobs and Autotasks (Doc ID 2089546.1) – but this note is old and incomplete. It does not help to rebuild all the jobs and programs in a database.

After some discussions with My Oracle Support, this way here works to rebuild the jobs. Unfortunately it’s an “offline” task, you have to restart your database in UPGRADE mode. But it works.

1. Make sure that you have a Backup of your Database

2. Restart the Database in UPGRADE Mode

3. Run these Commands as SYSDBA in Order to recreate the missing Scheduler Jobs

All jobs except XMLDB_NFS_CLEANUP_JOB are re-created now. To rebuild the XMLDB_NFS_CLEANUP_JOB you can execute this command as user SYS in SQL*Plus. It’s just an extract from the file ?/rdbms/admin/xdbu102.sql which creates the required job during the regular instance creation process.

4. Restart the Database

5. Run these Queries to verify invalid Objects

6. Verify that DBMS_SCHEDULER Jobs are back

7. Verify DBMS_SCHEDULER Programs are back


Deleting the SYS DBMS_SCHEDULER jobs is one of these mistakes which can be easily repaired. But during the rebuild action, the database is not available for the end users and this is bad. I’m looking forward that there will be an online solution available maybe in the future.

Another approach could be to execute a FLASHBACK QUERY against the dba_source view to get the DDL for the missing jobs and programs before the delete action. But this has to be tested first.

From the Command Line into the to the Oracle Cloud – the ORACLE-DBCS-CLI Utility

The Oracle ORACLE-DBCS-CLI utility is a command-line interface tool to manage the lifecycle of your Database as as Service instances in You can create and delete instances, verify and apply patches, scale your instances up and down and many more. The advantage is that you can work with configuration files. And I like to work with such files, if I need 10 instances with the same shape, I have only to search and replace the instance name – fire!

The ORACLE-DBCS-CLI utility is available for Unix platforms at the moment. I have installed ORACLE-DBCS-CLI on a Oracle Linux 6.5, JDK version 1.7 or higher is required.

Download and Documents

The software can be downloaded here:

The  ORACLE-DBCS-CLI documentation starts here:


After download the software has to be extracted on target server. My install directory is /u00/app/oracle/tools/dbcs-cli/ – take care about the release number.

What you get:

The dboplan.dat.tmpl is a template file which contains all required variables for working with For some actions you only need a subset of them.

Get Domain Information

To gather information about your created instances, you need this four parameters.

sm_url Endpoint URL – Attention: for EMEA it’s and not as written in the documentation
user_name Your user name
password Your password
identity domain Your identity domain – e.g. trivadis4703


For this action, I have created a small configuration file which contains these four lines:

Now I can execute ORACLE-DBCS-CLI with the configuration file, all my instances in the specified domain are listed:

Get Patch Information

For this action you need your cloud SSH key and the host, IP does also work if the host name is not resolved by DNS, /etc/hosts etc.

Creating a new Instance

It is very easy to create a new instance, but here you need the full content from the configuration template. I have created my own template called cloud10.dat to create an instance with shape OC3 and no backup, a new ssh key will be created and uploaded by the ORACLE-DBCS-CLI. I have specified these parameters, all other I let them on default values:

sm_url Endpoint URL – Attention: for EMEA it’s and not as written in the documentation
user_name Your user name
password Your password
identity domain Your identity domain – e.g. trivadis4703
vm_name Your new instance name – e.g. CLOUD10
vm_shape Your shape – e.g. OC3
db_sid Your SID – e.g. cloud10
db_dbname Your DB name – e.g. cloud10
db_passwd Your SYS password – it have to contain a numer, a # or a _ character
db_bkup_disk Backup = No


Executing ORACLE-DBCS-CLI with my Configuration File cloud04.dat

Unfortunately there is no logfile available, but If you have set a wrong shape or a too simple password, you will get an error.

That’s all folks – in you can see now that your instance will be created immediately.


My Template cloud04.dat


The ORACLE-DBCS-CLI Utility is a great tool to manage the lifecycle of your Oracle cloud instances in th CLI. With a small set of templates and configuration files, you are able to manage your cloud instances without any browser.

Oracle Enterprise Manager 13c – Tail your Logfiles

This are my favorite aliases for Enterprise Manager 13c troubleshooting. Just replace $ORACLE_BASE with your own installation directory and add these aliases in your .profile/.bash_profile.

Here is the URL to the Oracle documentation: – and feel free to create your own aliases e.g. for the *.OUT logfiles.

Oracle Management Server


Weblogic AdminServer

Weblogic EMGC_OMS1 Managed Server

Weblogic BIP Managed Server


Do you need a Mailserver for Testing Purposes? Communigate Pro!

When I am testing Oracle and other software, I want to verify functions like sending alert mails. On Linux systems it’s easy. The most distributions have packages like sendmail already preconfigured and ready to use. But for example on Windows systems, there is no built-in solution. The goal was to have a small virtual machine running as mailserver which can be used for all my test cases.

CommuniGate Pro

CommuniGate Pro is a groupware which supports a lot of solutions like SMTP, POP3, Webmail and many more. In this post I describe how you can easy install the software and configure the SMTP component in Oracle Enterprise Linux 6.

The goal is to use CommuniGate Pro for the Enterprise Manager 13c to send mail alerts. Note: If you want to use CommunigatePro in your company, then you have to license it.

Software Download

The Software is available for the most platforms here:
Link to the installations guides:


I use the rpm file which I have already transferred to my server into directory /tmp. The installation has to be done as user root.

The software is now installed in directory /opt

The installation routine creates the runlevel startup script that the software will be started automatically during server boot.

If you have already mail solutions like sendmail or postfix up and running, you have to stop and disable it.

Oracle Linux 6 – Stop postfix

Oracle Linux 6 –  Stop Sendmail

Start CommuniGate Pro

You can a) reboot your server or b) start it manually:

Web Access Configuration – Step by Step

Initial Configuration:
Quick Start:

When the server is started, you can now access the web GUI by server URL and Port 8010.

Step 1 – Master Password

Set master password for user postmaster – I agree.


Step 2 – Server Name and Interface Mode

Verify server name and language, set interface mode to Advanced –  Update.


Step 3 – Create Account

Tab Users – insert new account name –  Create Account.


Step 4  – Set Real Name and Password

Set the Real Name and the CommuniGate Password for the new created user – Update.


Step 5 – Add Client IP

In tab Settings – Network – Client IPs add your client ip address or address range – Update.


Configure Client – for Example Oracle Enterprise Manager 13c

Set Host, User Name and PasswordOK.


Now you will receive the messages from EM13c.




With telnet you can verify if the correct SMTP service is running on port 25 and if the firewall is open.

Wrong Service

Right Service


Communigate Pro offers you an easy to configure SMTP platform. I have configured a small virtual machine which I start whenever I want to test some email functions.

Sure, this software can do much more. But all I want is to send emails from my test servers – Mission accomplished!