Tuesday, April 12, 2011

DBA (Basic) Part 2


What is the use of Control File ?
When an instance of an ORACLE database is started, its control file is used to identify the database and redo log files that must be opened for database operation to proceed. It is also used in database recovery.

What does a Control file Contain ?
A Control file records the physical structure of the database. It contains the following information.

i. Database Name
ii. Names and locations of a database's files and redolog files.
iii. Time stamp of database creation.


What is the function of Redo Log ?
The Primary function of the redo log is to record all changes made to data.

What is the use of Redo Log Information ?
The Information in a redo log file is used only to recover the database from a system or media failure the prevents database data from being written to a database's data files.


What is a Data Dictionary ?

The data dictionary of an ORACLE database is a set of tables and views that are used a read-only reference about the database.

It stores information about both the logical and physical structure of the database, the valid users of an ORACLE database, integrity constraints defined for tables in the database and space allocated for a schema object and how much of it is being used.


What is Two-Phase Commit ?
Two-phase commit is mechanism that guarantees a distributed transaction either commits on all involved nodes or rolls back on all involved nodes to maintain data consistency across the global distributed database. It has two phase, a Prepare Phase and a Commit Phase.

Describe two phases of Two-phase commit ?
Prepare phase - The global coordinator (initiating node) ask a participants to prepare (to promise to commit or rollback the transaction, even if there is a failure)

Commit - Phase - If all participants respond to the coordinator that they are prepared, the coordinator asks all nodes to commit the transaction, if all participants cannot prepare, the coordinator asks all nodes to roll back the transaction.

What is the mechanism provided by ORACLE for table replication ?
Snapshots and SNAPSHOT LOGs

What is a SQL * NET?
SQL *NET is ORACLE's mechanism for interfacing with the communication protocols used by the networks that facilitate distributed processing and distributed databases. It is used in Clint-Server and Server-Server communications.

What is the use of ANALYZE command ?
To perform one of these function on an index,table, or cluster:

- to collect statisties about object used by the optimizer and store them in the data
dictionary.
- to delete statistics about the object used by object from the data dictionary.
- to validate the structure of the object.
- to identify migrated and chained rows of the table or cluster.

What are the benefits of distributed options in databases ?
Database on other servers can be updated and those transactions can be grouped together with others in a logical unit.
Database uses a two phase commit.

What is the use of COMPRESS option in EXP command ?
Flag to indicate whether export should compress fragmented segments into single extents.

What is the use of GRANT option in EXP command ?
A flag to indicate whether grants on databse objects will be exported or not. Value is 'Y' or
'N'.

What is the use of INDEXES option in EXP command ?
A flag to indicate whether indexes on tables will be exported.

What is the use of ROWS option in EXP command ?
Flag to indicate whether table rows should be exported. If 'N' only DDL statements for the
databse objects will be created.

What is the use of CONSTRAINTS option in EXP command ?
A flag to indicate whether constraints on table need to be exported.

What is the use of FULL option in EXP command ?
A flag to indicate whether full databse export should be performed.

What is the use of OWNER option in EXP command ?
List of table accounts should be exported.

What is the use of TABLES option in EXP command ?
List of tables should be exported.

What is the use of RECORD LENGTH option in EXP command ?
Record length in bytes.

What is the use of INCTYPE option in EXP command ?
Type export should be performed COMPLETE,CUMULATIVE,INCREMENTAL.

What is the use of RECORD option in EXP command ?
For Incremental exports, the flag indirects whether a record will be stores data dictionary
tables recording the export.

What is the use of PARFILE option in EXP command ?
Name of the parameter file to be passed for export.

What is the use of FILE option in IMP command ?
The name of the file from which import should be performed.

What is the use of IGNORE option in IMP command ?
A flag to indicate whether the import should ignore errors encounter when issuing CREATE
commands.

What is the use of GRANT option in IMP command ?
A flag to indicate whether grants on database objects will be imported.

What is the use of INDEXES option in IMP command ?
A flag to indicate whether import should import index on tables or not.

What is the use of ROWS option in IMP command ?
A flag to indicate whether rows should be imported. If this is set to 'N' then only DDL for database objects will be exectued.

What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace?
A temporary tablespace is used for temporary objects such as sort structures while permanent tablespaces are used to store those objects meant to be used as the true objects of the database.

How can you rebuild an index?
ALTER INDEX REBUILD;

What is the difference between the SQL*Loader and IMPORT utilities?
These two Oracle utilities are used for loading data into the database. The difference is that the import utility relies on the data being produced by another Oracle utility EXPORT while the SQL*Loader utility allows data to be loaded that has been produced by other utilities from different data sources just so long as it conforms to ASCII formattsed or delimited files.


Name two files used for network connection to a database.

TNSNAMES.ORA and SQLNET.ORA


People who read this post also read :


No comments:

Post a Comment

Thanks for your comments!