1. How many memory layers are in the shared pool?
Ans - a) library cache
b) Dictionary cache
c) SQL Area
2. How do you find out from the RMAN catalog if a particular archive log has been backed-up?
Ans - LIST BACKUP OF ARCHIVELOG sequence=453;
3. How can you tell how much space is left on a given file system and how much space each of the
file system's subdirectories take-up?
Ans – df -h
4. Define the SGA and:
• How you would configure SGA for a mid-sized OLTP environment?
• What is involved in tuning the SGA?
Ans - Generaly SGA will be configured as below.
Size is determined based on several factors like following:- 1-size of database (small, medium or large) 2-whether the application will be OLTP & DSS 3-total memory on the server 4-whether you have other applicatiions on the same server for example Oracle ERP
application server & db may be installed on SAME SERVER which require varying
memory sizes 5-number of users expected to use application on the server 6-type of users (super users or light users or both) However, if the DB is dedicated to one server alone, and knowing the size of your DB,
I would take defaults on the install manual & those of DBCA and play with SGA
parameter values in your tuning cycle.
7. Type of connection of session (dedicated or multithreaded)
For tuning the SGA involve Tuning the all
the component of the SGA ie.
a) Shared pool
b) Buffer Cache
c) Large Pool
d) Java Pool
5. What is the cache hit ratio, what impact does it have on performance of an Oracle database and
what is involved in tuning it?
Ans - a) Library cache HIT ratio by v$librarycache
b) Dictionary cache HIT ratio by v$rowcache
a) Buffer cache HIT ratio should be more than 90% but at the same time Physical read and write should also be considered. (V$SYSSTAT)
6. Other than making use of the statspack utility, what would you check when you are monitoring or
running a health check on an Oracle 8i or 9i database?
Ans – a) OEM
b) TKProf
7. How do you tell what your machine name is and what is its IP address?
Ans - Window / Linux
a)ipconfig / ifconfig
b)ner user / hostname
8. How would you go about verifying the network name that the local_listener is currently using?
Ans – LSNRCTL and check the listener.log file
9. You have 4 instances running on the same UNIX box. How can you determine which shared
memory and semaphores are associated with which instance?
Ans - ipcs grep oracle
10. What view(s) do you use to associate a user's SQLPLUS session with his o/s process?
Ans – v$session and v$process.
11. What is the recommended interval at which to run statspack snapshots, and why?
Ans – 1 Hour prefered
12. What spfile/init.ora file parameter exists to force the CBO to make the execution path of a given
statement use an index, even if the index scan may appear to be calculated as more costly?
Ans - optimizer_index_cost_adj
13. Assuming today is Monday, how would you use the DBMS_JOB package to schedule the
execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run
subsequently every other day at
2AM.
Ans - dbms_job.submit(:jobno, 'statspack.snap;', trunc(sysdate)+9/24, 'trunc(SYSDATE+1/24,''HH'')', TRUE, :instno);
14. How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other
day at 2PM?
Ans - Use vi to edit Crontab file append a line on the file 00 2 * * * /test/test.sh
15. What do the 9i dbms_standard.sql_txt() and
dbms_standard.sql_text() procedures do?
Ans - DBMS_STANDARD package provides language facilities that help your application interact with Oracle.Function sql_txt (sql_text out ora_name_list_t) return binary_integer;
16. In which dictionary table or view would you look to determine at which time a snapshot or
MVIEW last successfully refreshed?
17. How would you best determine why your MVIEW couldn't FAST REFRESH?
Ans - from dba_mview_refresh_times
18. How does propagation differ between Advanced Replication and Snapshot Replication (readonly)?
19. Which dictionary view(s) would you first look at to
understand or get a high-level idea of a given Advanced Replication environment?
Ans - dba_repcatlog ; dba_repsites_new ; dba_repextensions
20. How would you begin to troubleshoot an ORA-3113 error?
Ans – This is End of File Communication ERROR , check the sga Memory at OS , increase it.
21. Which dictionary tables and/or views would you look at to diagnose a locking issue?
Ans - sys.v_$lock, sys.v_$session sys.obj$ , sys.user$ ,sys.v_$process
22. An automatic job running via DBMS_JOB has failed. Knowing only that "it's failed", how do you
approach troubleshooting this issue?
Ans – check with dba_jobs and reschedule the job again.
23. How would you extract DDL of a table without using a GUI tool?
Ans - SELECT dbms_metadata.get_ddl('TABLE','DEPT','SCOTT') FROM DUAL;
24. You're getting high "busy buffer waits" - how can you find what's causing it?
Ans – check with STATSPACK then check for which section cause this data blocks, segment header, free list block , Undo header.
25. What query tells you how much space a tablespace named "test" is taking up, and how much
space is remaining?
Ans – we can check it from dba_free_space.
26. Database is hung. Old and new user connections alike hang on impact. What do you do? Your
SYS SQLPLUS session IS able to connect.
Ans _ check the Alart.log file for error and check the memory of SGA.
27. Database crashes. Corruption is found scattered among the file system neither of your doing nor
of Oracle's. What database recovery options are available? Database is in archive log mode.
Ans – Complete Database Recovery.
28. Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or
Solaris).
Ans – TOP command in Linux / VMSTAT 5 on Solaris
29. How do you increase the OS limitation for open files (LINUX and/or Solaris)?
Ans - echo 65536 > /proc/sys/fs/file-
30. Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current
date, changes the date format to include minutes & seconds, issues a drop table command, displays
the date again, and finally exits.
31. Explain how you would restore a database using RMAN to Point in Time?
32. How does Oracle guarantee data integrity of data changes?
Ans – Using Constraints
33. Which environment variables are absolutely critical in order to run the OUI?
Ans - On UNIX: Oracle_Home , Path , ORA_NLS33 AND LD_LIBRARY_PATH
34. What SQL query from v$session can you run to show how many sessions are logged in as a
particular user account?
Ans – select count(*) from v$session , v$process
35. Why does Oracle not permit the use of PCTUSED with indexes?
Ans - This is similar to the setting for PCTUSED on Oracle indexes. Oracle doesn’t allow you to set PCTUSED on an index because it has the ability to tell the optimal time to relink the data block onto the freelist chain. Here’s what happens if you try to specify PCTUSED for an index:
36. What would you use to improve performance on an insert statement that places millions of rows
into that table?
Ans – Disable all the constraints and drop the indexes.
37. If you're unsure in which script a sys or system-owned object is created, but you know it's in a
script from a specific directory, what UNIX command from that directory structure can you run to
find your answer?
Ans – pwd , find
38. How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?
Ans - In tnsnames use host=DSS.icallinc.com
39. You create a private database link and upon
connection, fails with: ORA-2085: connects to
What is the problem? How would you go about resolving this error?
Ans – check the Tnsnames.ora file for the correct entry
40. I have my backup RMAN script called "backup_rman.sh". I am on the target database. My
catalog username/password is rman/rman. My catalog db is called rman. How would you run this
shell script from the O/S such that it would run as a background process?
Ans - backup_rman.sh >&1&
41. Explain the concept of the DUAL table.
Ans – this is a system Table which has one column.
42. What are the ways tablespaces can be managed and how do they differ?
Ans - 2 ways Locally Managed or Managed in the dictionaryLocally-managed tablespaces have the following advantages over dictionary-managed tablespaces: Local management of extents avoids recursive space management operations, which can occur in dictionary-managed tablespaces if consuming or releasing space in an extent results in another operation that consumes or releases space in a rollback segment or data dictionary table. Local management of extents automatically tracks adjacent free space, eliminating the need to coalesce free extents.
43. From the database level, how can you tell under which time zone a database is operating?
Ans - select DBTIMEZONE from dual;
44. What's the benefit of "dbms_stats" over "analyze"?
Ans - Starting with the introduction of the dbms_stats package, Oracle provides a simple way for the Oracle professional to collect statistics for the CBO. The old-fashioned analyze table and dbms_utility methods for generating CBO statistics are obsolete and somewhat dangerous to SQL performance because they don't always capture high-quality information about tables and indexes. The CBO uses object statistics to choose the best execution plan for all SQL statements.
45. Typically, where is the conventional directory structure chosen for Oracle binaries to reside?
Ans – OracleHome\bin
46. You have found corruption in a tablespace that contains static tables that are part of a database
that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in
the other tablespaces?
No comments:
Post a Comment