Showing posts with label Scenarios. Show all posts
Showing posts with label Scenarios. Show all posts

October 24, 2008

Oracle Scenario Questions

Note: Most of the answers are for reference, and maynot be exact.

1. Tell me the total process of eim?
after you get the legacy data thorugh exl format
1. You identify the which base table and which base column suitable for legacy data.
2.After that you have to use control file or dts processing to load the lagacy to eim table.
3. After that by using IFB file from eim to base table store the data.

What is the process of po requisation interface what are the the interface table and basetables and what are validations
interface tables: PO_REQUISITIONS_INTERFACE_ALLbase tables: PO_REQUISITIONS_HEADERS_ALL PO_REQUISITION_LINES_ALL PO_REQ_DISTRIBUTIONS_ALL

What is mutated trigger, is it the problem of locks. In single user mode we got mutated error, as a DBA how you will resolve it ?
Mutated Trigger: example:Table A has an insert trigger.In that Trigger: There is a statement like insert into Table A, which caues mutated trigger.Avoid to have those kind of triggers in the database

In exception handling we have some NOT_FOUND and OTHERS. In inner layer we have some NOT_FOUND and OTHERS. While executing which one whether outer layer or inner layer will check first ?
Inner layer. execution carry on furthur without going to outer exception blocks.

Dual table explain. Is any data internally storing in dual table. Lot of users are accessing select sysdate from dual and they getting some millisecond differences. If we execute SELECT SYSDATE FROM EMP; what error will we get. Why ?
The built-in function SYSDATE returns a DATE value containing the current date and time on your system. DUAL is built-in relation in Oracle which serves as a dummy relation to put in the FROM clause when nothing else is appropriate. For example, try "select 1+2 from dual;".So "select sysdate from EMP" won't generate the desired result. Will return sysdate for each record in the emp table

How can you see the source code of the package ?
SELECT TEXT FROM USER_SOURCE/ALL_SOURCE/DBA_SOURCEWHERE NAME= AND TYPE='PACKAGE';HERE THE TYPE MAY BE PACKAGE,PROCEDURE,....

You are regularly changing the package body part. How will you create or what will you do before creating that package ?
Create package specifications before creatin package body.


How do you increase the performance of %LIKE operator.
The wildcard char % can be placed in one of three ways: %searchwordhere% searchwordhere% %searchwordhere The searchwordhere% is the fastest because it can use an index if one is specified on that column. The other two %searchwordhere%, and %searchwordhere would never use the index even if one is specified and thus result in slow table scans.


Shall we create procedures to fetch more than one record.
You can create a procedure to return REF cursor
or VARRAY or PL/SQL Table type out parameters which can return more than one value

If the SQL * Plus hangs for a long time, what is the reason.
You are running a cartisian query, typically by mistake. Make sure every table has a join criteria specified for it. You are working on a table with 100+million rows. The database server is busy doing a backup. Check the disk IO for the process that appears hung and if the disk IO is increasing every 5-10 seconds then the job is not hung, it is just taking a while to complete.

All the users are complaining that their application is hanging. How you will resolve this situation in OLTP
If the user is complaining the hang problem.Then the experience of a dba reflects the work style that he is going to perform and basically as the rule suggest first try to connect to the database itself and fire some query to check whethere you are allowed to connect or not if you are connected then check for any locked_objects by checking v$locked_object and dba_waiters and dba_blockers.then you have to eliminate the things which are working properly and targetting yourself to the weaker place and then check at os level that which process is consuming the most of the time and then analyze the problem if the problem relates to a single user process then check what that user is doing by checking the sql statement he is firing and so on.

In which situation whether peak time or off peak time you will execute the ANALYZE TABLE command. Why
You have to run the analyze command during off peak time only because it actually performs full table scan.

If the large table contains thousands of records and the application is accessing 35% of the table which method to use: index searching or full table scan
Index is more useful in this situation since it retrive rows faster than fts. fts read all blocks and since table contain thousands or rows .

What are the differences between database designing and database modeling ?
refer http://www.aisintl.com/case/library/R-Theory_vs_ER/r-theory_vs_er.html It says, database modeling comprises: discovery, design, documentation, communication, DDL generation, re engineering

What are the differences you have seen while installing Oracle on NT and Unix platform ?
Oracle Server = Oracle Instance + Oracle Database Oracle instance comprises of Background Process and memory structures in Unix all background processes are treated as independent processes but in windows all are combined together within oracle.Exe in unix when a user logins he is dedicated to the server via an independed process so if require you can kill a process through os level. This is one of the major advantage of using oracle on unix based system rather then windows system bcoz in case database stucks or hangs an independent process causing the problem can be killed and database will be made resumable immediately.And one more diffrence is in windows you are require to create a service to start the instance by using oradim but in unix its not required .You can start the instance.In windows unique service name is required but in unix diffrent user can have the same service name started by them but its not advisable.

How to do the scheduled task/jobs in Unix platform?
cron job feature in unix.

What is bulk SQL ?
Bulk sql are forall and bulk collect INTO statement,For performence reason the bulk bind is used to eleminate the context switching between two sql and pl/sql eng.

If the entire disk is corrupted how will you and what are the steps to recover the database
If the entire disk is corrupted and no backup is there don nothing sit and relax their is no possibility of recovery. A backup is required for restoration and for recovery redo log and archive logs.Once if you have theses than think of recovering. A dba should always plan for the recovery scenario depending upon the criticality of the database.oracle provides 0% data loss facilty through data guard and online backup. Its dba who has to decide.

What are the different types of PL/SQL program units that can be defined and stored in ORACLE database ?
Procedures and Functions,Packages and Database Triggers.