Kamran Agayev’s Oracle Blog

Kamran Agayev’s Oracle Blog

Archive for June, 2010

RMAN Video Tutorial Series – Creating Duplicate and Standby database using RMAN

Posted by Kamran Agayev A. on June 25, 2010

In this video tutorial I show creation of duplicate and standby database using RMAN. Enjoy it

 

To download the .mp4 version of this file, use the following link

http://www.kamranagayev.com/Video_Tutorials/Duplicate_and_Standby_database_with_RMAN.mp4

Advertisements

Posted in RMAN Backup and Recovery | 33 Comments »

Exclusive Interview with Uwe Hesse

Posted by Kamran Agayev A. on June 15, 2010

 Uwe Hesse is an Oracle Certified Master (Database Administration 10g) and also Oracle Certified Professional (Database Administration versions 9i, 10g and 11g). In 2009, he got elected to the Oracle Leadership Circle, an internal award for the best Oracle Instructors from around the globe

Could u please provide answer to the following questions as follows:

  • Brief information about yourself and your family

I’m living in the west of Germany (near the Dutch boarder) together with my wife Mitra and our little daughter Donya. I was born in Bremerhaven, Mitra immigrated from Iran, where she was born in the north, near Azerbaidjan.

  • Your education

After my High School Diploma (“Abitur”), I had an education as Management Assistant in Informatics (“Datenverarbeitungskaufmann”).  Several years of work in the IT-Business followed, since 2000 employed at Oracle Corporation. Got a Masters Degree (MSc) in Management (Master Thesis in the Business Informatics area) from the Distance University (“FernUniversität”) in Hagen. Still studying there for my second Masters Degree (MA) in Education & Media

 

  • Your experience with Oracle. When you started first? Has it been interest of your side or just a coincidence?

I met my first Oracle Database (version 7.3.4) back in 1998, when I got employed at an Unilever daughter as mainly Developer (“Organisationsprogrammierer”) with the additional task to maintain the couple of Oracle Databases in place there. So it was rather incidentally.

  • What was the motive behind to prefer Oracle? Who you have been influenced by?

As I said, it was incidentally. If you don’t count dBase & Clipper, my first serious database was Oracle – if it would have been DB2, I would now be an IBM instructor, probably 🙂

 

  • What would your preference of profession if not Oracle?

That is meanwhile a little hard to imagine, but probably I would be a teacher in some other area, because this something that I really love to do.

  • What motivates you in your job?

I really enjoy teaching, especially if I can tell by feedback and observation, that my students do indeed benefit from it! It is much rewarding when I get in contact with a new audience and spot a familiar face from an earlier course – and the guy liked that former course.

 

  • Do you give lectures on Oracle?

Yes, obviously. It’s what I do for a living.

  • Have you authored any book in Oracle?

Yes, my Master Thesis about Oracle Database High Availability. It is going to be published soon, but only available in German language.

 

  • Do you manage with your time as to read books on Oracle? What is the name of the book that you read recently?

I do not read that many books anymore about Oracle to be honest. A very good one that I can recommend is the Oracle Data Guard 11g Handbook by Larry Carpenter et al.

  

  • What do you think on OTN forums?

A very useful place to go and spend some time if you are interested in Oracle Technologie. I am a regular visitor.

  • Do you refer to the documentation? And how often does it happen?

All the time! It is very good and a must read for anyone, responsible for Oracle Technology.

  

  • What is the biggest mistake you have ever made during your DBA career?

I make no mistakes, of course. At least, I cannot remember 🙂

 

  • What was your greatest achivement as an Oracle DBA?

That is the OCM degree – still proud of it.

  • What is you priority to manage the challenges you face?

My priority is always to deliver high quality courses, and I try to manage that with thoroughly preparation in technical & didactical respect.

  

  • How would you describe the essence of your success? According to your definition of success, how successful have you been so far?

I am successful if students benefit from my courses. Fortunately, we always get a feedback after the course – and I can tell you that my overall average score is well above 90 %. Based on these ratings & manager decision, we have an internal award at Oracle University: The “Leadership Circle” is granted to the best instructors in a worldwide quarterly election. In 2009, I was elected to it. This year, I got promoted to Senior Principal Instructor. That is the corporate international career level 5. It goes: IC1 (Junior instructor), IC2 (Staff Instructor), IC3 (Senior Instructor), IC4 (Prinicpal Instructor), then IC5. No higher level available, so I was as successful as I could possibly be 🙂 My next target should be Vice President now (kidding).

 

  • What are your best skills which make you differ from others?

I think I have kind of a talent to explain things in a clear & understandable manner and to spot the point of a technical matter. Many have great technical insight (OK, much more haven’t even), but few can explain what they know about complex technological things to others. Students don’t care much that you are an expert (even OCM) if they don’t understand what you are trying to tell them.

  • What’s your major weakness?

A tendency to perfectionism. If you ask my wife: Spending too much time with Oracle 🙂

  • Have you ever lost your spirit? If so, what has been the reason and how have you overcome it?

Fortunately not. Still very happy with my life & job!

  • What is the next success you would like to attain and your efforts to this end?

Next achievement will hopefully be my MA degree. If everything runs smoothly, I may even go for a PhD

 

  • How do you balance your daily life with your career?

I try to spend as much time with my family as I can. That is sometimes difficult, because I am often abroad for a week, teaching.

 

  • Please describe your one day summary of activities?

Course day: Teaching the whole day. Else: Preparing the whole day for the next course, studying (new) Oracle Technology.

 

  • How many hours do you work and sleep in a day?

A usual work day starts at about 8 AM and ends at about 6 PM. I need about 7 hours of sleep a day.

  • Where and how do you spend your daily, weekly and annual holidays?

That is very different. But we do visit Mitra’s family in Iran about once in 2 years regularly.

  • Do you think about Oracle during vacations?

Yes, I do, but only occasionally. Checking my emails from time to time, i.e.

  

  • Do you have time or motivation to go in for any sports? If yes, which kind of sport do you go in for?

I try to go to the gym regularly. Played some tennis and badminton, but I can’t find the time for it recently. I was a great chess addicted, when I was young 🙂

  

  • What’s your favorite meal and non-alcoholic drink?

Pizza! Does beer count as non-alcoholic?

  • What foreign languages do you know?

English (good enough to teach courses with), French (did not use it since I left High School), Farsi (just a couple of words)

  • What’s your average typing speed?

Too slow!

  • Have you ever get involved in politics?

No. I am a regular voter, though.

  • What are your hobbies? 

I’d love to find some time to play tennis again. When I retire, I will continue to play chess.

 

  • How do you spend your free time?

Strolling around with family, playing with Donya, visiting other family members

  • What’s your biggest ambition?

Think I am not so ambitious…

  • What would be your advice to the beginners in Oracle?

Go and visit an Oracle Database Administration Workshop from Oracle University at first to get a good foundation. Then practice a lot and try to keep in touch with new developments – which is by no means easy, because we develop new things at a high speed!

  • Would you like your children to follow in your footsteps or take a different path in life?

Donya will find her own way in life. I doubt that she will also become an Oracle Instructor – maybe she will become a doctor like her mother. But who knows?

  • Do you have any followers of you?

I do hope that the things a try to teach have an impact to some degree – but I would not be so immodest to call that “following”.

  

  • What is your vision on the future of Oracle?

I think the Corporation is still going strong and I don’t see why this should change in the near future.

 

Posted in Administration | 6 Comments »

Getting “ORA-01031: insufficient privileges” error with being granted a DBA role

Posted by Kamran Agayev A. on June 11, 2010

Sometimes, you can get ORA-01031: insufficient privileges error while querying a table even if you have been granted a DBA role. Look at the following demonstration

Create a user USR1 with CONNECT and RESOURCE roles

SQL> create user usr1 identified by usr1;
User created.

SQL> grant connect, resource to usr1;   
Grant succeeded.

Create a table with USR1 user

SQL> conn usr1/usr1
Connected.

SQL> create table tbl_usr1 (id number);
Table created.

Create the second user with DBA role

SQL> conn / as sysdba
Connected.

SQL> grant dba to usr2 identified by usr2;
Grant succeeded.

Connect with the second user and try to truncate the table. You’ll success, because you’ve DBA role!

SQL> conn usr2/usr2
Connected.

SQL> truncate table usr1.tbl_usr1;
Table truncated.

Now create a procedure and try to truncate the same table from procedure using dynamic sql

SQL> create or replace procedure my_proc
  2  is
  3  begin
  4  execute immediate 'truncate table usr1.tbl_usr1';
  5  end;
  6  /

Procedure created.

SQL> execute my_proc;
BEGIN my_proc; END;

*
ERROR at line 1:
ORA-00942: table or view does not exist
ORA-06512: at "USR2.MY_PROC", line 4
ORA-06512: at line 1

Upps.. We got an error. Although we have a DBA role granted, we need to explitily grant SELECT privilege to the user to access the table inside a procedure:

SQL> show user
USER is "USR2"
SQL> select * from usr1.tbl_usr1;

no rows selected

SQL> conn usr1/usr1
Connected.
SQL> grant select on tbl_usr1 to usr2;

Grant succeeded.

SQL> conn usr2/usr2
Connected.

Let’s try to truncate the table again:

SQL> execute my_proc;
BEGIN my_proc; END;

*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "USR2.MY_PROC", line 4
ORA-06512: at line 1

Now we got a different error. Although we have DBA role, we cannot truncate the table from procedure. For this, we need to explitily grant DROP ANY TABLE privilege to the user:

SQL> conn / as sysdba
Connected.

SQL> grant drop any table to usr2;
Grant succeeded.

SQL> conn usr2/usr2
Connected.

SQL> execute my_proc;
PL/SQL procedure successfully completed.

SQL>

As you see, we’ve succeeded. It means that to be able to perform operations in a procedure, we need to be granted those privileges directl

Posted in Administration | 1 Comment »

I’m an Oracle ACE :)

Posted by Kamran Agayev A. on June 7, 2010

 

  Last month (on May 3, 2010) I got a call from one of my best friend, reviewer of my RMAN book and a man who nominated me for the ACE award – Syed Sabdar Hussain – that I was awarded an Oracle ACE title. I can proudly announce that I’m the first and the only Oracle ACE in my country, Azerbaijan 🙂

You can view my ACE profile from the following address:

http://apex.oracle.com/pls/otn/f?p=19297:4:2391572447992081::NO:4:P4_ID:2080

Posted in Administration | 15 Comments »