Wednesday 20 April 2016

What is the worst thing happened to you as an oracle DBA and how you solve it ?



The question is 'what's the worst' not 'what disasters have you experienced'.

If you've not had a disaster, feel lucky. But in DBA terms, one year of experience is practically nothing (especially as most of that time will almost certainly be 'shadowed' by a more senior DBA).

Golden Note : You say the truth "Nothing" and  the interviewer will think you are just there to bring coffees and update your facebook profile during the whole day!  

The Question is a trap and it's not easy to answer. It will measure how you handle pressure, how you take responsibilities, how fast you can react.

I do not recommend you to create a fictional story. I believe honesty is golden. On the other hand, if you said "nothing", in the rest of your interview, you should point your strengths about these areas. You may talk about how you worked under pressure, how you fixed problems in a timely-manner,  etc.

I would have thought that the worst possible case is database toast due to a media failure with multiple backup failures resulting in an inability to recover the database from any means at all. A long-running logical corruption would be probably my second 'choice', though...


As you reach higher, get deeper knowledge there are chances that you may blunder in your job and db may be completely lost for ever, but at that level there are chances you will meet those fellows who have also encountered the same scene and may resolve the issue.

 A person who is having 1 or 2 year experience can't damage the db at that level which cann't be recovered, even due to his ignorance because ignorance and intention can be judged.  What he/she can blunder something dropped table, wrong comited data; something which can be recovered by either backup or simply re-installation of software on the cost of some data loss.

While at higher level, DBA may use underscore parameter, some block level investigation, some misconfiguration with dictionary objects which may means ORA-600, 4031 and now Only Oracle Support is the way to get back db.

Last Thing :

The worse case is dealing with an unknown problem - where Metalink and Google do not turn up a single reference or hint as to what the cause is. And then, after a lot sweat and effort and frustration discovering the problem lower down, in the o/s, hardware, storage system, or network infrastructure.

Pro Tip :

Problems are good teachers. So why not create your own using a test instance? There's a lot you can play with, destroy and try to fix, using your own test instance. Kind of like training hard and fighting easy (an old infantry motto) - rather pick up practical skills and knowledge like that.

Just try to understand the basics and the importance of features...learn as much as possible and try to test....scratch, build..... This experience gives your idea to answer such type of questions.


Follow us on Facebook..!!


Click here to Join Our Blog and Stay Updated 

 

See Also : Most Useful Tips for DBA Interview

Tuesday 19 April 2016

How To Change The Define IP In Linux



Login with ROOT user : 

At command prompt type –  #setup

Go to  – Network configuration

edit  – device

go to  – etho (etho) – Realtek semiconductor Co., Ltd

then hit enter and it will go to Devernet Configuration

Static Ip 172.100.151.49(here put the ip)

Netmask 255.255.255.0

default gateway Ip 172.100.151.1

then after saving all at command prompt
service network restart
then reboot there server

Monday 18 April 2016

How do you purge old archivelogs which are applied on Standby DB



 Is there a command in RMAN for standby db  which list the old archivelogs that has been applied and can be deleted ?


SOLUTIONS :

In a dataguard configuration, the archivelogs from the FRA will be automatically purged when the following conditions are met by the database. If you need it purged in at the Primary site, set it on Primary database.

1) Prior to 11g, if not using mandatory archivelog destinations, the database (primary and standby) must be restarted with the following parameter:

 SQL> alter system set "_ log_deletion_policy"='ALL' scope=spfile;  



2) configure the following parameter in RMAN (primary and standby):
 RMAN> CONFIGURE  ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;  




3) Use Below Script
 $ cat delete.sh  
 [oracle@ora-db u01]$ cat delete.sh  
 ORACLE_HOME=<ORACLE_HOME path>  
 export ORACLE_HOME  
 PATH=$PATH:$ORACLE_HOME/bin  
 export PATH  
 rman target sys/<pwd>@<standbydb> <<EOF  
 spool log to "/u01/delete.log";  
 run  
 {  
 delete force noprompt archivelog all completed before 'SYSDATE-4';  
 }  
 EXIT;  
 EOF  





This would delete all the archives before SYSDATE-4. If this does not work, then you can try deleting them by checking the sequence that was last applied and delete until that sequence using RMAN.

4) The archivelog must have been applied to the standby. Run the following query to list all archivelogs applied to the standby:
 SQL> select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;  



 Now,
 RMAN>delete archivelog until sequence <above value>;  


5) If on the primary site, the archivelog must be obsolete per RMAN retention policy
To list the obsolete objects, run the following query:
 RMAN> SHOW RETENTION POLICY;  
 RMAN>REPORT OBSELETE;  


RMAN> SHOW RETENTION POLICY;
RMAN>REPORT OBSELETE;



6) On Primary
 RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;  
 On Standby ( Depends upon where backup is preformed )  
 RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; 
 
 Or 
 
 RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY; ( if Standby Where Backups Are Not Performed )  






REFERENCES

NOTE:740322.1 - RMAN Archived Redo Logs Are Deleted Before Being Applied at Standby Database

BUG:6216036 - RMAN+DG ARCHIVELOG DELETION POLICY APPLIED ON STANDBY NOT RESPECTED