Dec 13, 2006

DMV: dm_db_file_space_usage

Select
SUM (user_object_reserved_page_count)*8/1024 as user_objects_mb,
SUM (internal_object_reserved_page_count)*8/1024 as internal_objects_mb,
SUM (version_store_reserved_page_count)*8 as version_store_kb,
SUM (unallocated_extent_page_count)*8/1024 as freespace_mb
From sys.dm_db_file_space_usage
where database_id=2

DMV: dm_os_memory_objects

select type, sum(pages_allocated_count) total_pages_allocated_count
from sys.dm_os_memory_objects
group by type
order by 2 desc

DMV: dm_os_memory_clerks

--
--Check Memory Usage
--
select top 15
type,
sum(single_pages_kb)/1024 single_pages_mb,
sum(multi_pages_kb)/1204 multi_pages_mb,
sum(awe_allocated_kb)/1024 awe_allocated_mb
from sys.dm_os_memory_clerks
group by type
order by 2 desc

Oct 4, 2006

Oracle Diagnostic Tools

RACDDT - a data collection tool designed and configured specifically for gathering diagnostic data related to Oracle's Real Application Cluster (RAC) technology.
See MetalinkNote:301138.1

RDA - Remote Diagnostic Agent -
a set of command line diagnostic scripts that are used to gather detailed information about an Oracle environment.
See Metalink Note:314422.1
RDA 4 - Health Check / Validation Engine Guide
RDA 4 - RAC Cluster Guide

OSW - OS Watcher -
a collection of UNIX shell scripts intended to collect and archive operating system and network metrics to aid support in diagnosing complex RAC issues as well as generic performance issues.
SeeMetalinkNote:301137.1

LTOM - The On-Board Monitor -
a java program designed as a real-time diagnostic platform for deployment to a customer site. LTOM differs from other support tools, as it is proactive rather than reactive. LTOM provides real-time automatic problem detection and data collection.
See
MetalinkNote:352363.1

Support Diagnostics Tools Catalog for E-Business Suite -
a test repository, execution engine, and user interface for customers, support analysts, and developers to plug-in diagnostic test tools/scripts
See MetalinkNote:179661.1


Sep 28, 2006

Oracle released Berkely DB 4.5

Yesterday Oracle released Berkely DB 4.5. It is open source(originially from SleepyCat), embeddede, non-relational, unattended DBMS.
Key Features in R4.5:
  • Multi-Version Concurrency Control
  • Non-stop Upgrades - coooool
  • Replication Framework
Links:
http://www.sleepycat.com/
http://www.oracle.com/database/berkeley-db.html

Sep 26, 2006

SQL Trace (incl. 10g new tracing features)

--
-- sql trace
--
--related parameters
timed_statistics
max_dum_file_size
user_dump_dest

--to get session to be traced
select sid,serial# from v$session where ...
--or
select s.sid,s.serial#,s.username,s.osuser from v$session s,v$process p where s.paddr=p.addr;

use dbms_support to enable and disable the trace
($ORACLE_HOME/rdbms/admin/dbmssupp.sql)

--session level
alter session set sql_trace =true;
--instance level
alter system set sql_trace =true;

--trace other session
--to start tracing
--
--dbms_support(available in Oracle 7.2 and above)
exec dbms_support.start_trace_in_session(,);
exec dbms_support.start_trace_in_session(,,binds=true);
exec dbms_support.start_trace_in_session(,,waits=true,binds=true);
--
----dbms_system(undocumented since Oracle 7.3 to 10g R2)
see a guide at http://orafaq.com/papers/dbms_sys.doc
exec dbms_system.set_sql_trace_in_session(sid,serial#,true);

--to check trace file under user_dum_dest
tkprof source output explain=user/pwd sys=no

--to stop tracing
--dbms_support
exec dbms_support.stop_trace_in_session(,);
--dbms_system
exec dbms_system.set_sql_trace_in_session(sid,serial#,false);

--Introduced in Oracle 10.1
DBMS_MONITOR
trcsess
DBA_ENABLED_TRACES
see
http://julian.dyke.users.btopenworld.com/com/Presentations/OracleDiagnostics.ppt

Further Notes:
http://www.oracle.com/technology/oramag/oracle/04-jan/o14tech_perf.html
http://www.petefinnigan.com/ramblings/how_to_set_trace.htm
http://www.nyoug.org/Presentations/SIG/DBA/hotsos_perf.PDF

Sep 13, 2006

Oracle Background Processes, incl. 10gR2

-------------------

--New in 10gR2

-------------------

PSP0 (new in 10gR2) - Process SPawner - to create and manage other Oracle processes.
NOTE: There is no documentation currently in the Oracle Documentation set on this process.

LNS1(new in 10gR2) - a network server process used in a Data Guard (primary) database.

Further explaination From "What's New in Oracle Data Guard?" in the Oracle® Data Guard Concepts and Administration 10g Release 2 (10.2)

"During asynchronous redo transmission, the network server (LNSn) process transmits redo data out of the online redo log
files on the primary database and no longer interacts directly with the log writer process. This change in behavior allows the log writer (LGWR) process to write redo data to the current online redo log file and continue processing the next request without waiting for inter-process communication or network I/O to complete."

-------------------

--New in 10gR1

-------------------

MMAN - Memory MANager - it serves as SGA Memory Broker and coordinates the sizing of the memory components, which keeps track of the sizes of the components and pending resize operations. Used by Automatic Shared Memory Management feature.

RVWR -Recovery Writer - which is responsible for writing flashback logs which stores pre-image(s) of data blocks. It is used by Flashback database feature in 10g, which provides a way to quickly revert an entire Oracle database to the state it was in at a past point in time.
- This is different from traditional point in time recovery.
- One can use Flashback Database to back out changes that:
- Have resulted in logical data corruptions.
- Are a result of user error.
- This feature is not applicable for recovering the database in case of media
failure.
- The time required for flashbacking a database to a specific time in past is
DIRECTLY PROPORTIONAL to the number of changes made and not on the size
of the database.


Jnnn - Job queue processes which are spawned as needed by CJQ0 to complete scheduled jobs. This is not a new process.


CTWR - Change Tracking Writer (CTWR) which works with the new block changed tracking features in 10g for fast RMAN incremental backups.

MMNL - Memory Monitor Light process - which works with the Automatic Workload Repository new features (AWR) to write out full statistics buffers to disk as needed.

MMON - Memory MONitor (MMON) process - is associated with the Automatic Workload Repository new features used for automatic problem detection and self-tuning. MMON writes out the required statistics for AWR on a scheduled basis.

M000 - MMON background slave (m000) processes.

CJQn - Job Queue monitoring process - which is initiated with the job_queue_processes parameter. This is not new.

RBAL - It is the ASM related process that performs rebalancing of disk resources controlled by ASM.

ARBx - These processes are managed by the RBAL process and are used to do the actual rebalancing of ASM controlled disk resources. The number of ARBx processes invoked is directly influenced by the asm_power_limit parameter.

ASMB - is used to provide information to and from the Cluster Synchronization Services used by ASM to manage the disk resources. It is also used to update statistics and provide a heartbeat mechanism.

Changes about Queue Monitor Processes

The QMON processes are optional background processes for Oracle Streams Advanced Queueing (AQ) which monitor and maintain all the system and user owned AQ objects. These optional processes, like the job_queue processes, does not cause the instance to fail on process failure. They provide the mechanism for message expiration, retry, and delay, maintain queue statistics, remove processed messages from the queue table and maintain the dequeue IOT.

QMNx - Pre-10g QMON Architecture

The number of queue monitor processes is controlled via the dynamic initialisation parameter AQ_TM_PROCESSES. If this parameter is set to a non-zero value X, Oracle creates that number of QMNX processes starting from ora_qmn0_ (where is the identifier of the database) up to ora_qmnX_ ; if the parameter is not specified or is set to 0, then QMON processes are not created. There can be a maximum of 10 QMON processes running on a single instance. For example the parameter can be set in the init.ora as follows

aq_tm_processes=1 or set dynamically via alter system set aq_tm_processes=1;

QMNC & Qnnn - 10g QMON Architecture

Beginning with release 10.1, the architecture of the QMON processes has been changed to an automatically controlled coordinator slave architecture. The Queue Monitor Coordinator, ora_qmnc_, dynamically spawns slaves named, ora_qXXX_, depending on the system load up to a maximum of 10 in total.

For version 10.01.XX.XX onwards it is no longer necessary to set AQ_TM_PROCESSES when Oracle Streams AQ or Streams is used. However, if you do specify a value, then that value is taken into account. However, the number of qXXX processes can be different from what was specified by AQ_TM_PROCESSES. If AQ_TM_PROCESSES is not specified in versions 10.1 and above, QMNC only runs when you have AQ objects in your database.

Oracle Background processes By Don Burleson

Comparison of Background Processes between 8i OPS and 9i RAC

20 Differences Between Oracle on NT and Oracle on Unix


ORA-1000 MAXIMUM NUMBER OF CURSORS EXCEEDED after Java application migrated

ORA-1000 MAXIMUM NUMBER OF CURSORS EXCEEDED
in Java application orcurred after application migrated for iPlanet to JBoss infrastructure.

It is a very very common error message. I remember I was asked this question in a job interview a couple of years ago. But I cannot remember what I explained. Anyway I got the offer. Ok, I'd like to give it a summary, even I still have a question left.

--
--Troubleshooting Steps:
--
1. Login database as DBA to check current setting of open_cursors
> show parameter open_cursors

2. Check who open too many cursors

set line 140
col username format a16
col machine format a26
SELECT vs.username, vs.sid,vs.serial#, vs.machine,Count(*) "Open_Cursors"
FROM v$open_cursor voc, v$session vs
WHERE voc.sid= vs.sid
GROUP BY vs.username, vs.sid,vs.serial# ,vs.machine
ORDER BY 5;

3. Get the entire queries

SELECT vst.HASH_VALUE, vst.SQL_TEXT, vst.PIECE, Count(vst.SQL_TEXT)
FROM v$open_cursor voc, v$sqltext vst, v$session vs
WHERE voc.sid= vs.sid
AND vs.username='CMGWAOE'
and voc.HASH_VALUE=vst.HASH_VALUE
and voc.ADDRESS=vst.ADDRESS
GROUP BY vst.HASH_VALUE,vst.SQL_TEXT ,vst.PIECE
/

4. Narrow down where these queries are called or from.

5.Review Java code with developer.

Make sure to close "ResultSet" objects before closing "PreparedStatement"/"CallableStement" objects.

if forgot to close the "ResultSet", some java application server(JBoss) may not have ability to close the (Oracle) cursors when close statement.(iPanet does)
If connection pooling is using, this issue may get even worse.

6. After enhance java code, problem went away.

But further question is, why child cursors still are open in shared-pool after parent cursor closed???

Jun 11, 2006

sync text index may not work in oracle9i(90130) sometimes

--
--Issue
--
CTX_DDL.SYNC_INDEX doesn't work on local partition of text index after new data is loaded.

CTXSYS.CTX_DDL.SYNC_INDEX('mytext_idx', '5M', 'partition2006');
(introduced in 816)
--
--diagnose
--
1.to check data in the base table

2.to check if data in text index
select text_clob from mytext_table where contains(text_clob,'test',1)>0;

3.to try to re-sync the partition index.
NOT WORK

--
--workaround
--
to rebuild local partition index
alter index mytext_idx rebuild partition partition2006;
--
--Advanced Diagnosis
--
1. to check all index partitions.
select IXP_TABLE_NAME,IXP_INDEX_NAME, IXP_INDEX_NAME,IXP_STATUS
from CTX_USER_INDEX_PARTITIONS;

2. to check which indexes are waiting to be indexed.
re-sync may remove records from this view.
select PND_INDEX_NAME,PND_PARTITION_NAME,COUNT(*) from ctx_user_pending group by PND_INDEX_NAME,PND_PARTITION_NAME;

3.to check the index error.
select * from CTX_USER_INDEX_ERRORS order by ERR_TIMESTAMP


--
--Reseach
--
Local Partitioned Index Maintenance in Technical Overview: Oracle Text version 9.0.1
SYNC OPTIMIZE

sync/optimize won't support in 10g.
alter index INDEXNAME rebuild parameters('sync') partition PARTITIONNAME;
alter index INDEXNAME rebuild parameters('optimize fast/full') partition PARTITIONNAME;

**
**It's not a good idea to use a tentative release in production.
**

May 2, 2006

oracle10gR2 supports SQL function LNNVL

actually it was undocumented since 7.2 or 7.3 according to the notes of Jonathan Lewis.

Apr 13, 2006

Oracle Transaction Isolation

ORA-8117 error - cann't serialize access this transaction.

Oracle has three type of isolation levels:
read committed: it is default, I think it won't need to explain. Also this is how database to keep statement-level read consistency.
serializable: query result is repeatable during the transaction, it won't see the committed change by other transaction. if you try to update the data during the serializable transaction, which was changed by another concurrent user, this ORA-8117 error will happen. It's how database to keep transaction-level read consistency.
read-only: just read-only, no insert/update/delete is allowed.

Commands:
set transaction isolation level serializable;
set transaction isolation level read committed;
set transaction isolation level read only;

Also you can do it in session level, ex:
alter session set isolation level read only;

Oracle 10g DB and MS SQL Server 2005 Comparison by Edison Group

Edison Group just released a comparsing report: Comparative Management Cost Study of Oracle Database 10g Release 2 and Microsoft SQL Server 2005 (PDF).

It provides detailed execises performing on these two databases, it's the greatest report so far I have seen.Worthwhile to read it.

Ubuntu Linux

Ubuntu Linux
Ubuntu Blog
Installation Guide - Oracle 10G on Ubuntu Linux
and search "Ubuntu Oracle" in google.

List only directories

ls -d */
ls -l | grep "^d"

Apr 11, 2006

JasperReports - Open Source Reporting Tool

JasperReports is a powerful open source Java reporting tool that has the ability to deliver rich content onto the screen, to the printer or into PDF, HTML, XLS, CSV and XML files.

It is entirely written in Java and can be used in a variety of Java enabled applications, including J2EE or Web applications, to generate dynamic content.

Its main purpose is to help creating page oriented, ready to print documents in a simple and flexible manner.

About EnterpriseDB


About EnterpriseDB (From EnterpriseDB website)

EnterpriseDB produces the award-winning EnterpriseDB relational database management system (RDBMS). An enterprise-class RDBMS that is based on PostgreSQL, the world's most advanced open source database, EnterpriseDB runs many Oracle applications unchanged, performs better than native PostgreSQL and is priced to reflect its open source heritage.

EnterpriseDB was founded in March, 2004 to bring the benefits of open source to enterprise databases. The company launched its first product in May, 2005 and has quickly become one of the most talked-about open source companies. Headquartered in New Jersey, EnterpriseDB has engineering centers in New Jersey, Islamabad and Pune. EnterpriseDB has received venture capital financing from Charles River Ventures, Valhalla Partners and Sony Online Entertainment.

Export technology is changed in 10g

Export Dump 'expdp' is 2-time faster than previous 'exp', and support external tables.
Dump file and logs are located on server side under defined directory in the database.

PL/SQL API: DBMS_DATADUMP

--
--1. Create a directory
--
$ mkdir /test

CONNECT / AS SYSDBA
-- Create directory
create or replace directory TEST_DIR as '/test';

GRANT READ,WRITE ON DIRECTORY TEST_DIR TO scott;

--
--Drop Directory
--
DROP DIRECTORY TEST_DIR;

--
--2. Related Views
--
dba_directories, all_directories

--check privilieges
--
all_tab_privs, user_*,dba_*
all_tab_privs_made, user_tab_privs_made
all_tab_privs_recd, user_tab_privs_recd

--
--3.Estimate export dump before it gets underway
--
expdp mydbauser/mydbapwd ESTIMATE_ONLY=Y SCHEMA=myschema DIRECTORY=TEST_DIR

expdp mydbauser/mydbapwd ESTIMATE_ONLY=Y FULL=Y DIRECTORY=TEST_DIR

--
--Dump
--
expdp mydbauser/mydbapwd DIRECTORY=TEST_DIR SCHEMA=myschema DUMPFILE=schema_dmp LOGFILE=schema_log

expdp mydbauser/mydbapwd DIRECTORY=TEST_DIR FULL=Y DUMPFILE=fulldb_dmp LOGFILE=fulldb_log

--
--4.Monitor Export Dump job
--
select * from dba_datapump_jobs;

Apr 10, 2006

UNIX Commands

find ./ -name "*.arc" -atime +7 -exec ls {} \;
find ./ -type f -mtime +10 -exec ls {} \;
find ./ -type f -mtime +10 -exec rm {} \;

#
# Common Unix Command for DBA
# Oct 04,2002

$ORACLE_HOME/install/utl/unixenv

###########################
#OS setup
###########################
uname -X
uname -a
hostname
ulimit -a
swap -l
sar -r 1 1
vmstat
mount
df -k
env | sort
sar -v 1 1

ipcs -sa
/etc/sysdef | grep SEM
ipcs -ma
/etc/sysdef | grep SHM
/var/opt/oracle/oratab

#PhysicalMemory
prtconf|grep Memory

#CPU Info
psrinfo -v
mpstat 1 3

#OS Patches
showrev -p

#OS Packages
pkginfo -l

#system error log
dmesg

#National Language Support(NLS) Environment Settings
NLSPATH
NLS_LANG
ORA_NLS33
TZ

#profile
/etc/profile
$HOME/.profile
#for CDE login
$HOME/.dtprofile

/etc/*.conf

#Checking if domainname is set: domainname

/etc/hosts
/etc/groups
/etc/networks
/etc/nodename

#system configuration
/usr/sbin/sysdef|grep -v instance |grep -v drv |tail -77

#system uptime
uptime


##########################################
#Performance Overview
##########################################
=====================
#Process Overview
=====================
#Oracle:
ps -ef|grep oracle|wc -l

#Background:

#Listeners:

#Root:

#Number Users:

#Total Processes
ps -ef|wc -l

#Databases Running: (Note: the CPU Usage in Minutes)
/usr/ucb/ps aux|head -1
/usr/ucb/ps aux|grep oracle

#Who is logged on
who

#Current CPU HOGS:
top 15

#Current TOP 10 CPU by % CPU
/usr/ucb/ps aux|head -11

#root CPU Hogs

=====================
#Disk Related
=====================
#File System Free Space in KB
df -k

#throughput MB/sec, transfers/sec, avg service time milliseconds
iostat -M 10 3

#Current Disks (see iostat -E) run 7200rpm @@100 random I/O /sec or 500 sequential/sec
#100 I/O per sec imples seek time 10 ms since most access is seek time
#Disks on PC capable of sustaned 8-16 MBit/sec and Unix 32-40 Mbit/sec

#throughput KB/sec, transfers/sec, avg service time milliseconds
iostat -d 10 3

#extended disk statistics
#look for disks more than 30 % busy and service times of more than 50ms
#iostat -x.b > 30% && iostat -x.svc_t > 50ms == busy disk
#look for overloaded scsi bus
#iostat -x.w >= 5% == busy scsi bus
#striping filesytems and tablespaces over multiple disks and
#controllers can spread i/o over multiple spindles
iostat -xe 10 3

#disk error reports
iostat -e

#paging activities
sar -g 1 4|grep -v SunOS

#swap activities
swap -l
swap -s



=====================
#CPU Overview
=====================

#General CPU Information
psrinfo -v

#CPU per-processor statistics
mpstat 1 3 -v

#Sar CPU Usage
sar -u 1 4|grep -v SunOS

#Top Report Usage
top


#system calls
sar -c 1 4|grep -v SunOS

#Memory Statistics
vmstat -s

# message and semaphore
sar -m 1 4|grep -v SunOS


###################
#Network
###################
ifconfig -a

#tcpip settings
ndd /dev/tcp \?

#SQL*Net Config Files
sqlnet.ora
tnsnames.ora
listener.ora

#Intelligent Agent Config Files
$ORACLE_HOME/network/admin/snmp_ro.ora
$ORACLE_HOME/network/admin/snmp_rw.ora
$ORACLE_HOME/network/log/nmiconf.log
$ORACLE_HOME/network/agent/services.ora
#Configuration file for webServer discovery
$ORACLE_HOME/network/agent/config/nmxw.ora
#config file for discovering Oracle Applications
$ORACLE_HOME/network/agent/oapps.ora

#Heterogeneous Services Config Files
#HS parameters that are needed for an ODBC Agent.
$ORACLE_HOME/hs/admin/inithsodbc.ora

#Oracle Management Server Config Files
$ORACLE_HOME/sysman/config/omsconfig.properties

#Listener Status and Services

===============================
#Environment
===============================
#Checking to see if TNS_ADMIN is being used

#list of .ora files from /etc

#list of .ora files from /var/opt/oracle

#List of .ora files from $ORACLE_HOME/network/admin
sqlnet.ora
listener.ora
tnsnames.ora
snmp_rw.ora
snmp_ro.ora

#Checking for any all tnslsnr PROCESSES: (Look for CPU hogs)

#Checking for any TWO TASK PROCESSES:

#Is ORACLE_HOME / SID / TWO_TASK set:
ORACLE_BASE
ORACLE_SID
ORACLE_OWNER
OES_ORACLE_HOME
ORACLE_TERM
ORACLE_HOME

==========================
#Network Performance
==========================
ping -s -v -R 1280 10

Ping Report from sun3-lab.vialta-inc.com (this machine) to sun3-lab.vialta-inc.com (this machine)

Ping Report from sun3-lab.vialta-inc.com (this machine) to 10.0.43.88 (wan)

Ping Report from sun3-lab.vialta-inc.com (this machine) to sun3-lab.vialta-inc.com (rdbms)

Ping Report from sun3-lab.vialta-inc.com (this machine) to 10.0.44.101 (web)

Ping Report from sun3-lab.vialta-inc.com (this machine) to 10.0.43.88 (client)

#Are the tns processes running and for what listeners:
UID PID PPID C STIME TTY TIME CMD
oracle 8469 7662 0 21:53:15 pts/3 0:00 grep tnslsnr
oracle 7298 1 0 Aug 22 ? 4:27 /oracle/9.0.1/bin/tnslsnr LISTENER -inherit

#Unix netstat ESTABLISHED
netstat|grep ESTABLISHED|wc -l

#Unix netstat WAITING
netstat|grep WAITING|wc -l

netstat -a

#Ports Being Used
/etc/services

#Network Cards and setup
ifconfig -a:

#Network Performance
netstat -s

############################
#RDBMS Product Versions
############################
init.ora
V$Parameters
V$Option
SGA Information: v$SGA V$SGASTAT
V$License Information
V$Compatibility Information
NLS_Database_Parameters
NLS_Instance_Parameters
NLS_Session_Parameters
NLS Session TimeZone
NLS Database TimeZone

Java Information
Java Objects
Java Roles
Oracle Supplied Java Users

V$Controlfile Information
Log Information : V$Log V$Logfile
Undo Information: V$UndoStat DBA_Undo_Extents

V$System_Event
V$Session_Wait
Latch Information: V$Latch V$Latchholder

Tablespaces
Tablespace
Locally Managed Temporary Tablespaces
Database Files
Database Files
Temp files

Invalid Objects

All_Errors: dba_errors

Install logs
$ORACLE_HOME/install/make.log
$ORACLE_BASE/oraInventory/logs/installActions*.log

Last 7940 Lines of Alert Log
$ORACLE_BASE/admin/sid/bdump/alert_sid.log

WebIV

Last Trace File

Trace/Log Directory Listings
Background Dump Destination (from background_dump_dest setting)
Default Background Dump Destination ($ORACLE_HOME/rdbms/log)
Core Dump Destination (from core_dump_dest setting)
Default Core Dump Destination($ORACLE_HOME/dbs)
User Dump Destination

check the port is open or not --> telnet sun2-prod-101 1754

check ORACLE port is open or not -->tnsping "(ADDRESS=(PROTOCOL=TCP)(HOST=sun2-prod-101)(PORT=1748))"

check port is listened or not --> netstat -an|grep 1754

check DNS resolution --> nslookup

check history commands-->history / last

trace system calls and signals --> truss lsnrctl dbsnmp_start

truncate current used log file --> :>listener.log


Tool for Sun Performance and Tuning
====================================
SE Toolkit can be downloaded from www.setoolkit.com
sun2-noc:(need x-server)
/opt/RICHPse/bin/se ../examples/zoom.se&


$ export ORACLE_SID=orcl1; echo 'startup'|sqlplus "/ as sysdba"


DNS config file-->/etc/resolv.conf


Use of the Secure Copy (scp) Command
=====================================
General Syntax:

scp [-pr] [userid@][source host:][path to file] [userid@][destination host:][path to file]

The "-p" option is to preserve the time stamp of the file.
The "-r" option is to recursively copy files from the source directory specified.
Once you enter the scp command, you will prompted for access to the host

Examples:
From Remote Unix to Local Unix
-------------------------------
$ scp emao@10.0.23.102:/u01/oradata/8.1.7/dbs/* /opt/oracle/8.1.7/dbs/

From Local Unix to Remote Unix
-------------------------------
$ scp /opt/oracle/8.1.7/dbs/* emao@10.0.23.102:/u01/oradata/8.1.7/dbs/


check partition block size-->df -g

compare files-->cksum

replace a word in vi editor--> :%s/test/exam/g
:3,5s/test/exam/g

undo in vi editor--> u

help
: set all
display line number
: set number
ignore case-sensitve
: set ic

shift+w
shift+4
shift+0
shift+j

Track shell script--> sh -x dbora start

nohup sqlplus "/as sysdba" <<>/usr/proc/bin/pmap -x
Refer to Note:163763.1 Diagnosing Oracle memory on Sun Solaris using PMAP


ipcs -m

report per-processor statistics-->mpstat

check os bit-->isainfo -b

prompt hostname and SID(.profile)--> PS1="`hostname`*\${ORACLE_SID}$ "

see the whole process string-->/usr/ucb/ps -auxww|grep jre


zcat O8i_DG_R3_0_2_Sun_tar.Z | tar xvf -
|--> uncompress O8i_DG_R3_0_2_Sun_tar.Z
+--> tar -xvf O8i_DG_R3_0_2_Sun_tar


rsh without prompting password
-------------------------------
--> .rhosts under remote user default hhome
sun7-dev$ cat .rhosts
sun6-dev oracle
--> make sure hostname is the same as iin "who" on remote site
sun7-dve$ who
oracle pts/5 Feb 15 14:35 (sun6-dev)
Note: http://sunsolve.Sun.COM for the Document 12029 REMOTE LOGIN PSD/FAQ.

mail on unix
--------------------
send email/pager-->
echo 'test' | mailx -s 'Subject: Alter" emao@sun5-noc.vialta-inc.com
echo 'test' | mailx -s 'Subject: Alter" 5103766360@messaging.nextel.com

email auto-forward--> .forward (under user default home)
/etc/mail/alias


--to show 32-bit or 64 bit OS
--sparcv9-->64 bit
$ isalist
sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc