Showing posts with label Interview Questions. Show all posts
Showing posts with label Interview Questions. Show all posts

Tuesday 2 August 2016

Frequently Asked Interview Questions for 2+ Candidate


::     Frequently Asked Interview Questions for 2+ Candidate   ::

Experience Level  :  2 -3 years

What is main purpose of CHECKPOINT?
A Checkpoint is a database event, which synchronizes the data blocks in memory with the datafiles on disk.
A checkpoint has two purposes:
1. to establish data consistency
2. Enable faster database recovery

The following are the parameter that will be used by DBA to adjust time or interval of how frequently its checkpoint should occur in database.
LOG_CHECKPOINT_TIMEOUT = 3600;                                // Every one hour
LOG_CHECKPOINT_INTERVAL = 1000;               //number of OS blocks.


What does RESETLOGS option do?

1. Creates a new incarnation of the database, putting a new SCN in all data file headers.
2. Reset Log Sequence number to 1
3. Reformats ONLINE REDO LOGFILES if they exists


In what scenarios open resetlogs required ?
An ALTER DATABASE OPEN RESETLOGS statement is required,
1. after incomplete recovery (Point in Time Recovery) or
2. recovery with a backup control file.
3. recovery with a control file recreated with the reset logs option.


What to do if my Global Inventory is corrupted ?
No need to worry if your global Inventory is corrupted, you can recreate global Inventory on machine using Universal Installer and attach already Installed oracle home by option
-attachHome
./runInstaller -silent -attachHome -invPtrLoc $location_to_oraInst.loc
ORACLE_HOME=”Oracle_Home_Location” ORACLE_HOME_NAME=”Oracle_Home_Name”
CLUSTER_NODES=”{}”


Oracle version 11.2.0.4.0 what does each number refers to?
Oracle version number refers :
11 – for Major database release number
2 – for Database Maintenance release number
0 – for Application server release number
4 – for Component Specific release number
0 – for Platform specific release number


What is Row chaining and how can you find it? and how you will resolve the issue ?
When you are inserting record if a row is not fit into the single block… it will chain across multiple blocks leaving  a pointer between these  blocks.

Find using below query
SQL> analyze table <owner>.<table_name>;

SQL> select table_name,chain_cnt from dba_tables where table_name=’tablename';

To Overcome :
create a table with bigger the block size
1) Create tablespace tbs1 data file ‘/u01/oradata/test/data01.dbf’ size 100m blocksize 16k;
2) alter table tablename move to tbs1;
Here tbs1 is the tablespace name with larger block size and  before creating tablespace it is assumed that you have created a db buffer cache for it.

What is row migration? When does it occur? Where can you find this information?
Row migration happens when update occurs at one column and the row is not adequate to fit in the block then the entire row will be moved to the new block.

Find using below query
SQL> select table_name,chain_cnt from dba_tables where table_name=’tablename';

To Overcome :
-set pct_free storage parameter for table to adequate value


Do you know about statistics , what is the use of it? What kind of statistics exists in database?
Statistics is a collection information about data or database
There are different types of statistics that oracle maintains-
1)System-Statistics: statistics about the hardware like cpu speed,I/O speed,read time write time etc : select * from aux_stats$
2)Object statistics : For a table oracle collects the information about no.of rows,no.of blocks,avg row length etc.We can view
SQL>select table_name,num_rows,blocks,avg_row_len from dba_tables
for index oracle collect statistics on index column about no.of rows,no.of root blocks,no.of branch blocks,no.of leaf blocks,no.of distinct values etc.

See also

Interview Questions for 2+ Year experienced Candidates

Interview Questions on Architecture for 1+ Experienced

DBA 1+ year Interview 

General Tips to Prepare for an Oracle DBA Job Interview *Popular*

 

FREE Sign-Up with Gmail and Receive Pdf's and Updates via Mail -Click Here


 

 

 

Monday 4 July 2016

Quick Troubleshooting Steps for Daily Activities









How to detect locking issues in Database ?
-During this,, you need to find Locking sessions and Kill 1Session among those

Sql>select a.SID "Blocking Session." ,b.SID "Blocked Session" from v$lock a, v$lock b 
       where a.SID != b.SID and a.ID1 = b.ID1  and a.ID2 = b.ID2  and b.request > 0  and a.block = 1;
                 
   Blocking Session.      Blocked Session
                    -----------------            ---------------
                  56                             83

Process for Killing the session
Sql>select sid,serial# from v$session where sid=56;
Sql> alter system kill session '56,83';



How to Relink the oracle binaries
-Run the below command
$ORACLE_HOME/bin/relink all



How to gather Instance hang analysis data
-Use the Oradebug utility
$sqlplus –prelim / as sysdba
Sql>oradebug setmypid
Sql>oradebug unlimit
Sql>oradebug hanganalyze 3

Open another terminal
$sqlplus –prelim / as sysdba
Sql>oradebug setmypid
Sql>oradebug unlimit
Sql>oradebug dump systemstate 256



What will you do, If sqlplus executable is corrupted then
-Run these below commands
$cd $ORACLE_HOME/sqlplus/lib
$make –f ins_sqlplus.mk install


What will you do, If lsnrctl utility is corrupted then
$ORACLE_HOME/network/lib
$make -f ins_net_server.mk install



IF oracle, exp, imp, sqlldr, tkprof utilites are corrupted then
-run these below command
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk install


How to check the detailed error message
-using the ‘oerr’ Utility
$oerr ora 0600


What is ADR (Automatic Diagnostic Repository) ?

In 11g user_dump_dest,core_dump_dest,background_dump_dest are replace by diagnostic_dest

Sub-dirs under diagnostic_dest 
       
  Alert rdbms incidents

  The Alert log file are in two format
  Log.xml
  Alert_<SID>.log

  adrci Utility is used to see the content of alert-log or incident details
 -below are the commands 
  $ adrci
 
  Adrci>show alert
  Adrci>help
  Adrci>show incident

Saturday 25 June 2016

General Tips to Prepare for an Oracle DBA Job Interview





Preparing for an interview beforehand is preferred as it helps to avoid stressful situations during the process. In this article, I will provide several tips on how one should prepare for a DBA job interview.

It's important to pay close attention to body language, tone of voice and overall behavior. 

Interview mark that... Does the person seem happy or stressed out or depressed? .... It may be a good indicator of how you’d feel working there.

In the Technical Interview ...

Technical questions are a must. These help the employer in judging the skills of the candidates.

Answer technical questions as briefly and accurately as possible

These questions will be based on the nature of the job applied for. There are certain essential factors that should be kept in mind while answering them. For instance, the way the answers are presented, the confidence level, the candidate’s knowledge about the industry and the latest technical knowhow are some of the important factors in this regard.

Think about exactly what it is they’re asking for.  You need to show that you can stay focused.

Try to avoid filler words like uh, um and other verbal pauses. The key is to take a little time before you answer to organize your thoughts and have a clear outline of what you’ll say before you speak.

Try to avoid talking with your hands.



They may also ask Questions like...
Tell me about a difficult problem you had to solve successfully.
Tell me about a recent failure / difficulty working with another person.

Be prepared for these kind of Questions. I will describe this in my next post


You must ask Questions in the end of the Interview

-             Ask about the Responsibilities – is the job more production or development?

-         Why is the position open? Again, this ’ll give you a feel for the place. Did they fire the last person, are they expanding? If given an intentionally vague answer, you might want to keep looking.

         Expectations – how is performance evaluated? What is the management style like?

-          Training opportunities, especially for learning new versions of the database software.

“I would like more information on…what are the key responsibility areas of my job profile ”
U can ask, what’s the environment u are working.
U can ask about the company about the profile .
Ask About, what will be your profile/role that u are going to take up.
What work they will expect from you.
Will you be working in team or not.
How many DB’s etc , etc

These kinds of questions are important for two reasons:
The first is to get an idea of what it’s like to work there, and the second is to get a feel for his/her personality.

You may find that the work environment isn’t what you want, or that you wouldn’t like working with that person.
Towards the end of the interview, be sure to express your gratitude and interest in the position, as well as summarize any strong characteristics/experience that pertain to the job.

What not to do..

·         You could be the most knowledgeable DBA in the universe, but if your personality is a poor fit, you’re not going to get the job. It’s also important to think about customer service questions and answer those properly. 

            Most DBA positions involve interfacing with end-users of some kind, and the ability to explain difficult concepts and have a good sense of customer support is critical.

·         Don’t fight with the interviewer, or try to make excuses. Be respectful and polite at all times.

·         Don't Act superior. Even if the job is for less pay or less responsibility, it’s never okay to be superior.

·         Do not Dominate the interview with grandiose stories of how awesome of a DBA you are.
An interview at its core is a conversation, so there should be some give and take


Post Interview Things..
It’s important to do a follow-up thank you correspondence, mostly by email .
In it you want to address the interviewers by name and thank them again for their time.

There you have it, all of my knowledge on how to survive the DBA job interview.
Please keep in mind, these are my opinions and experience, your mileage may vary.

Good luck …!