May 29, 2009

TNS Basics

If you are getting TNS-03505 when using tnsping or sqlplus then check the following -

sqlnet.ora - NAMES.DEFAULT_DOMAIN = world

then ensure your entry in the tnsnames.ora file has either a .world fixed to the ens of the database alias or there is an extention.

i.e. -

RISST01P.WORLD = ...

May 15, 2009

SQLPLUS Reports

Use some of the following guidelines when writing SQLPLUS Reports

Compute - use perform computations on groups of data. Types of computiations include AVG, MAX, MIN, STD, SUM, VAR.

break on tablespace_name skip 2
compute sum label "SIZE (M) " of size on tablespace_name

use multiple columns to perform multiple computionation and grand computations etc.

May 1, 2009

datapump

Use the following as a guide when using datapump to extract data and load data into a 10 or above oracle database.

1. create datapump directory and give read, write privilege to required users.

2. Use the following examples to unload and load data from an oracle database.

expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log

impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log

Refer to the following link for more details.

http://www.oracle-base.com/articles/10g/OracleDataPump10g.php