You are on page 1of 3

Explain the difference between $ORACLE_HOME and $ORACLE_BASE.

ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath


ORACLE_BASE is where the oracle products reside.
How can you find out how many users are currently logged into the database? How can you find their
operating system id
There are several ways. One is to look at the v$session or v$process views. Another way is to
check the current_logins parameter in the v$sysstat view. Another if you are on UNIX is to do
a "ps -ef|grep oracle|wc -l? command, but this only works against a single instance installation.
How do you execute a host operating system command from within SQL
By use of the exclamation ball "!" (in UNIX and some other OS) or the HOST (HO) command.
If you see contention for library caches how can you fix it
Increase the size of the shared pool.
What should be done prior to installing Oracle (for the OS and the disks)
adjust kernel parameters or OS tuning parameters in accordance with installation guide. Be sure
enough contiguous disk space is available
When configuring SQLNET on the server what files must be set up
INITIALIZATION file, TNSNAMES.ORA file, SQLNET.ORA file
When configuring SQLNET on the client what files need to be set up
SQLNET.ORA, TNSNAMES.ORA
What OS user should be used for the first part of an Oracle installation (on UNIX)
You must use root first.

What file will give you Oracle instance status information? Where is it located
The alert.ora log. It is located in the directory specified by the background_dump_dest
parameter in the v$parameter table

You attempt to add a datafile and get:


ORA-01118: cannot add anymore datafiles: limit of 40 exceeded
What is the problem and how can you fix it
When the database was created the db_files parameter in the initialization file was set to 40.
You can shutdown and reset this to a higher value, up to the value of MAX_DATAFILES as
specified at database creation. If the MAX_DATAFILES is set to low, you will have to rebuild
the control file to increase it before proceeding.

Name a tablespace automatically created when you create a database.

The SYSTEM tablespace

When creating a user, what permissions must you grant to allow them to connect to the
database?

Grant the CONNECT to the user.

How do you add a data file to a tablespace?

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


How do you resize a data file?

ALTER DATABASE DATAFILE <datafile_name> RESIZE <new_size>;

What view would you use to look at the size of a data file?

DBA_DATA_FILES

What view would you use to determine free space in a tablespace?

DBA_FREE_SPACE
Name two files used for network connection to a database.

TNSNAMES.ORA and SQLNET.ORA

Is there any solution to delete a particular colum in a database by sql?


A. This is cant be done in versions before 9i. In 9i
SQL> alter table delete column

Name of database to which you are connected:


In SQL*Plus, enter the following query:
select * from global_name
Change SQL prompt name
SQL> set sqlprompt Mohan >
Mohan >
Mohan >
To view installed Oracle version information
SQL> select banner from v$version;

What type of index should you use on a fact table?


A Bitmap index.
What command would you use to create a backup control file?
Alter database backup control file to trace.
Give the stages of instance startup to a usable state where normal users may access it.
STARTUP NOMOUNT - Instance startup
STARTUP MOUNT - The database is mounted
STARTUP OPEN - The database is opened
How can you find all the processes on your system?
Expected answer: Use the ps command
How can you find your id on a system?
Expected answer: Use the who am i command.
What is the finger command?
The finger command uses data in the passwd file to give information on system users.
What is the easiest method to create a file on UNIX?
Use the touch command
How can you determine if an Oracle instance is up from the operating system level?
Level: Low

Expected answer: There are several base Oracle processes that will be running on multi-user
operating systems, these will be smon, pmon, dbwr and lgwr. Any answer that has them using
their operating system process showing feature to check for these is acceptable. For example,
on UNIX a ps -ef|grep dbwr will show what instances are up.

What file will give you Oracle instance status information? Where is it located?

The alert<SID>.ora log. It is located in the directory specified by the background_dump_dest


parameter in the v$parameter table.

You attempt to add a datafile and get:

ORA-01118: cannot add anymore datafiles: limit of 40 exceeded

What is the problem and how can you fix it?

When the database was created the db_files parameter in the initialization file was set to 40.
You can shutdown and reset this to a higher value, up to the value of MAX_DATAFILES as
specified at database creation. If the MAX_DATAFILES is set to low, you will have to rebuild the
control file to increase it before proceeding.
How do you resize a data file?

Ans: ALTER DATABASE DATAFILE /home2/oradata/billnet/billnet01.dbf


resize 200M;

What is the maximum number of columns in a table of oracle DB ?


254

Whats the length of SQL integer?


32 bit

You might also like