Breaking News
Loading...
Wednesday 8 May 2013

Oracle Interview Questions and Answers 29

03:52

How does one stop and start the OMS? (for DBA)
Use the following command sequence to stop and start the OMS (Oracle Management Server):
oemctl start oms
oemctl status oms sysman/oem_temp
oemctl stop oms sysman/oem_temp
Windows NT/2000 users can just stop and start the required services. The default OEM administrator is "sysman" with a password of "oem_temp".
NOTE: Use command oemctrl instead of oemctl for Oracle 8i and below.

What is an Integrity Constraint ?
Integrity constraint is a rule that restricts values to a column in a table.

How does one create a repository? (for DBA)
For OEM v2 and above, start the Oracle Enterprise Manager Configuration Assistant (emca on Unix) to create and configure the management server and repository. Remember to setup a backup for the repository database after creating it.

How does one backup a database using the export utility? (for DBA)
Oracle exports are "logical" database backups (not physical) as they extract data and logical definitions from the database into a file. Other backup strategies normally back-up the physical data files.
One of the advantages of exports is that one can selectively re-import tables, however one cannot roll-forward from an restored export file. To completely restore a database from an export file one practically needs to recreate the entire database.
Always do full system level exports (FULL=YES). Full exports include more information about the database in the export file than user level exports.


What are the built_ins used the display the LOV?
Show_lov
List_values


How do you call other Oracle Products from Oracle Forms?
Run_product is a built-in, Used to invoke one of the supported oracle tools products and specifies the name of the document or module to be run. If the called product is unavailable at the time of the call, Oracle Forms returns a message to the operator.

Difference between SUBSTR and INSTR ?
INSTR (String1,String2(n,(m)),INSTR returns the position of the mth occurrence of the string 2 instring1. The search begins from nth position of string1.SUBSTR (String1 n,m)SUBSTR returns a character string of size m in string1, starting from nth position of string1.


What kind of jobs can one schedule with OEM? (for DBA)
OEM comes with pre-defined jobs like Export, Import, run OS commands, run sql scripts, SQL*Plus commands etc. It also gives you the flexibility of scheduling custom jobs written with the TCL language.


What are the pre requisites ?
I. to modify data type of a column ? ii. to add a column with NOT NULL constraint ? To Modify the datatype of a column the column must be empty. to add a column with NOT NULL constrain, the table must be empty.


How does one backout events and jobs during maintenance slots? (for DBA)
Managemnet and data collection activity can be suspended by imposing a blackout. Look at these examples:
agentctl start blackout # Blackout the entrire agent
agentctl stop blackout # Resume normal monitoring and management
agentctl start blackout ORCL # Blackout database ORCL
agentctl stop blackout ORCL # Resume normal monitoring and management
agentctl start blackout -s jobs -d 00:20 # Blackout jobs for 20 minutes


What are the types of SQL Statement ?
Data Definition Language :
CREATE,ALTER,DROP,TRUNCATE,REVOKE,NO AUDIT & COMMIT.

Data Manipulation Language:
INSERT,UPDATE,DELETE,LOCK

TABLE,EXPLAIN PLAN & SELECT.Transactional Control:
COMMIT & ROLLBACKSession Control: ALTERSESSION & SET

ROLESystem Control :
ALTER SYSTEM.

Can you have two functions with the same name in a PL/SQL block ?
Yes.


Can you have two stored functions with the same name ?
Yes.


Can you call a stored function in the constraint of a table ?
No.


What are the various types of parameter modes in a procedure ?
IN, OUT AND INOUT.


What is Over Loading and what are its restrictions ?
OverLoading means an object performing different functions depending upon the no. of parameters or the data type of the parameters passed to it.


Can functions be overloaded ?
Yes.


Can 2 functions have same name & input parameters but differ only by return datatype ?
No.


What are the constructs of a procedure, function or a package ?
The constructs of a procedure, function or a package are :
variables and constants
cursors
exceptions

If I have an execute privilege on a procedure in another users schema, can I execute his procedure even though I do not have privileges on the tables within the procedure ?
Yes


What are various types of joins ?
Equijoins, Non-equijoins, self join, outer join


What is a package cursor ?
A package cursor is a cursor which you declare in the package specification without an SQL statement. The SQL statement for the cursor is attached dynamically at runtime from calling procedures.


If you insert a row in a table, then create another table and then say Rollback. In this case will the row be inserted ?
Yes. Because Create table is a DDL which commits automatically as soon as it is executed. The DDL commits the transaction even if the create statement fails internally (eg table already exists error) and not syntactically.


What are the various types of queries ??
Normal Queries
Sub Queries
Co-related queries
Nested queries
Compound queries


What is a transaction ?
A transaction is a set of SQL statements between any two COMMIT and ROLLBACK statements.


What is implicit cursor and how is it used by Oracle ?
An implicit cursor is a cursor which is internally created by Oracle. It is created by Oracle for each individual SQL.


Which of the following is not a schema object : Indexes, tables, public synonyms, triggers and packages ?
Public synonyms


<<Previous 1  2 3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19 
20  21  22  23  24  25 26 27 28 29 30 Next>>


Share This :
Tags:

0 comments:

Post a Comment

 
Toggle Footer