Below are some of the Oracle DBA Basic Interview Questions Part C for both fresher and Experienced DBA.
Q1. How to check opatch applied or not in our Oracle home?
Answer: Run opatch to get the details.
$ORACLE_HOME/OPatch/opatch lsinventory
$ORACLE_HOME/OPatch/opatch lspatches
Assuming Oracle Home path = /u01/app/oracle/product/dbhome_1
Set environment as follow:
export ORACLE_HOME=/u01/app/oracle/product/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export PATH=$ORACLE_HOME/OPatch:$PATH
opatch lsinventory This will give detail of all the patches applied
opatch lspatches This will give details of the latest patch applied.
Q2. What is sqlnet.ora ?
Answer: It is used to security of our database, Privileged IP address only able to access the database.
Q3. what are the different components of physical and logical database structure?
Answer:
- physical: Datafile,Controlfiles, redologfiles.
- Logical: Database buffer cache, Redo log buffer cache,Shared pool,large pool
Q4. What is Database Writer (DBWR)?
Answer: It is responsible to writing data from database buffer cache into datafiles.
Q5. What is a listener process?
Answer: It is network connectivity, Application and sql developer tool to access database. Lietener.ora and Tnsnames.ora files are used.
Q6. What is the difference between SPFILE and PFILE?
Answer:
- Spfile: Server parameter file of binary file, It contains all the information for setting the database initialization parameters. SPFILE permits dynamic changes without requiring you to restart that instance.
- Pfile: It is text parameter file, information for setting the database initialization parameters.
Q7. What is the purpose of collecting statistics?
Answer: It will help optimizer to generate best execution plan
Q8. What is an Oracle index?
Answer: It is an database object used to increase the performance for retrieval data.
Q9. If the table is fragmented, how would you rebuild it?
Answer: Alter table tablename move, We can analyze the table.
Q10. What are the different tools that are provided by Oracle to assist performance monitoring?
Answer: AWR,ADDM,Trace,TKPROF,OEM
Q11. What is an explain plan and how does it help in optimizing the SQL Query?
Answer: We will check if query is using proper indexes are not. If not we will either create new indexes or can use hints to specify which indexes to use.
Q12. How to analyze AWR report and ADDM report.
Answer:
- AWR: AWR report mainly we have to analyze query elapsed time and executions.
- ADDM: It is a utility helps in providing some recommendations based on the statistics collected every hour
Q13. If performance issue will occur, What are the actions need to take ?
Answer: We need to take AWR report and check query elapsed time and how many executions, Query using proper index or not, or elase we have to analyze table and indexes.Check alertlog any issue occurred
Q14. What are the different types of backups that are available in Oracle?
Answer:
- RMAN
- Datapump,Exp/IMP
- Cold backup
Q15. RMAN full backup was failed due to archivelogs error, What we will do ?
Answer:
- We need to crosscheck the archivelogs.
- crosscheck archivelog all;
- delete expired archivelog all;
Q16. How do you identify which sessions are locking the objects? What is the way to clear them?
Answer: By combining V$locked_object and v$session
Q17. Till yesterday a query is giving output in 1 min. today it is taking 5 min. how you will troubleshoot this problem?
Answer:
- We will start looking at the network issues
- Check if the query is changed from yesterday to today
- Check table statistics are upto date
- Generate explain plan and see where is the problem
Q18. how to import table with different schema and different table and different tablespace ?
Answer: remap_schema,remap_table,remap_tablespace
Q19. how to check production database and standby database sync ?
Answer:
- select max(sequence#) from V$archived_log;
- select max(sequence#) from V$log_history;
Q20. Our standby database not in sync with production 10000 archivelogs gap will be there how to sync with production ?
Answer: We will take SCN based incremental backup from production and applied into standby database and sync with production.
Q21. How to open standby database read write mode and again how to rollback, What are options we have to use it.
Answer: Using flashback and restore point option we can open and rollback the standby database.
Q22. Database Components
Answer:
- set line 200;
- set pagesize 9999;
- col COMP_ID format a15;
- col COMP_NAME format a50;
- select COMP_ID,COMP_NAME,STATUS from dba_registry;
Q23. What makes you mean by Database Normalization?
Answer: Normalization technique is a set of rules that exist used to build this relational database to prevent data redundancy also dependency. Once original database objects remain classified, normalization benefits in identifying specific relationships between schema objects.
- First Normal Form
- Second Normal Form
- Third Normal Form
- Boyce-Codd Normal Form
- Fourth Normal Form
- Fifth Normal Form
Q24. How can we identified the resources for which the sessions are waiting?
Answer: We can find out using v$session_waits and v$ system _waits.
Q25. Defined by table partitioning?
Answer: It is a process of sharing a table within smaller chunks so as to obtain the data retrieval simple and quick. Each piece order is known as a partition also can occur accessed separately.
Q26. How do understanding for row Chaining?
Answer: When a row is too long that it cannot and then it will end up accepting consequent blocks which can be lead to this concept of Row Chaining. It can signify avoided by refreshing this storage parameter over an appropriate value.
Q27. Why do we need to rebuild indexes?
Answer: Due to various insert & delete actions, that file gets fragmented & unstructured data, through creating that relationship slowly. To get data inside these indexes, rebuilding is completed.
Q28. Different tools that are provided by Oracle to assist performance monitoring?
- TKPROF – (Transient kernel profiler)
- STATSPACK – (Stands for Statistics Package)
- ADDM – (Automated Database Diagnostics Monitor)
- AWR – (Automatic Workload Repository)
- OEM – (Oracle Enterprise Manager)
Q29. Different areas where we can perform tuning?
Answer:
- Database Design.
- Memory Allocation.
- Disk I/Os.
- Database Contention.
- OS level (CPU).
Q30. How can we monitor these space allocations in a database?
Answer:
- DBA_FREE_SPACE
- DBA_SEGMENTS
- DBA_DATA_FILES
Q31. Defined by Recovery Catalog?
Answer: Recovery Catalog is a means by database schema that holds by the metadata managed by RMAN for restoration data and recovery data processes.
Q32. What is means by Database Writer?
Answer: DBWR is a background process that writes changed data blocks of defense amounts over this data file. This changed information blocks move called dirty blocks.
Q33. What are the specific disk components?
Answer:
- Data files
- Redo Logs
- Control files
- Password files and
- Parameter files
Q34. What is mean by PGA?
Answer: PGA is a memory distance used by Oracle database. It is expected to save session specific information.
Q35. When effects DBWR write to the data file?
Answer:
- When checkpoint occurs
- When number from infected blocks provides a threshold
- Every three moments due to timeout
- When the server method demands free space in buffer cache to read new blocks.
Q36. What is defined by System Change Number (SCN)?
Answer: SCN is an ID that Oracle makes to every transaction. It is recorded including those corresponding variety into a redo approach.
Q37. What is the significance of Oracle DBA?
Answer: The Oracle Certified Professional (OCA/OCP) Database Administrator (DBA) accreditation is intended to reflect capability in Oracle database engineering, establishment, organization, execution tuning, and investigating.
Q38. What is Oracle and what is it utilized for?
Answer: An Oracle database is an accumulation of information treated as a unit. The motivation behind a database is to store and recover related data. … Oracle Database is the primary database intended for big business framework figuring, the most adaptable and practical approach to oversee data and applications.
Q39. Clarify the devices which are utilized to fire up an Oracle database?
Answer: You can start up a database with three devices.
SQL*Plus: This is the most generally utilized choice. You initially associate with an inactive case with SQL*Plus and after that startup the case with "startup" direction.
Prophet Enterprise Manager: This is another method for beginning up a database. You can sign in to Oracle Enterprise Manager regardless of whether the database is halted. OEM will recognize the status of the down database and will introduce you " Startup" catch. You can start up the database by clicking this catch.
RMAN: This is somewhat a less utilized instrument for beginning up a database yet it is conceivable to fire up a database from the Recovery Manager direction line.
Q40. What is Tablespace?
Answer: Prophet utilizes Tablespace for consistent information Storage. Physically, the information will get put away in Data documents. Information records will be associated with the tablespace. Table space can have numerous information documents. A tablespace can have objects from various outline's and construction can have numerous tablespace's. The database makes " Framework tablespace" as a matter of course amid database creation. It contains read-just information word reference tables which contain data about the database.
Q41. What is the use of checkpoint in Oracle?
Answer: A checkpoint plays out the accompanying three tasks: Every filthy square in the cushion reserve is kept in touch with the information records. That is, it synchronizes the information hinders in the support reserve with the datafiles on circle. It's the DBWR that composes all changed database hinders back to the datafiles.
Q42. What makes up an Oracle Instance?
Answer:
- An occurrence is comprised of a mutual memory locale on RAM called System Global Area (SGA) and foundation forms.
- The framework worldwide region is a common memory, which implies it very well may be gotten to by various procedures. This holds information which is required by the case to work.
- The foundation forms are working framework forms and each procedure has a particular obligation in the case.
- The System Global Area and foundation forms are made when the case is "began"
- When the occasion is " shut down" the procedures are murdered and the common memory
- the district is "discharged" back to the working framework.
Q43. What is the Oracle Home Inventory?
Answer: Prophet home stock or neighborhood stock is available inside every Oracle home. It just contains data significant to a specific Oracle home.
This document is situated in the accompanying area: $ORACLE_HOME/stock
It contains the accompanying records and organizers:
- Components File
- Home Properties File
- Other Folders
Q44. What are the articles in a database?
Answer: A database object is any characterized item in a database that is utilized to store or reference information. A few instances of database objects incorporate tables, sees, bunches, arrangements, files, and equivalent words. The table is this present hour's center since it is the essential and most straightforward type of information stockpiling in a social database.
Q45. Rundown the normal assignments of Oracle DBA?
Answer: The undertakings of Oracle DBA as pursues:
- Installing Oracle programming
- Creating Oracle databases
- Performing updates of the database and programming to new discharge levels
- Starting up and closing down the database
- Managing the database's stockpiling structures
- Managing clients and security
- Managing diagram objects, for example, tables, files, and perspectives
- Making database reinforcements and performing recuperation when fundamental
- Proactively checking the database's wellbeing and making the preventive or remedial move as required
- Monitoring and tuning execution a little to a fair size database condition, you may be the sole individual playing out these undertakings. In enormous venture conditions, the activity is regularly isolated among a few DBAs, each with their territory of claim to fame, for example, the database security director or database tuning master.
Q46. What are the advantages of RDBMS?
Answer: The items accordingly can be put away in the database. The language of the DBMS can be coordinated with an item arranged programming language. The language may even be equivalent to that utilized in the application, which does not constrain the software engineer to have two portrayals of his items.
Q47. How to check the current database name?
Answer: Select name from v$database;
Q48. What is ora-1555 error?
Answer: Snapshot too old error happens when it does not have enough space in the undo. So increasing the space will solve the problem.