Showing posts from November, 2018

Automatic restart in Grid Infrastructure for Far Sync

Checking if the Far Sync instance is configured to restart automatically after reboot / shutdown of the host / cluster:
$ crsctl stat res ora.fdb1.db -f |grep AUTO_START
AUTO_START=restore "restore" means that after restart, the database will remain at the previous state it was before.
Changing the cluster to startup the database in any case.
$ crsctl stat res ora.fdb1.db -f |grep AUTO_START
AUTO_START=always Changing database to start always after reboot
$ crsctl modify resource ora.fdb1.db -attr  AUTO_START=always -unsupported Modify the startup state:
$ srvctl modify database -o mount View modified configuration
$ srvctl config database -d fdb1 -all
Database unique name: fdb1
Database name: fdb1
Oracle home: /oracle/product/
Oracle user: oracle
Password file:
Start options: mount
Stop options: immediate
Database role: FAR_SYNC
Management policy: AUTOMATIC
Disk Groups: DATA
Database is enabled
OSDBA group:
OSOPER group:

Query Historical messages of RMAN

Hi, Recently I realized that this very small and useful feature of RMAN is not known to many of us.
I have just learned about this option just two years ago.
I am talking about the ability to query from database (in-memory view) 32768 lines of RMAN output, even if it was used by crontab or any 3rd-party vendor.
So it is a sample sql command from v$rman_output, in the following example I filter just the last 7 days.
SQL>  col OUTPUT for a135 trunc
SQL> set pages 0
SQL> select output from gv$rman_output where session_recid in (select session_recid from v$rman_status where start_time > sysdate-7) order by recid ;
connected to target database: PDB11 (DBID=3890652951, not open)

crosscheck archivelog all;
delete noprompt archivelog like '+DATA%';
delete noprompt archivelog like '+RECO%';
delete noprompt archivelog like '/DB%';
delete noprompt obsolete;
crosscheck copy;
delete noprompt expired copy;

using target database control file instead of reco…

My impressions from Oracle OpenWorld 2018

Hi, This was my third time at Oracle OpenWorld, and still I was thrilled like the first time. Howard Street was dressed in big, red banners everywhere—just take a picture and share it in a social network.

This time I was also there as part of the Oracle ACE program, a community of Oracle experts and advocates. We all met on several occasions during the conference, giving me the opportunity to meet in person with the people I follow and whose sessions I attend.  

This year’s main keynote by Larry Ellison was about Oracle Generation 2 Cloud, which was built from the ground up for better performance, pricing, and security. I assume that Oracle’s architecture is indeed better than the competitors, as Larry kept saying, because Oracle hired the best minds in the industry - people with deep experience in cloud technology - to build Generation 2. I just hope that Oracle’s implementation will be as good as its design. Oracle announced that version 18c, and later 19c, will be fully independen…

Orphaned Files in ASM

In our lab environments we test Data Guard on a daily basis, and we frequently “play” with failover, switchover, and flashback . The output of this playground is that we have some leftovers in the ASM; we call these leftovers orphan files.
To solve this, I created SQL to query ASM views against database views.
This query should run on the database (not ASM).


   cmd   CLOB;
   FOR c IN (SELECT name Diskgroup
               FROM V$ASM_DISKGROUP)
      FOR l
         IN (SELECT 'rm ' || files files
                    (SELECT '+' || c.Diskgroup || files files, TYPE
                       FROM (    SELECT UPPER
                                           SYS_CONNECT_BY_PATH (, '/')

Data Guard Broker 19c

In an earlier version of Data Guard, when the broker had problems, one of the automatic answers I got from support was to recreate the broker configuration.
In other words:
Drop the configuration. Create the configuration. If your broker is simple, this is not a huge request. Actually, you could follow Step By Step How to Recreate Data Guard Broker Configuration (Doc ID 808783.1).
But in my case, using Active Data Guard with Far Sync, with many fine-tuned configurations, it was not so convenient. I had a number of ways I tried to be efficient:
I could write down all broker commands - to be able to run them again next time.For versions and, I found a way to query the broker and re-create a current configuration creation script (Extract Data Guard Commands).I also had some issues trying to Drop/remove Far-Sync Configurations from broker 12.1.On version, I found out that the broker metadata was changed, so I had to update my previous script for Extract Data …