You are on page 1of 3

Give the two types of tables involved in producing a star schema ?

There are, typically, dimension tables and fact tables.

To determine the time zone under which a database was operating


select DBTIMEZONE from dual

three advisory statistics you can collect in oracle


Buffer Cache Advice, Segment Level Statistics, & Timed Statistics

how to force a log switch in oracle

involves putting different rows into different tables


Horizontal partitioning

Where would you look for errors from the database engine?
In the alert log.

which type of index should be used on a fact table in oracle


bitmap index

How should a many-to-many relationship be handled


joins

What is the the use of Rollback Segment

35. What are the two ways to determine the structure of a table in database?
DESCRIBE command and dbms_metadata_get_commit package

8. What is REGR_R2(y, x) used for?


Returns the coefficient of determination, or R-squared, of the regression line.

When does a ORA-04098 occur

8) Have you ever faced any issues because of caching?

Yes, sometimes I had faced issues regarding old pages being rendered from cache to
the user. In such situation, I clear the cache and then try to investigate the
cause. Many times these issues happen because of the comparatively high refresh
interval. At that time, it is important to reduce the cache refresh interval.

All the users are complaining that their application is hanging. How you will
resolve this situation in OLTP?
First check the Alert log file if any error related to hang issue such. Then I
would like to suggest one important step, that is please check archive log
destination whether it has enough space, some times when archive log destination
got 100% full the database will be hanged and no one can connect to the database
apart from dba.

How to do the scheduled task/jobs in Unix platform


cron job feature in unix.
The two available options are
1. CRONTAB
2. AT (One time scheduling)
1. Login to unix
2. At $prompt 'crontab -l' use this command to check what jobs are already
scheduled.
3. To edit or configure a job use " crontab -e" it will open crontab file which
is same like editing file in vi editor. Now schedule the jobs as per your
requirement.

It look like this


0 2 * * *

The above file will be executed daily at 2 am

1 2 3 4 5 = specific time tags


- where -
1 = Minute (of hour) to activate [0-59]
2 = Hour (of day) to activate [0-23]
3 = Day (of month) to activate [1-31 ... 29,30,31 may not activate during all
months]
4 = Month (of year) to activate [1-12 or 3-letter names "Jan,Feb,Mar"]
5 = Weekday to activate [0-7 or 3-letter names "Mon,Tue,Wed"]

Name two files used for network connection to a database?


TNSNAMES.ORA and SQLNET.ORA

How can you enable a trace for a session?


Use the DBMS_SESSION.SET_SQL_TRACE or
Use ALTER SESSION SET SQL_TRACE = TRUE;

How can you gather statistics on a table?


The ANALYZE command

You have just compiled a PL/SQL package but got errors, how would you view the
errors?
SHOW ERRORS

How can you rebuild an index?


ALTER INDEX <index_name> REBUILD

What view would you use to look at the size of a data file and determine free space
in a tablespace?
DBA_DATA_FILES and DBA_FREE_SPACE

How do you add a data file to a tablespace?


ALTER TABLESPACE <tablespace_name> ADD DATAFILE <datafile_name> SIZE <size>

40. How do you resize a data file?


ALTER DATABASE DATAFILE <datafile_name> RESIZE <new_size>;

Name three advisory statistics you can collect.


Buffer Cache Advice, Segment Level Statistics, & Timed Statistics

select * from (select rownum as rn,a.* from employees a) where mod(rn,2)=0 and
rn<=20

Declare
A number:=0;
begin
loop
A := A+2;
dbms_output.put_line (A);
exit when A=20;
end loop;
end;
/

You might also like