20
PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 1 Unit-I (Part-A Questions & Answers) 1. What is a Dedicated Server connection? Dedicated Server connection (One genie-One Master): a one-to-one correspondence between the User and Server Processes. Every user connecting to Oracle will have a personal genie handling data retrieval from disk into buffer cache. Each user get his data retrieval requests acted upon immediately. 2. What is Oracle database server? An Oracle server includes an Oracle Instance and an Oracle database. Oracle instance: An Oracle Instance consists of two different sets of components: The first component set is the set of background processes (PMON, SMON, RECO, DBW0, LGWR, CKPT, D000 and others). The second component set includes the memory structures that comprise the Oracle instance. An Oracle Instance provides access to one and only one Oracle database. Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files, but they are actually database files that store the database information that a firm or organization needs in order to operate. 3. What is a System Global Area? The SGA is a read/write memory area that stores information shared by all database processes and by all users of the database (sometimes it is called the Shared Global Area). o This information includes both organizational data and control information used by the Oracle Server. o The SGA is allocated in memory and virtual memory. o The size of the SGA can be established by a DBA by assigning a value to the parameter SGA_MAX_SIZE in the parameter filethis is an optional parameter. 4. Explain the purpose of the following: Buffer Cache, Redo Log Buffer, Shared Pool

Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 1

Unit-I (Part-A Questions & Answers)

1. What is a Dedicated Server connection?

Dedicated Server connection (One genie-One Master): a one-to-one correspondence between

the User and Server Processes. Every user connecting to Oracle will have a personal genie

handling data retrieval from disk into buffer cache. Each user get his data retrieval requests acted

upon immediately.

2. What is Oracle database server?

An Oracle server includes an Oracle Instance and an Oracle database.

Oracle instance: An Oracle Instance consists of two different sets of components:

The first component set is the set of background processes (PMON, SMON, RECO, DBW0,

LGWR, CKPT, D000 and others).

The second component set includes the memory structures that comprise the Oracle instance.

An Oracle Instance provides access to one and only one Oracle database.

Oracle database: An Oracle database consists of files. Sometimes these are referred to as

operating system files, but they are actually database files that store the database information

that a firm or organization needs in order to operate.

3. What is a System Global Area?

The SGA is a read/write memory area that stores information shared by all database

processes and by all users of the database (sometimes it is called the Shared Global

Area).

o This information includes both organizational data and control information used by

the Oracle Server.

o The SGA is allocated in memory and virtual memory.

o The size of the SGA can be established by a DBA by assigning a value to the

parameter SGA_MAX_SIZE in the parameter file—this is an optional parameter.

4. Explain the purpose of the following: Buffer Cache, Redo Log Buffer, Shared Pool

Page 2: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 2

Buffer Cache – contains buffers, each size of a database block that stores data needed by SQL.

The buffers are of equal size. The size of the buffer is indicated in a parameter file

Redo Log Buffer-- temporarily stores in memory the redo entry information generated by

DML statements (Update, delete, insert) run in user sessions until Oracle writes the

information into the disk.

Shared Pool – includes two components:

o Library Cache –used for storing SQL statement text and the statements execution

plan for reuse.

o Data Dictionary Cache –also called as row cache, used for storing recently accesses

information from the Oracle data dictionary like tables, columns, usernames,

passwords…

5. What is a PGA?

Program Global Area (PGA)

A PGA is: a non-shared memory region that contains data and control information exclusively

for use by an Oracle process. PGA helps user processes execute by storing information like bind

variable values, sort areas and other aspects of cursor handling. A PGA is created by Oracle

Database when an Oracle process is started.

The Program Global Area is also termed the Process Global Area (PGA) and is a part of memory

allocated that is outside of the Oracle Instance.

6. What are the two ways by which DBA’s can set up Oracle to run server processes?

There are two ways DBA’s can set up Oracle to run server processes:

Dedicated Server connection (One genie-One Master): a one-to-one correspondence between

the User and Server Processes. Every user connecting to Oracle will have a personal genie

handling data retrieval from disk into buffer cache. Each user get his data retrieval requests acted

upon immediately.

Shared Server connection :(One genie- Many Masters): where more than one User Process

shares a pool of Server Process. Oracle manages this by means of a network process called

Page 3: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 3

dispatcher, which puts the user requests for data into one queue and shared server process fulfill

all the requests one at a time. This reduces memory and CPU burden.

7. List the stages in processing queries.

There are several ways to process an Oracle select statement. The operations involved in both

select and DML statement is shown in diagram. The select statement processing flow is

1. Search shared pool : .

2. Validate Statement:

3. Validate Data Sources:

4. Acquire locks:

5. Check Privileges:

6. Parse statement:

7. Execute Statement:

8. Fetch values from cursor:

8. Name the stages in Processing DML Statements.

The undo segment is a database object in Oracle that stores old versions of data being changed

by DML statements issued by the user process. It stores only the old value and not the new

values (new values stored in object itself).

1. Parse statement:

2. Execute Statement:

3. Generate Redo information:

9. Explain the roles of DBW0 and LGWR.

The role of DBW0:

(Also called DBWR in earlier Oracle Versions) The Database Writer writes modified blocks

from the database buffer cache to the disk.

The writes are done for any of the following reasons

Page 4: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 4

When the server process make room in the buffer cache to read more data

When DBW0 is said to write data to disk by LGWR process.

Every three seconds due to a timeout.

When number of dirty buffers reaches a threshold value.

The role of LGWR :

The Log Writer (LGWR) writes contents from the Redo Log Buffer in memory to online Redo

Log File on disk-that is in use.

The writes are done for any of the following reasons

When a transaction commits.

When the redo log buffer is 1/3 full

When there is more than a megabyte of changes recorded in the redo log buffer.

Before DBW0 writes modified blocks in the database buffer cache to the data files

10. What are the stages AVAILABLE IN PROCESSING COMMITS?

Issuing a commit statement ends the current transaction by making any data change the user

process may have issued to the Oracle database permanent.

A rollback discards the data changes.

By keeping a copy of old data in the undo segment, oracle discards any changes made by the

transaction until the commit statement is issued.

1. Release table/ row locks acquired by transaction:

2. Release undo segment locks acquired by transaction:

3. Generate redo committed transaction:

11. What are the features of OUI?

OUI features

The look and feel of OUI is nice and you can obtain help with installing your Oracle

software. The new capability includes installing Oracle database software, client software

and integration software.

Page 5: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 5

OUI not only installs the database software , but also provides an option to create

different types of databases using configuration assistants.

It accepts automated software installation.

It tracks its own activities with a log file, showing the activities of the OUI and packager.

12. State the approaches are available for secure the authentication

The following approaches are available to secure the authentication

Operating-System-based Authentication: if we connect to the machine hosting Oracle

database via telnet or a Windows client, in order to administer the database, this

Operating-System-based Authentication method is applicable.

Password-File-based Authentication: it enables many DBA’s to manage databases

password files work well to support organizations wanting a team of DBA’s to have a

range of capabilities on the machine.

13. Explain the importance of uses :SYS and SYSTEMS

SYS, SYSTEMS are two users Oracle creates when installing the database, each having own

default password. The default password for SYS = change_on_install; for SYSTEMS=manager.

SYS is more important than SYSTEMS.

14. Explain the concept of authentication with a password file.

Authentication with a password file

The DBA creates the password file, and passwords for all others permitted to administer Oracle

are stored in the file. The password file is created with ORAPWD utility. In both Unix and

Windows, we use orapwd.

While using ORAPWD, we pass three parameters: FILE, PASSWORD and ENTRIES

FILE-> we usually place the password file in $ORACLE_HOME/dbs

PASSWORD→ you define the password for your password file

ENTRIES→ number of entries allowed for a password file.

Example

Page 6: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 6

D:\Oracle\Bin\>orapwd File=D:\Oracle\dbs\orapwd1.pwd

PASSWORD= srm ENTRIES=5

15. Explains the list of applications available for OEM, along with description and use.

Database wizards: Used for backup management, data management, analysis.

Change management pack: This contains tolls for change management.

Database Application pack: This pack contains tools to maintain database applications-

the most important part is SQL* Plus worksheet- graphical version of SQL* Plus tool.

Diagnostic Pack: This pack contains tools to diagnose problems such as monitor locks,

top sessions, top SQL

Service Management Pack: This contains Net Manager, the Oracle networking tool to

create network configuration files.

Standard Management Pack: This pack contains the change manager and performance

manager tools.

Tuning pack: This pack contains the tools for tuning the database

16. What are the layers (tiers) available in OEM?

OEM is a three tier model.

The first tier contains java based console and integrated applications that can be

installed or run from a web browser.

Tier II is Oracle Management Service (OMS)—provide centralized intelligence and

distributed control between clients and managed nodes. OMS uses OEM repository as

back end.

Tier III is composed of targets such as databases, nodes or other managed services.

17. Define: Oracle instance, Oracle Database. What is the normal database operation?

Oracle database is a set of tables, indexes and procedures and other objects used for storing

data. It is identified by the database name DB_NAME.

Oracle Instance is the memory structures, background processes and disk resources.

To start the instance, the steps given are carried out.

Page 7: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 7

1. Start SQL* plus and login as sysdba.

2. From SQL* plus, use the start_option [dbname] to start the instance.

A database instance is a set of memory structures that manage database files. A database is a

set of physical files on disk created by the CREATE DATABASE statement. The instance

manages its associated data and serves the users of the database. 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.

Normal database operation means that an instance is started and the database is mounted and open.

This mode allows any valid user to connect to the database and perform data access operations.

18. What are the Options available for starting Oracle?

We can start a database using OEM instance manager. There are several options available for

starting Oracle instances: with or without mounting the database.

startup nomount

startup mount

startup open

startup force

Starting the database automatically

19. What are the Options available for stopping Oracle?

Options for stopping Oracle There are several modes for shutting down a database: normal, immediate, transactional, and abort.

Shutting Down with the Normal Mode

Shutting Down with the Immediate Mode

Shutting Down with the Transactional Mode

Shutting Down with the Abort Mode

Page 8: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 8

Unit-I (Part-B Questions)

1. Explain in detail about Oracle server Architectural Components.

2. List out and explain the various methods of starting an Oracle Instance.

3. Write a note on creating Oracle database.

4. List out and explain the various methods of shutting down an Oracle Instance .

5. Discuss in detail about OUI.

6. Describe the various Stages in processing queries, changes and commits.

7. Discuss the OEM architecture and its components.

********************

Unit-2 PART-A QUESTIONS

1. What are the three important units in logical Oracle disk resource?

The three important units in logical Oracle disk resources are

1. Table spaces

2. Segments

3. Extends

2. What are Tablespaces?

A tablespace is a logical database structure that is designed to store other logical database

structures. Oracle sees tablespace as a large area of space into which Oracle can place new

objects. Space in tables is allocated to segments

4. Explain the following: i. DBA_FREE_SPACE_COALESCED ii.DBA_EXTENTS

4. What are the uses of UNDO segments?

The key objective of UNDO segments is to support: Transaction rollback. When a ROLLBACK

statement is issued inside a transaction in order to cancel the changes done to the database, then

Page 9: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 9

the UNDO data records are used to reverse those changes by writing them back to the underlying

table and index data blocks.

5. State The Purpose and structure of online redo logs.

Oracle uses redo logs to track data changes users make to database. This entry is placed in redo

log buffer of SGA. The online redo log of a database consists of two or more online redo log

files. LGWR writes to online redo log files in a circular fashion. When the current online redo

log file fills, LGWR begins writing to the next available online redo log file. When the last

available online redo log file is filled, LGWR returns to the first online redo log file and writes to

it, starting the cycle again

Unit-2 PART-B QUESTIONS

1. What is a control file? Discuss about Managing Control Files and Multiplexing

Control Files.

2. Explain with a neat diagram the logical structure of the database.

3. Discuss in detail about maintaining redo log files

4. Discuss the importance of tablespaces in Oracle

5. Explain the following-

i. The Purpose and structure of online redo logs

ii. Controlling log switches and checkpoints

iii. Managing redo logs with OMF

UNIT 3 PART-A QUESTIONS

1. What is a primary key?

The primary key of a database table is the unique identifier for that table that distinguishes each

row in the table from all other rows. A PRIMARY KEY constraint consists of two data-integrity

rules for the column declared as the primary key. First, every value in the primary key column

must be unique in the table. Second, no value in the column declared to be the primary key can

be NULL. Primary keys are the backbone of the table.

2. Write a note on foreign keys

Page 10: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 10

The creation of a FOREIGN KEY constraint from one table to another defines a special

relationship between the two tables that is often referred to as a parent-child relationship,

illustrated in Figure . The parent table is the one referred to by the foreign key, while the child

table is the table that actually contains the foreign key. The DBA should ensure that foreign keys

on one table refer only to primary keys on other tables

3. What are cluster tables ?

Cluster tables are logical tables that must be assigned to a table cluster when they are defined.

Cluster tables can be used to strore control data. They can also be used to store temporary data or

texts, such as documentation. A transparent table is a table that stores data directly.

4. Write the SQL syntax for creating temporary tables.

5. What is a check constraint?

CHECK constraints allow the DBA to specify a set of valid values for a column, which Oracle

will check automatically when a row is inserted with a non-NULL value for that column. This

constraint is limited to hard-coded valid values only. In other words, a CHECK constraint cannot

“look up” its valid values anywhere, nor can it perform any type of SQL or PL/SQL operation as

part of its definition.

6. Explain ‘Not NULL Constraints’

NULL cannot be specified as the value for a column on which the NOT NULL constraint is

applied. Often, the DBA will define this constraint in conjunction with another constraint. For

example, the NOT NULL constraint can be used with a FOREIGN KEY constraint to force

validation of column data against a “valid value” table.

7. What are the statements available in Oracle for maintaining rollback segments

Page 11: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 11

Several statements are available in Oracle for maintaining rollback segments. The first is the

alter rollback segment statement. The alter rollback segment statement has one additional

clause for you to use, and that clause is shrink to. A rollback segment can be dropped if it is no

longer needed. The statement used for this purpose is drop rollback segment rollback_seg.

DROP ROLLBACK SEGMENT rollseg01;

8. What are the common problems encountered by rollback segments?

Insufficient Space for Transactions The first of these problems is insufficient space for the

transaction undo information in the rollback segment. Some errors indicating insufficient space

for the transaction’s data change information include those shown in the following code block:

Read Consistency Errors Recall that rollback segments allow transaction-level read

consistency for all statements running on the database. A long-running query in one session that

starts before a change on that data is committed by another session will see the data as it existed

pre-commit. If Oracle cannot provide a read-consistent view of data, the following error will

ensue: You Cannot Take a Tablespace Offline

Recall that you cannot take a rollback segment offline if it contains active transactions. The same

restriction applies to tablespaces that contain those active rollback segments. You will receive

the following error if you attempt to do so:

9. Explain Row Migration and Chaining

If pctfree is too low for blocks in a table, update statements may increase the size of that row,

only to find there is not enough room in the block to fit the change. Thus, Oracle has to move the

row to another block in which it will fit. Row migration degrades performance when the server

process attempts to locate the migrated row, only to find that the row is in another location.

Chaining is also detrimental to database performance. Chaining is when data for one row is

stored in multiple blocks. This is a common side-effect in tables with columns defined to be

datatype LONG, because the LONG column data is stored inline with the rest of the table. The

server process must piece together one row of data using multiple disk reads.

Page 12: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 12

10. What is non-partitioned B-Tree-index in oracle?

The B-tree index is the traditional indexing mechanism used in Oracle. It stores data in a treelike

fashion . At the base of the index is the root node, which is an entry point for your search for data

in the index. The root node contains pointers to other nodes at the next level in the index.

Depending on the value you seek, you will be pointed in one of many directions. The next level

in the index consists of branch nodes, which are similar to the root node in that they, too, contain

pointers to the next level of nodes in the index. Again, depending on the value you seek, you will

be pointed in one of many directions. Branch nodes point to the highest level of the index, the

leaf nodes.

In this highest level, index entries contain indexed column values and the corresponding

ROWIDs of rows storing those column values. Each leaf node is linked both to the leaf node on

its left and right, in order to make it possible to search up and down through a range of entries in

the index.

11. Write a note on Bitmap Indexes

Though all indexes in Oracle are stored with the root-branch-leaf structure , bitmap indexes are

conceptualized differently. Instead of storing entries for each row in the table, the bitmap index

stores an entry containing each distinct value, the start and end ROWID to indicate the range of

ROWIDs in this table, and a long binary string with as many bits as there are rows in the table.

12. Define: Reverse-Key Indexes

This type of index is the same as a regular B-tree index, except for one thing—the data from the

column being indexed is stored in reverse order. Thus, if the column value in a table of first

names is JASON, the reverse-key index column will be NOSAJ. The benefit of reverse-key

indexes is that they enhance performance in Oracle Parallel Server environments.

13. What is a trigger?

Page 13: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 13

A trigger is a database object directly associated with a particular table that fires whenever a

specific statement or type is issued against that table. The types of statements that fire triggers

are data manipulation statements: update, delete, and insert statements. The basic type of

database trigger is a statement trigger.

14. Write a note on: Enabling, Disabling, and Dropping Triggers

Triggers will fire after they are created, meaning that they are enabled. You can change the status

of a trigger from enabled to disabled and back again. If the trigger is disabled, it will not fire. The

trigger will also not fire after it has been dropped. You may want to disable a trigger if you want

to perform some large DML operation on the table to which the trigger belongs, but have the

trigger not fire. The alter trigger trigname enable and alter trigger trigname disable statements

enable and disable triggers, respectively. The drop trigger trigname statement removes the

trigger.

****************

UNIT-3-PART-B QUESTIONS

1. Explain the various data types available in Oracle.

2. Explain in detail about Different index types and their uses.

3. Discuss about Creating B-tree and Bitmap indexes.

4. Explain the types of declarative integrity constraints in Oracle.

5. Elucidate the different methods of Implementing Data-Integrity Constraints.

6. Discuss in detail about Reorganizing indexes

7. Explain various types of tables used for storing data

Page 14: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 14

Unit IV Part-A Questions

1. Write a short note on ‘quota’.

A quota is a limit on the amount of space the user’s database objects can occupy within

the tablespace. If a user attempts to create a database object that exceeds that user’s quota

for that tablespace, then the object creation script will fail. Quotas can be specified either

in kilobytes (K) or megabytes (M).

2. Explain the call-level usage limits.

At the call level, the resource-usage areas can have limits assigned for them within the

profiles you create. If the user exceeds the call-level usage limits they have been

assigned, the SQL statement that produced the error is terminated, any transaction

changes made by the offending statement only are rolled back, previous statements

remain intact, and the user remains connected to Oracle. Call-level usage limits are

identified as follows:

logical_reads_per_call The maximum number of disk I/O block reads that can be

executed in support of the user’s processing in one session.

cpu_per_call The maximum allowed CPU time in 1/100 seconds that any individual

operation in a user session can use.

3. Explain any two object privileges

Select Permits the grantee of this object privilege to access the data in a table,

sequence, view, or snapshot.

Insert Permits the grantee of this object privilege to insert data into a table or, in some

cases, a view.

Update Permits the grantee of this object privilege to update data into a table or view.

Delete Permits the grantee of this object privilege to delete data from a table or view.

Alter Permits the grantee of this object privilege to alter the definition of a table or

sequence only. The alter privileges on all other database objects are considered system

privileges.

Page 15: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 15

Index Permits the grantee of this object privilege to create an index on a table already

defined.

References Permits the grantee to create or alter a table in order to create a FOREIGN

KEY constraint against data in the referenced table.

Execute Permits the grantee to run a stored procedure or function.

4. How do you use AUDIT command for statement audits?

After deciding what to audit, you must begin auditing by setting the AUDIT_TRAIL

initsid.ora parameter appropriately.

The general syntax for setting up auditing on statements or system privileges is as

follows. The following code block shows an example of an audit statement:

AUDIT CREATE TABLE, ALTER TABLE, DROP TABLE

BY Krishnamoorthy

WHENEVER SUCCESSFUL;

5. What are the guidelines available for user account management?

➢ Use a standard password for user creation, such as 123abc or first1, and use password

expire to force users to change this password to something else the first time they log into

Oracle.

➢ Avoid OS authentication unless all your users will access Oracle while connected directly

to the machine hosting your database

➢ Be sure to always assign temporary tablespace and default tablespace to users .

➢ Give few users quota unlimited. Although it’s annoying to have users asking for more

space, it’s even more annoying to reorganize tablespaces carelessly filled with database

objects.

Become familiar with the user-account management and other host machine limits that

can be set via profiles. These new features take Oracle user-account management to new

levels of security

6. Write a note on dropping user accounts.

As users come and go, their access should be modified to reflect their departure. To drop

a user from the database, you execute the drop user statement. If a user has created database

Page 16: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 16

objects, the user cannot be dropped until the objects are dropped, as well. In order to drop the

user and all related database objects in one fell swoop, Oracle provides the cascade option.

DROP USER Krishnamoorthy CASCADE;

Unit IV Part-B

1. Discuss about creating new database users

2. Explain (i) monitoring information about existing users (ii) altering and dropping

existing users

3. Discuss the methods of Administering passwords using Profiles in Oracle

4. Explain the various system privileges

5. Discuss about Granting and revoking privileges

6. Elucidate the importance of (i)Administering profiles (ii) controlling resource use

with profiles

7. A Database administrator is involved with maintaining the database of a company

with thousands of users. Illustrate how the DBA can perform: Creating new

database users, altering and dropping existing users.

8. Explain the concepts of :various system privileges , granting and revoking user

privileges

Unit-5-PART – A Questions

1. What is the significance of database backups? OR In what situations will database

backups be necessary?

The implications of system failure for this example depend on which component is lost. Figure

illustrates the basic components of the database server used in this company. The problems

created by various components in this architecture have varying solutions. For example, if the

processor or memory chips of a database server were to fail, chances are that the situation,

though annoying, would be recoverable with or without the presence of additional copies of data

waiting in the wings for the inevitable problem to occur. The same may be said for the loss of a

disk controller, the device used to manipulate the disks of a server.

Page 17: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 17

Disk crashes are another story. No database recovery involving the replacement of data caused

by failure of a disk can be performed without the use of a backup. Although several things can

fail on a database server that will not require the database to require backups, the one thing that

can happen, namely disk failure, wreaks havoc in terms of data loss. This loss is so costly that

every system, large and small, should take the necessary precautions to ensure that the system

will be recoverable to the extent that it needs to be.

2. What is a read only tablespace?

Drawing on the points made about backup needs for less-frequently changed database objects,

there are special considerations that should be made for backup on the least-frequently changed

database objects. In cases where special "valid values" data is kept in lookup tables on the Oracle

database, the tables that contain this data can be placed into special tablespaces called read only

tablespaces. These tablespaces in the database are precisely that—the data in the tables of a read

only tablespace may not be changed.

3. What are the considerations for backup on read only tablespaces?

Data that is read-only in a database represents the easiest effort in terms of DBA maintenance

and backup for the sake of database recovery. In situations where database data is defined as

read only, the DBA needs to back up the read only tablespace once for every time the data

changes. The mechanics of setting a tablespace to read only status is covered in Unit II. Once

the tablespace is read only, the DBA can rest assured that the data will not change. As such,

repeated backup is not necessary. The data in a read only tablespace needs to be backed up only

once.

Page 18: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 18

4. What is a logical backup?

The logical database export consists of performing an export of the individual database objects

available in an Oracle database. Oracle provides a utility for logical export of database objects

and users called EXPORT. When EXPORT is used to create a backup of database objects, the

backed-up copy of information is placed in a file called the dump file. A complementary

application called IMPORT is designed to bring the information out of a file created by

EXPORT, either into the database from which the objects were exported or into another Oracle

database

5. What is a physical backup?

Physical backups rely on the use of the operating system to copy the physical files that comprise

the Oracle database from an operating system perspective. Further, for the application to

incorporate changes to the database that weren’t written to the database, the use of archived

copies of the online redo logs must be used to ensure that appropriate changes are made to ensure

a recovery up to the moment of failure. An example of the changes that exist in the instance that

may not have been written to file are the changes to data blocks that are sitting in the dirty buffer

write queue waiting to be written to disk as part of a checkpoint.

6. Define the following terms,

i. Statement failure

When Oracle cannot process a statement issued by a user, this situation is generally known as

statement failure. There are several causes for statement failure. First of all, a user may be

attempting to issue a statement referencing a table that does not exist, or to which they do not

have permission to use. In this case, Oracle will issue the user an error that details both the area

of the statement that contained the error and a reference to the Oracle error message code

ii. User process failure

Page 19: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 19

The failure of a user process requires more intervention from the Oracle server. In some cases,

the user may cancel or terminate the statement or process he or she is running with a CTRL-C

command from SQL*Plus. Another cause might be if the client PC hangs while connected to

Oracle. If a user process terminates, then the process monitor (PMON) background process

intervenes, which saves the DBA some time and effort. PMON is there to handle automatic

process recovery for the database: when PMON detects the process failure, PMON rolls back the

failed process and releases locks on the tables

iii. Instance failure

There are many possible causes of instance failure, including problems with the memory of the

host system running Oracle, power outages, or background process failures. Although instance

failure requires the DBA to restart the database, the actual recovery is handled by Oracle via the

system monitor (SMON) background process.

iv. User error

Users occasionally make mistakes. Sometimes they accidentally delete data or drop database

objects. This situation tests the limits of your backup and recovery strategy. If the problem is

related to data change, the user may be able to recover using the rollback command. You may

see this situation occur quite a bit in development environments where the developers are their

own DBAs. You may want to consider informal or formal training for your developers if this

situation gets aggravating.

v. Media failure

Media failure means the loss of access to information on a disk due to data corruption, disk-head

hardware failure, other types of I/O hardware failure, or accidental datafile deletion. There are

two types of media failure that may occur on the database: temporary and permanent. If data on

disk is temporarily unavailable (perhaps because a disk controller card failed), the problem can

be corrected easily and quickly with a hardware replacement

PART - B

Page 20: Unit-I (Part-A Questions & Answers) 1. What is a Dedicated ...€¦ · Oracle database: An Oracle database consists of files. Sometimes these are referred to as operating system files,

PCA15E04 Database Administration QUESTION BANK @ N KRISHNAMOORTHY Page 20

1. Distinguish between logical and physical backups.

2. Explain the following backup methods,

i. Logical export

ii. The offline backup

iii. The online backup

3. Explain in detail about logical export.

4. What is an offline backup? What is the general process for taking an offline

backup?

5. What is an online backup? What is the process for taking an online backup?

6. Explain the Oracle redo log architecture with neat diagram.

7. Explain the different types of database failure.

8. Explain the different types of database failure.