Monday, February 25, 2013

Login to different database on the same host


Login to different database on the same host.

[oracle@localhost ~]$ echo $ORACLE_SID------->Display the name of the current database.
orcl

[oracle@localhost ~]$ ORACLE_SID=trndb------->Name of the database in which we want to login.
[oracle@localhost ~]$ echo $ORACLE_SID -------> To confirm name of the DB
Trndb                                       

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 7 21:33:26 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> select instance_name from V$instance;
select instance_name from V$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available---------->problem because trndb is down.

solution:
[oracle@localhost ~]$ sqlplus / as sysdba
SQL> startup open;
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
trndb

SQL> select instance_name, status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
trndb            OPEN

Again connecting to orcl database


[oracle@localhost ~]$ ORACLE_SID=orcl
[oracle@localhost ~]$ echo $ORACLE_SID
orcl-----------------------------------.Database name

[oracle@localhost ~]$ sqlplus / as sysdba
SQL> select instance_name, status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
orcl             OPEN

Note:SQL> starup open;
SP2-0734: unknown command beginning "starup ope..." - rest of line ignored.
SQL> startup open;
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> select instance_name from v$instance;
select instance_name from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available

Solution:SQL> startup open;
ORACLE instance started.

Total System Global Area 1577058304 bytes
Fixed Size                  1219640 bytes
Variable Size            1157628872 bytes
Database Buffers          402653184 bytes
Redo Buffers               15556608 bytes
Database mounted.
Database opened.

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
orcl

Note: the value of ORACLE_SID should be change before

1)starting(opening) database i.e sql>startup open;
2)starting enterprise manager service i.e $emctl start dbconsole

But listner and isqlplus service can be started irrespective of the value of ORACLE_SID

eg.
For trndb
i)$ORACLE_SID=trndb
$sqlplus / as sysdba

SQL>startup open;
SQL>quit
SQL>emctl start dbconsole


For orcl
$ORACLE_SID=orcl


$sqlplus / as sysdba

SQL>startup open;
SQL>quit
SQL>emctl start dbconsole

Note: No need to start separately
$lsnrctl start
$isqlplus start

[oracle@localhost ~]$ emctl start dbconsole
TZ set to Asia/Chungking
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
 - An instance of Oracle Enterprise Manager 10g Database Control is already running.

* Connecting using sqlplus
[oracle@localhost ~]$ sqlplus system/oracle@orcl

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 7 21:58:36 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

[oracle@localhost ~]$ sqlplus system/trndb@trndb

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 7 22:02:20 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> quit

Note: Port number for isqlplus is same (ie 5560) for all database
port number for enterprise manager is different for different database.

[oracle@localhost db_1]$ cd /u01/app/oracle/product/10.2.0/db_1/install
[oracle@localhost install]$ ls
createseed1.sh      jlib      portlist.ini       rootlocaladd  unix
createseed.sh       make.log  readme.txt         seed.log      utl
envVars.properties  oratab    rootdeletenode.sh  templocal
[oracle@localhost install]$ cat portlist.ini
iSQL*Plus HTTP port number =5560
Enterprise Manager Console HTTP Port (orcl) = 1158------>for orcl
Enterprise Manager Agent Port (orcl) = 3938
Enterprise Manager Console HTTP Port (trndb) = 5500------>for trndb
Enterprise Manager Agent Port (trndb) = 1830

* Starting isqlplus from web
http://localhost:5560/isqlplus

eg.
username               system           system
passwd                 oracle           trndb
connect Identifier     orcl             trndb

where, orcl and trndb is the database name.

fig1 and fig 2


* Connecting using EM
http;//localhhost:1158/em------------->for orcl


fig1 and fig 2


http://localhost:5500/em----------->for trndb


To confirm EM
[oracle@localhost ~]$ emctl status dbconsole
TZ set to Asia/Chungking
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/localhost.localdomain_orcl/sysman/log


  Note:
      emctl stop  dbconsole
[oracle@localhost ~]$ emctl stop dbconsole
TZ set to Asia/Chungking
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
 ...  Stopped.

emctl status dbconsole
[oracle@localhost ~]$ emctl status dbconsole
TZ set to Asia/Chungking
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is not running.

emctl start dbconsole
[oracle@localhost ~]$ emctl start dbconsole
TZ set to Asia/Chungking
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://localhost.localdomain:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control .........................
....... started.


Database Startup Modes


1)NOMOUNT----An instance is typically started only in NOMOUNT mode during database creation,
during re-creation of control files, or during certain backup and recovery scenarios.

2)MOUNT----     Locating and opening the control files specified in the parameter file
ʉۢ Reading the control files to obtain the names and statuses of the data files and online
     redo log files. However, no checks are performed to verify the existence of the data
     files and online redo log files at this time.
To perform specific maintenance operations, start an instance and mount a database, but
do not open the database.

3)OPEN
A normal database operation means that an instance is started and the database is mounted
and opened. With a normal database operation, any valid user can connect to the database
and perform typical data access operations.
Opening the database includes the following tasks:
  • Opening the online data files
  • Opening the online redo log files
If any of the data files or online redo log files are not present when you attempt to open the
database, then the Oracle server returns an error.
During this final stage, the Oracle server verifies that all the data files and online redo log
files can be opened and checks the consistency of the database. If necessary, the System
Monitor (SMON) background process initiates instance recovery.

4)RESTRICT
5)FORCE

1)NOMOUNT
2)MOUNT
            :Used in maintenance mode
            :only DBA can log in   
3)OPEN
            Generally working mode







shutdown
                                      A  I   T   N
Shutdown Mode
Allows new connections               No No  No  No
Waits until current sessions end     No No  No  Yes
Waits until current transactions end No No  Yes Yes
Forces a checkpoint and closes files No Yes Yes Yes
                  Shutdown mode:
                   • A = ABORT
                   • I = IMMEDIATE
                   • T = TRANSACTIONAL
                   • N = NORMAL




Starting and shutting down database using Enterprise Manager-----7-feb-2013

first check the port number
[oracle@localhost ~]$ cd /u01/app/oracle/product/10.2.0/db_1/install
[oracle@localhost install]$ ls
createseed1.sh      jlib      portlist.ini       rootlocaladd  unix
createseed.sh       make.log  readme.txt         seed.log      utl
envVars.properties  oratab    rootdeletenode.sh  templocal
[oracle@localhost install]$ vi portlist.ini

iSQL*Plus HTTP port number =5560
Enterprise Manager Console HTTP Port (orcl) = 1158
Enterprise Manager Agent Port (orcl) = 3938
Enterprise Manager Console HTTP Port (trndb) = 5500
Enterprise Manager Agent Port (trndb) = 1830


In browser;
http://localhost:1158/em
username:sys
password:oracle
connect As :SYSDBA

EM---Home---shutdown

Host credentails-----------both given by OS
username:oracle
password:oracle

Database credentials
username:sys
password:oracle
Database:orcl
Connect As:SYSDBA

click ok
Advance options
(.)immediate
click ok
click yes

SQL command
SHUTDOWN immediate

problem:can't start the database or can't login into EM
.
solution: wait for a while then try again.

click on start up

Host Credentials
username:oracle
password:oralce

database credentials
username:sys
password:oracle
Connect As: SYSDBA

Advanced Options
(.) open the database

click ok

click yes

fig starting2
SQL COMMAND
STARTUP


login to database
username:sys     
password:oracle
Connect As :SYSDBA



Initialization Parameter.

location of the initialization parameter

[oracle@localhost db_1]$ cd /u01/app/oracle/product/10.2.0/db_1/dbs/
hc_orcl.dat      initdw.ora       lkORCL           orapwtrndb
hc_trndb.dat     init.ora         lkTRNDB          spfileorcl.ora
hc_trndp.dat     initorcl.ora     orapworcl        spfiletrndb.ora

spfileorcl.ora----------->server parameter file (binary file)
                        Also called SPFILE
where,orcl -------------->database name

used by default to open the database.

initorcl.ora------------->Parameter file (text file)
                  Also called PFILE

where, orcl-------------->DB name

this file is used automatically to open the database,if server paramere(spfile) is missing.

Types of Initialization Parameter

on the basis of their Nature of change

A.Dynamic Parameter-these parameter adopts changes of their value immediately

B.Non-Dynamic (static) Parameter-these paramete adopts changes after database restart.


Creating PFILE from SPFILE
[oracle@localhost ~]$ sqlplus / as sysdba
SQL> create pfile from spfile;

File created.

SQL>quit

[oracle@localhost ~]$ cd /u01/app/oracle/product/10.2.0/db_1/dbs/
[oracle@localhost dbs]$ ls
hc_orcl.dat   initdw.ora    lkORCL     orapwtrndb
hc_trndb.dat  init.ora      lkTRNDB    spfileorcl.ora
hc_trndp.dat  initorcl.ora  orapworcl  spfiletrndb.ora

init.ora---------->pfile

[oracle@localhost dbs]$ cat init.ora

if already exists, then remove it.

[oracle@localhost dbs]$ rm init.ora
[oracle@localhost dbs]$ ls
hc_orcl.dat   hc_trndp.dat  initorcl.ora  lkTRNDB    orapwtrndb      spfiletrndb.ora
hc_trndb.dat  initdw.ora    lkORCL        orapworcl  spfileorcl.ora

*Creating SPFILE

[oracle@localhost dbs]$ sqlplus / as sysdba
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>quit

[oracle@localhost ~]$ cd /u01/app/oracle/product/10.2.0/db_1/dbs/
[oracle@localhost dbs]$ ls
hc_orcl.dat   hc_trndp.dat  initorcl.ora  lkTRNDB    orapwtrndb      spfiletrndb.ora
hc_trndb.dat  initdw.ora    lkORCL        orapworcl  spfileorcl.ora
[oracle@localhost dbs]$ rm spfileorcl.ora
[oracle@localhost dbs]$ ls
hc_orcl.dat   hc_trndp.dat  initorcl.ora  lkTRNDB    orapwtrndb
hc_trndb.dat  initdw.ora    lkORCL        orapworcl  spfiletrndb.ora

[oracle@localhost dbs]$ sqlplus / as sysdba
SQL> startup open;----->spfile is search, if spfile is not found,then initorcl.ora (pfile) file is search.
ORACLE instance started.

Total System Global Area 1577058304 bytes
Fixed Size                  1219640 bytes
Variable Size            1157628872 bytes
Database Buffers          402653184 bytes
Redo Buffers               15556608 bytes
Database mounted.
Database opened.

SQL> create spfile from pfile;

File created.

To confirm
[oracle@localhost dbs]$ cd /u01/app/oracle/product/10.2.0/db_1/dbs/
[oracle@localhost dbs]$ ls
hc_orcl.dat   hc_trndp.dat  initorcl.ora  lkTRNDB    orapwtrndb      spfiletrndb.ora
hc_trndb.dat  initdw.ora    lkORCL        orapworcl  spfileorcl.ora

*By passing SPFILE

oracle@localhost dbs]$ sqlplus / as sysdba

SQL> startup pfile=/u01/app/oracle/product/10.2.0/db_1/dbs/initorcl.ora open;-->to open the database using the given PFILE, even if the SPFILE exists.
ORA-01081: cannot start already-running ORACLE - shut it down first

solution:


Viewing Inialization Parameter

[oracle@localhost ~]$ sqlplus / as sysdba
SQL> show parameter <parameter_name>;----->to view the value of the given parameter.

eg.
SQL> show parameter shared_pool_size;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size                     big integer 0
java_pool_size                       big integer 0
large_pool_size                      big integer 0
shared_pool_size                     big integer 0
db_4k_cache_size                     big integer 0
db_8k_cache_size                     big integer 0
db_block_size                        integer     8192
db_cache_size                        big integer 0

SQL>show parameter <pattern>;------->Display values of all the parameters that matches the given pattern.

SQL> show parameter;---------------->Display all parameters.   

NAME                                 TYPE        VALUE
------------------------------------ ----------- --------------------------
undo_retention                       integer     900
undo_tablespace                      string      UNDOTBS1
use_indirect_data_buffers            boolean     FALSE
user_dump_dest                       string      /u01/app/oracle/admin/orcl/udu


*Altering the value of Initialization parameter.


SQL> show parameter sga_max_size;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_max_size                         big integer 1504M


SQL> alter system set sga_max_size=1400 scope=both;
alter system set sga_max_size=1400 scope=both
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified

solution:because of non-dynamic

SQL> alter system set sga_max_set=1400M scope=spfile;      
alter system set sga_max_set=1400M scope=spfile
                 *
ERROR at line 1:
ORA-02065: illegal option for ALTER SYSTEM

solution:
SQL> alter system set sga_max_size=1500M scope=spfile;

System altered.

SQL> show parameter sga_max_size;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_max_size                         big integer 1504M

SQL> shutdown immediate;
SQL> startup open;
SQL> show parameter sga_max_size;
SQL> show parameter sga_max_size;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_max_size                         big integer 1504M


note........need to find out the problem, why the value didn't change.

Viewing and Altering Initiazation parameter using EM.

http://localhost:1158/em
username:sys
password:oracle
connect as :sysdba

EM--administratoion-----under Database Configuration--click all initialization parameters

*Dynamic performance view

Name begin with v$

Dynamic performance views contains real-time data of the database and is useful for the tuning database performance.

http://localhost:5560/isqlplus

username:system
password:oracle
Connect Identifier as orcl

select * from v$sga;

output:

NAME              VALUE
Fixed Size        1219184
Variable Size           838862224
Database Buffers 402653184
Redo Buffers            15556608

select * from v$table

problem:select * from v$table
              *

ERROR at line 1:
ORA-00942: table or view does not exist

solution-----------need to be find out

select * from v$sga_dynamic_components;


COMPONENT   CURRENT_SIZE      MIN_SIZE    MAX_SIZE    USER_SPECIFIED_SIZE     OPER_COUNT       LAST_OPER_TYPE    LAST_OPER_MODE    LAST_OPER_TIME    GRANULE_SIZE
shared pool       167772160   167772160   0     0     0     STATIC                  16777216
large pool 16777216    16777216    0     0     0     STATIC                  16777216
java pool   16777216    16777216    0     0     0     STATIC                  16777216
streams pool      0     0     0     0     0     STATIC                  16777216
DEFAULT buffer cache    402653184   402653184   0     0     0     INITIALIZING                    16777216
KEEP buffer cache       0     0     0     0     0     STATIC                  16777216
RECYCLE buffer cache    0     0     0     0     0     STATIC                  16777216









Sunday, February 17, 2013

Information about Oracle Background process


Information about Oracle Background Processes.

[oracle@localhost ~]$ echo $ORACLE_SID----->Display the name of the default database.
orcl

[oracle@localhost ~]$ ps -ax | grep orcl
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
 3608 pts/1    S+     0:00 grep orcl

solution: start orcledatase through commnad
[oracle@localhost ~]$ startoracle.sh

[oracle@localhost ~]$ ps -ax | grep orcl
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
 4101 pts/1    S      0:00 /u01/app/oracle/product/10.2.0/db_1/perl/bin/perl /u01/app/oracle/product/10.2.0/db_1/bin/emwd.pl dbconsole /u01/app/oracle/product/10.2.0/db_1/localhost.localdomain_orcl/sysman/log/emdb.nohup
 4126 pts/1    Sl     0:21 /u01/app/oracle/product/10.2.0/db_1/jdk/bin/java -server -Xmx256M -XX:MaxPermSize=96m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -DORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 -Doracle.home=/u01/app/oracle/product/10.2.0/db_1/oc4j -Doracle.oc4j.localhome=/u01/app/oracle/product/10.2.0/db_1/localhost.localdomain_orcl/sysman -DEMSTATE=/u01/app/oracle/product/10.2.0/db_1/localhost.localdomain_orcl -Doracle.j2ee.dont.use.memory.archive=true -Djava.protocol.handler.pkgs=HTTPClient -Doracle.security.jazn.config=/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost.localdomain_orcl/config/jazn.xml -Djava.security.policy=/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost.localdomain_orcl/config/java2.policy -Djava.security.properties=/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/home/config/jazn.security.props -DEMDROOT=/u01/app/oracle/product/10.2.0/db_1/localhost.localdomain_orcl -Dsysman.md5password=true -Drepapi.oracle.home=/u01/app/oracle/product/10.2.0/db_1 -Ddisable.checkForUpdate=true -Djava.awt.headless=true -jar /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/home/oc4j.jar -config /u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost.localdomain_orcl/config/server.xml
 6640 ?        Ss     0:00 ora_pmon_orcl
 6642 ?        Ss     0:00 ora_psp0_orcl
 6644 ?        Ss     0:00 ora_mman_orcl
 6646 ?        Ss     0:00 ora_dbw0_orcl
 6648 ?        Ss     0:00 ora_lgwr_orcl
 6650 ?        Ss     0:00 ora_ckpt_orcl
 6652 ?        Ss     0:00 ora_smon_orcl
 6654 ?        Ss     0:00 ora_reco_orcl
 6656 ?        Ss     0:00 ora_cjq0_orcl
 6658 ?        Ss     0:00 ora_mmon_orcl
 6660 ?        Ss     0:00 ora_mmnl_orcl
 6662 ?        Ss     0:00 ora_d000_orcl
 6664 ?        Ss     0:00 ora_s000_orcl
 6705 ?        Ss     0:00 ora_p000_orcl
 6707 ?        Ss     0:00 ora_p001_orcl
 6736 ?        Ss     0:00 ora_qmnc_orcl
 6780 ?        Ss     0:00 ora_q000_orcl
 6783 ?        Ss     0:00 oracleorcl (LOCAL=NO)
 6786 ?        Ss     0:00 oracleorcl (LOCAL=NO)
 6789 ?        Ss     0:01 oracleorcl (LOCAL=NO)
 6791 ?        Ss     0:00 ora_q001_orcl
 6797 ?        Ss     0:02 oracleorcl (LOCAL=NO)
 6805 ?        Ss     0:00 oracleorcl (LOCAL=NO)
 6811 ?        Ss     0:00 oracleorcl (LOCAL=NO)
 6817 ?        Ss     0:00 oracleorcl (LOCAL=NO)
 6819 ?        Ss     0:00 oracleorcl (LOCAL=NO)
 6836 pts/1    S+     0:00 grep orcl

Getting Information about PGA,SGA,and components of SGA

[oracle@localhost ~]$ sqlplus / as dba

SQL*Plus: Release 10.2.0.1.0 - Production

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Usage 1: sqlplus -H | -V

    -H             Displays the SQL*Plus version and the
                   usage help.
    -V             Displays the SQL*Plus version.

Usage 2: sqlplus [ [<option>] [<logon>] [<start>] ]

  <option> is: [-C <version>] [-L] [-M "<options>"] [-R <level>] [-S]

    -C <version>   Sets the compatibility of affected commands to the
                   version specified by <version>.  The version has
                   the form "x.y[.z]".  For example, -C 10.2.0
    -L             Attempts to log on just once, instead of
                   reprompting on error.
    -M "<options>" Sets automatic HTML markup of output.  The options
                   have the form:
                   HTML [ON|OFF] [HEAD text] [BODY text] [TABLE text]
                   [ENTMAP {ON|OFF}] [SPOOL {ON|OFF}] [PRE[FORMAT] {ON|OFF}]
    -R <level>     Sets restricted mode to disable SQL*Plus commands
                   that interact with the file system.  The level can
                   be 1, 2 or 3.  The most restrictive is -R 3 which
                   disables all user commands interacting with the
                   file system.
    -S             Sets silent mode which suppresses the display of
                   the SQL*Plus banner, prompts, and echoing of
                   commands.

  <logon> is: (<username>[/<password>][@<connect_identifier>] | /)
              [AS SYSDBA | AS SYSOPER] | /NOLOG

    Specifies the database account username, password and connect
    identifier for the database connection.  Without a connect
    identifier, SQL*Plus connects to the default database.

    The AS SYSDBA and AS SYSOPER options are database administration
    privileges.

    The /NOLOG option starts SQL*Plus without connecting to a
    database.

  <start> is: @<URL>|<filename>[.<ext>] [<parameter> ...]

    Runs the specified SQL*Plus script from a web server (URL) or the
    local file system (filename.ext) with specified parameters that
    will be assigned to substitution variables in the script.

When SQL*Plus starts, and after CONNECT commands, the site profile
(e.g. $ORACLE_HOME/sqlplus/admin/glogin.sql) and the user profile
(e.g. login.sql in the working directory) are run.  The files may
contain SQL*Plus commands.

Solution:[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 5 06:57:19 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>

2)
SQL> show parameter SGA_TARGET;----->Display total memory associate to SGA.

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sga_target                           big integer 592M

3)SQL> show parameter DB_CACHE_SIZE------------>display db_cache_size

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_cache_size                        big integer 0

4)SQL> show parameter log_buffer;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_buffer 

5)
6)SQL> show parameter shared_pool_size;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
shared_pool_size                     big integer 0

7)SQL> show parameter large_pool_size;------------->Display total memory allocated to large pool    

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
large_pool_size                      big integer 0

8)
9)SQL> show parameter streams_pool_size;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
streams_pool_size                    big integer


Getting information about Data files, Redo log files, and control files

[oracle@localhost ~]$ cd /u01/app/oracle/oradata/orcl/--------->where orcl is the default database.
[oracle@localhost orcl]$ ls
control01.ctl  example01.dbf  redo03.log    temp01.dbf
control02.ctl  redo01.log     sysaux01.dbf  undotbs01.dbf
control03.ctl  redo02.log     system01.dbf  users01.dbf

where,
*.ctl------------>Control files
*.dbf------------>data file
*.log------------->redo log file

Getting Information about Initialization Paramater file and password file.

[oracle@localhost db_1]$ cd /u01/app/oracle/product/10.2.0/db_1/dbs
[oracle@localhost dbs]$ ls
hc_orcl.dat   init.ora      lkTRNDB     spfileorcl.ora
hc_trndb.dat  initorcl.ora  orapworcl   spfiletrndb.ora
initdw.ora    lkORCL        orapwtrndb

where,
spfileorcl.ora---------->Initialization parameter file
orapworcl---------------->password file


Getting Information about Archieved redo log files and Backup files.

[oracle@localhost ~]$ cd /u01/app/oracle/flash_recovery_area/
ORCL/  TRNDB/
[oracle@localhost ~]$ cd /u01/app/oracle/flash_recovery_area/ORCL/
[oracle@localhost ORCL]$ ls
archivelog  onlinelog

where,
archivelog---------->directory contains Archieved redo log

[oracle@localhost ORCL]$ cd archivelog/
[oracle@localhost archivelog]$ ls
2012_05_22  2012_07_24  2012_07_28  2012_09_21  2012_10_17  2013_02_05
2012_06_21  2012_07_25  2012_08_04  2012_09_29  2012_10_18

Getting Information about Alert log file.

[oracle@localhost ~]$ cd /u01/app/oracle/admin/orcl/bdump/
[oracle@localhost bdump]$ ls
alert_orcl.log      orcl_arc1_6801.trc  orcl_lgwr_6606.trc  orcl_p000_6720.trc
orcl_arc0_6218.trc  orcl_arc1_7310.trc  orcl_lgwr_6622.trc  orcl_p000_6741.trc
orcl_arc0_6586.trc  orcl_arc1_7698.trc  orcl_lgwr_6623.trc  orcl_p000_6770.trc
orcl_arc0_6638.trc  orcl_arc1_9114.trc  orcl_lgwr_6648.trc  orcl_p000_6826.trc
orcl_arc0_6667.trc  orcl_arc1_9783.trc  orcl_lgwr_6651.trc  orcl_p000_6837.trc
orcl_arc0_6691.trc  orcl_arc2_6590.trc  orcl_lgwr_6669.trc  orcl_p001_3813.trc


Creating Database

[oracle@localhost ~]$ dbca

welcome to Database configuration Assistant for oracle database---------press next
select the operation that you want to perform--->create a databse----->next
select a templete from the following list to create a databse--------->General purpose---->next
database identification:
Global Database Name:trndp.san.com----------next

Management Option:
[leave as default]
[] configure the database with enterprise manager
 (.)use database control for database management.
 press next

Database credentials
password:<passwor>

storage option:
.File System then clieck next

database file location
. use databse file locations from template.

recovery configuration
ü  specify flash recovery area
Flash recovery Area:{RACLE_BASE}/flash_recovery_area
Size:2048
tick----enable archiving

database content: leave as default

Initialization Parameter
Memory:typical
character:default
connection mode:Dedicated Server Mode

Database storage
click next

12.creating options:
ü  create databse then click finished


Modifying/configuring Oracle Database
[oracle@localhost ~]$ dbca
1)welcome:next
2)operation:configure database options
3)database:<choose the database you want to change> eg trndp
4)database content: next
5)conncetion mode :Dedicated server mode then change to shared server mode

then click ok, ok
shared server : 1

Deleting a database.
[oracle@localhost ~]$ dbca
1)welcome: next
2)operation: delete a databse
3)database : <choose the database you want to delete> eg trndp
then finish---ok