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
No comments:
Post a Comment