Linux Locking using flock

I am faced with a situation on how to creating locking mechanism for RMAN backup.

Script dbf.sh backups database and can be run simutaneously if it’s not for the same database.

Hence dbf.sh sh running for PROD1 & PROD2 at the same time is VALID and running for PROD1 & PROD1 at the same time is NOT VALID.

While dbf.sh is running, arc.sh (backup archivelog) should not be running.

This was instigated (more...)

Not Another dbms_redefinition Post

If you follow me on twitter at all, then you will realize I often rant about how demos are too simplify and does not represent real world issues.

Please allow me to demonstrate how to partitioning an existing table using DBMS_REDEFINITION.

In the real world, how tables are there without foreign keys?

What happens if there are transactions underlying the table during redef?

What happened to the NOT NULL constraints?

I really like how Oracle (more...)

Warning: standby redo logs not configured for thread – BUG

Surprise to find the following error for single instance Data Guard environment:

    Warning: standby redo logs not configured for thread 3 on boston

 

This will be fixed with an upcoming patch for the existing issue in Oracle Database 12.1.0.1.0 – good reason to stay up to date on patching?

Also, the number of Standby Redo Log Groups do not match since thread = 1 is being used.

Not *ALL* SRL have thread (more...)

Part1 Configuration Evodesk

Installation was not bad.

Evodesk is the 2nd company I am aware of for using recesss nuts for desktop installation.

This makes much more sense than using wood screws.

However, pondering if Evodeskk will be the first company to used recess nuts for all components and get rid of wood screws.

Don’t you think the legs make  great towel rack?

install1

install2


First Impression for Evodesk Desktop Unboxing

Disclaimer: I am not being paid by anyone to write positive or negative review.

Opinions are my own based on my limited engineering background.

First, packaging is somewhat poor and could be much better for a desk costing close to $1,000 ($886 for my configuration).

Tape coming off.

badpackaging2

I hope my desktop is okay.

badpackaging1

Taking a look inside. Is that a tiny scratch I see?

badpackaging3

After opening the desktop, this is the torn location – (more...)

Find Contents of RMAN backuppiece

RMAN backuppiece listings from OS

oracle@arrow:hawklas:/home/oracle
$ ll /oradata/backup/
total 216088
-rw-r-----. 1 oracle oinstall  1212416 May  5 11:06 DBF_HAWK_3130551611_20150505_hjq65thu_1_1_KEEP
-rw-r-----. 1 oracle oinstall 50536448 May  5 11:07 DBF_HAWK_3130551611_20150505_hkq65thu_1_1_KEEP
-rw-r-----. 1 oracle oinstall 39059456 May  5 11:07 DBF_HAWK_3130551611_20150505_hlq65thv_1_1_KEEP
-rw-r-----. 1 oracle oinstall  5529600 May  5 11:07 DBF_HAWK_3130551611_20150505_hmq65tie_1_1_KEEP
-rw-r-----. 1 oracle oinstall  1785856 May  5 11:07 DBF_HAWK_3130551611_20150505_hnq65tit_1_1_KEEP
-rw-r-----. 1 oracle oinstall    98304 May  5 11:07 DBF_HAWK_3130551611_20150505_hoq65tjd_1_1_KEEP
-rw-r-----. 1 oracle oinstall     2560 May  5 11:07 DBF_HAWK_3130551611_20150505_hpq65tjf_1_1_KEEP
-rw-r-----.  (more...)

Backup file using copy with date append

How many ways are there to backup a file? Copy and append .bak, .sav, .orig, etc …

I was looking for a simple, yet elegant way to do this.

Good thing for Google (disclaimer I do own the stock), I came across this blog – http://blog.justin.kelly.org.au/how-to-copy-file-and-append-current-date-in-l/

Demo:

oracle@arrow:hawklas:/home/oracle
$ ps
  PID TTY          TIME CMD
 4343 pts/1    00:00:00 bash
 6915 pts/1    00:00:00 ps

oracle@arrow:hawklas:/home/oracle
$ ls -l logdump*
-rw-r--r--. 1 oracle oinstall  (more...)

In Search of Standing Desk

I came across Evodesk Standing Desk Review
http://www.workwhilewalking.com/evodesk-standing-desk-review

Could not resist the temptation but reach out to @TreadmillDesker
You bark loud but how is ThermoDesk ELITE better EVODESK other than motor? $477=1333-886 is a lot for a motor. Let’s see pic.

Here is the respond I got back.
Thanks for the question! lab test of the Evo’s base concluded: slower speed, louder motors, and instability at taller heights.

Notice the respond was very (more...)

Find Users with DBA Roles

This sounds like a simple request doesn’t it?

Simple if there are no roles which are granted DBA role and allow me to show what can go wrong.

Create ROLE “secret”, Grant DBA to “secret”, Grant “secret” to USER “michael”

ARROW:(SYS@hawklas):PRIMARY> create role secret;

Role created.

ARROW:(SYS@hawklas):PRIMARY> grant dba to secret;

Grant succeeded.

ARROW:(SYS@hawklas):PRIMARY> grant secret to michael identified by michael;

Grant succeeded.

ARROW:(SYS@hawklas):PRIMARY>

When a simple SQL is used, “secret” is a ROLE NOT USER.

 (more...)

Be Careful when using FRA with Streams

Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 – 64bit Production

select state from gv$streams_capture;

STATE
----------------------------------------------------------------------------------------------------------------------------------------------------------------
WAITING FOR REDO: LAST SCN MINED 442455793041

select thread#, sequence#, status
from v$archived_log
where 442455793041 between first_change#
and next_change# order by 1,2;

   THREAD#  SEQUENCE# S
---------- ---------- -
	 1    1070609 D
	 1    1070609 D
	 1    1070609 D
	 1    1070610 D
	 1    1070610 D
	 2    1153149 D
	 2    1153149 D
	 2    1153149 D

8 rows selected.

(more...)