Category Archives: Oracle

oracle related

how to run OS commands in the sqlplus command prompt

For example, you want to list all the directories from /home/oracle directory. To do that run the below command in sql prompt:

SQL> host ls /home/oracle

a Documents links.txt Pictures Templates afiedt.buf Downloads Music psit test Desktop labs oradiag_oracle Public Videos Continue reading


Leave a comment

Filed under Oracle

oracle 11g- emctl start dbconsole fails on standalone grid

When trying to start dbconsole, I got below error on my linux server

bash-3.00$emctl start dbconsole

Oracle Enterprise Manager 11g Database Control Release
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.

Starting Oracle Enterprise Manager 11g Database Control…………….
………………………………………………………………………………… failed.

Please verify the targets.xml file and notice all the information are correct. If no values in it, then copy the information”agentseed”, EMD_URL and host from your file(located under $ORACLE_HOME/<instance name>/sysman/config directory) and add in the targets.xml.


<Targets AGENT_SEED=”259930272″>
<Target TYPE=”oracle_emd” NAME=”″/>
<Target TYPE=”host” NAME=””/>

Then, please ensure that database and listener is up and running and run the below commands from oracle Grid home bin directory (e.g in my case /u01/app/oracle/product/11.2.0/grid/bin

emctl stop dbconsole
emca -repos drop
emca -repos create
emca -config dbcontrol db

Leave a comment

Filed under Oracle

oracle 11g – Location of SPFILE or PFILE

Default location of spfile or pfile is $ORACLE_HOME/dbs, however if you are not sure, then run the below command using sqlplus:

SQL> show parameter spfile;

Name                       Type                                           Value
————–               ——————                    —————————–
spfile                         string                                /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileorcl.ora

With ASM, the spfile is often located into an ASM disk group.

Leave a comment

Filed under Oracle

how to figure out the issues with flash recovery area in oracle database.

Space usage in the flash recovery area is automatically monitored by Oracle database. Warning messages are written to the alert logs when the space usage has reached 85% and a critical warning is issued when the space usage nears 97%. Oracle also removes files that are on the obsolete file list when there is less than 10 percent free space available. Alternatively dba_outstanding_alerts view can be queried to get the details about the warnings and suggested actions:


Leave a comment

Filed under Oracle

Oracle database – What is the difference between restoring and recovering?

Restoring involves copying backup files from secondary storage (backup media) to disk. This can be done to replace damaged files or to copy/move a database to a new location. The data file is at a prior point of time than the current database.

Recovery is the process of applying redo logs to the database to roll it forward. One can roll-forward until a specific point-in-time, or roll-forward until the last transaction recorded in the log files.

Leave a comment

Filed under Oracle

Oracle database – location of alert log

You can run the below sql command to find the alert log location of your database instance:

SQL> select value from v$parameter where name=’background_dump_dest’;


[oracle@oracle trace]$ ls
alert_orcl.log       orcl_arc2_6924.trc  orcl_cjq0_4073.trc  orcl_dbw0_4004.trc   orcl_j001_3624.trc

or run the below sql command:

SQL> show parameter background_dump_dest

NAME                                 TYPE        VALUE
———————————— ———– ——————————
background_dump_dest                 string      /u01/app/oracle/diag/rdbms/orcl/orcl/trace

Leave a comment

Filed under Oracle

how to start weblogic in the background without passing username and password

In the script you can add the below information and save it
export WLS_USER
export WLS_PW

E.g :
export WLS_USER
export WLS_PW

Then run the “nohup ./ &” in command prompt as shown below
[oracle@Ban bin]$ nohup ./ &

Leave a comment

Filed under Oracle, weblogic