Monday, October 25, 2010

Oracle :CONSTRAINTS

CONSTRAINTS 12. What is an Integrity Constraint ? Integrity constraint is a rule that restricts values to a column in a table. 13. What is Referential Integrity ? Maintaining data integrity through a set of rules that restrict the values of one or more columns of the tables based on the values of primary key or unique key of the referenced table. 14. What are the usage of SAVEPOINTS ? SAVEPOINTS are used to subdivide a transaction into smaller parts. It enables rolling back part of a transaction. Maximum of five save points are allowed. 15. What is ON DELETE CASCADE ? When ON DELETE CASCADE is specified ORACLE maintains referential integrity by automatically removing dependent foreign key values if a referenced primary or unique key value is removed. 16. What are the data types allowed in...
Read more »

Oracle SQL PLUS STATEMENTS

SQL PLUS STATEMENTS 1. 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 & ROLLBACK. Session Control : ALTERSESSION & SET ROLE. System Control : ALTER SYSTEM. 2. What is a transaction ? Transaction is logical unit between two commits and commit and rollback. 3. What is difference between TRUNCATE & DELETE ? TRUNCATE commits after deleting entire table i.e., can not be rolled back. Database triggers do not fire on TRUNCATE, DELETE allows the filtered deletion. Deleted records can be rolled back or committed. Database triggers fire on DELETE. 4. What is a join ? Explain the different types of...
Read more »

Oracle: MANAGING BACKUP & RECOVERY

MANAGING BACKUP & RECOVERY 73. What are the different methods of backing up oracle database ? - Logical Backups - Cold Backups - Hot Backups (Archive log) 74. What is a logical backup ? Logical backup involves reading a set of databse records and writing them into a file. Export utility is used for taking backup and Import utility is used to recover from backup. 75. What is cold backup ? What are the elements of it ? Cold backup is taking backup of all physical files after normal shutdown of database. We need to take. - All Data files. - All Control files. - All on-line redo log files. - The init.ora file (Optional) 76. What are the different kind of export backups ? Full back - Complete database. Incremental - Only affected tables from last incremental date/full backup date. Cumulative...
Read more »

Oracle: MANAGING DISTRIBUTED DATABASES.

MANAGING DISTRIBUTED DATABASES. 62. How can we reduce the network traffic ? Replictaion of data in distributed environment. Using snapshots to replicate data. Using remote procedure calls. 63. What is snapshots ? Snapshot is an object used to dynamically replicate data between distribute database at specified time intervals. In ver 7.0 they are read only. 64. What are the various type of snapshots ? Simple and Complex. 65. Differentiate simple and complex, snapshots ? A simple snapshot is based on a query that does not contains GROUP BY clauses, CONNECT BY clauses, JOINs, sub-query or snashot of operations. A complex snapshots contain atleast any one of the above. 66. What dynamic data replication ? Updating or Inserting records in remote database through database triggers. It may fail if...
Read more »

Oracle: DATABASE SECURITY & ADMINISTRATION

DATABASE SECURITY & ADMINISTRATION 48. What is user Account in Oracle database ? An user account is not a physical structure in Database but it is having important relationship to the objects in the database and will be having certain privileges. 49. How will you enforce security using stored procedures ? Don't grant user access directly to tables within the application. Instead grant the ability to access the procedures that access the tables. When procedure executed it will execute the privilege of procedures owner. Users cannot access tables except via the procedure. 50. What are the dictionary tables used to monitor a database spaces ? DBA_FREE_SPACE, DBA_SEGMENTS, DBA_DATA_FILES. 51. What are the responsibilities of a Database Administrator ? Installing and upgrading the Oracle Server...
Read more »

Oracle: LOGICAL & PHYSICAL ARCHITECTURE OF DATABASE.

LOGICAL & PHYSICAL ARCHITECTURE OF DATABASE. 14. What is Database Buffers ? Database buffers are cache in the SGA used to hold the data blocks that are read from the data segments in the database such as tables, indexes and clusters DB_BLOCK_BUFFERS parameter in INIT.ORA decides the size. 15. What is dictionary cache ? Dictionary cache is information about the databse objects stored in a data dictionary table. 16. What is meant by recursive hints ? Number of times processes repeatedly query the dictionary table is called recursive hints. It is due to the data dictionary cache is too small. By increasing the SHARED_POOL_SIZE parameter we can optimize the size of Data Dictionary Cache. 17. What is meant by redo log buffer ? Change made to entries are written to the on-line redo log files....
Read more »

Oracle: MEMORY MANAGEMENT

MEMORY MANAGEMENT 9. What is SGA ? How it is different from Ver 6.0 and Ver 7.0 ? The System Global Area in a Oracle database is the area in memory to facilitates the transfer of information between users. It holds the most recently requested structural information between users. It holds the most recently requested structural information about the database. The structure is Database buffers, Dictionary cache, Redo Log Buffer and Shared SQL pool (ver 7.0 only) area. 10. What is a Shared SQL pool ? The data dictionary cache is stored in an area in SGA called the Shared SQL Pool. This will allow sharing of parsed SQL statements among concurrent users. 11. What is mean by Program Global Area (PGA) ? It is area in memory that is used by a Single Oracle User Process. 12. What is a data segment...
Read more »

Oracle: Data Base Administration

Data Base Administration Introduction to DBA 1. What is a Database instance ? Explain A database instance (Server) is a set of memory structure and background processes that access a set of database files. The process can be shared by all users. The memory structure that are used to store most queried data from database. This helps up to improve database performance by decreasing the amount of I/O performed against data file. 2. What is Parallel Server ? Multiple instances accessing the same database (Only In Multi-CPU environments) 3. What is a Schema ? The set of objects owned by user account is called the schema. 4. What is an Index ? How it is implemented in Oracle Database ? An index is a database structure used by the server to have direct access of a row in a table. An index is automatically...
Read more »

Oracle: DATABASE OPERATION, BACKUP AND RECOVERY

DATABASE OPERATION, BACKUP AND RECOVERY 137. What are the steps involved in Database Startup ? Start an instance, Mount the Database and Open the Database. 138. What are the steps involved in Database Shutdown ? Close the Database, Dismount the Database and Shutdown the Instance. 139. What is Restricted Mode of Instance Startup ? An instance can be started in (or later altered to be in) restricted mode so that when the database is open connections are limited only to those whose user accounts have been granted the RESTRICTED SESSION system privilege. 140. What are the different modes of mounting a Database with the Parallel Server ? Exclusive Mode If the first instance that mounts a database does so in exclusive mode, only that Instance can mount the database. Parallel Mode If the first instance...
Read more »

Oracle: DISTRIBUTED PROCESSING AND DISTRIBUTED DATABASES

DISTRIBUTED PROCESSING AND DISTRIBUTED DATABASES 130. What is Distributed database ? A distributed database is a network of databases managed by multiple database servers that appears to a user as single logical database. The data of all databases in the distributed database can be simultaneously accessed and modified. 131. 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. 132. 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,...
Read more »

Sunday, October 24, 2010

Oracle :DATABASE SECURITY

DATABASE SECURITY 118. What are Roles ? Roles are named groups of related privileges that are granted to users or other roles. 119. What are the use of Roles ? REDUCED GRANTING OF PRIVILEGES - Rather than explicitly granting the same set of privileges to many users a database administrator can grant the privileges for a group of related users granted to a role and then grant only the role to each member of the group. DYNAMIC PRIVILEGE MANAGEMENT - When the privileges of a group must change, only the privileges of the role need to be modified. The security domains of all users granted the group's role automatically reflect the changes made to the role. SELECTIVE AVAILABILITY OF PRIVILEGES - The roles granted to a user can be selectively enable (available for use) or disabled (not available...
Read more »

Oracle: PROGRAMMATIC CONSTRUCTS

PROGRAMMATIC CONSTRUCTS 110. 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. 111. What is a Procedure ? A Procedure consist of a set of SQL and PL/SQL statements that are grouped together as a unit to solve a specific problem or perform a set of related tasks. 112. What is difference between Procedures and Functions ? A Function returns a value to the caller where as a Procedure does not. 113. What is a Package ? A Package is a collection of related procedures, functions, variables and other package constructs together as a unit in the database. 114. What are the advantages of having a Package ? Increased functionality (for example,global package variables can be declared and used...
Read more »

Oracle: DATA ACCESS

DATA ACCESS 90. Define Transaction ? A Transaction is a logical unit of work that comprises one or more SQL statements executed by a single user. 91. When does a Transaction end ? When it is committed or Rollbacked. 92. What does COMMIT do ? COMMIT makes permanent the changes resulting from all SQL statements in the transaction. The changes made by the SQL statements of a transaction become visible to other user sessions transactions that start only after transaction is committed. 93. What does ROLLBACK do ? ROLLBACK retracts any of the changes resulting from the SQL statements in the transaction. 94. What is SAVE POINT ? For long transactions that contain many SQL statements, intermediate markers or savepoints can be declared which can be used to divide a transaction into smaller parts. This...
Read more »

Oracle: SYSTEM ARCHITECTURE

SYSTEM ARCHITECTURE : 61. What constitute an ORACLE Instance ? SGA and ORACLE background processes constitute an ORACLE instance. (or) Combination of memory structure and background process. 62. What is SGA ? The System Global Area (SGA) is a shared memory region allocated by ORACLE that contains data and control information for one ORACLE instance. 63. What are the components of SGA ? Database buffers, Redo Log Buffer the Shared Pool and Cursors. 64. What do Database Buffers contain ? Database buffers store the most recently used blocks of database data. It can also contain modified data that has not yet been permanently written to disk. 65. What do Redo Log Buffers contain ? Redo Log Buffer stores redo entries a log of changes made to the database. 66. What is Shared Pool ? Shared Pool is...
Read more »

Oracle concepts

35. What is Row Chaining ? In Circumstances, all of the data for a row in a table may not be able to fit in the same data block. When this occurs , the data for the row is stored in a chain of data block (one or more) reserved for that segment. 36. What is an Extent ? An Extent is a specific number of contiguous data blocks, obtained in a single allocation, used to store a specific type of information. 37. What is a Segment ? A segment is a set of extents allocated for a certain logical structure. 38. What are the different type of Segments ? Data Segment, Index Segment, Rollback Segment and Temporary Segment. 39. What is a Data Segment ? Each Non-clustered table has a data segment. All of the table's data is stored in the extents of its data segment. Each cluster has a data segment. The data...
Read more »

Oracle concepts

15. What is a Sequence ? A sequence generates a serial list of unique numbers for numerical columns of a database's tables. 16. What is a Synonym ? A synonym is an alias for a table, view, sequence or program unit. 17. What are the type of Synonyms? There are two types of Synonyms Private and Public. 18. What is a Private Synonyms ? A Private Synonyms can be accessed only by the owner. 19. What is a Public Synonyms ? A Public synonyms can be accessed by any user on the database. 20. What are synonyms used for ? Synonyms are used to : Mask the real name and owner of an object. Provide public access to an object Provide location transparency for tables,views or program units of a remote database. Simplify the SQL statements for database users. 21. What is an Index ? An Index is an optional...
Read more »

Oracle

1. What are the components of Physical database structure of Oracle Database?. ORACLE database is comprised of three types of files. One or more Data files, two are more Redo Log files, and one or more Control files. 2. What are the components of Logical database structure of ORACLE database? Tablespaces and the Database's Schema Objects. 3. What is a Tablespace? A database is divided into Logical Storage Unit called tablespaces. A tablespace is used to grouped related logical structures together. 4. What is SYSTEM tablespace and When is it Created? Every ORACLE database contains a tablespace named SYSTEM, which is automatically created when the database is created. The SYSTEM tablespace always contains the data dictionary tables for the entire database. 5. Explain the relationship among Database,...
Read more »

Pages 71234 »