Friday 26 October 2007

Allah

Ar-Razzaq: The Provider
Al-Haqq: The Truth
Ar Rehman: The Beneficent
Ar-Raqeeb: The Watchful

Data Pump

Default locaion for dump and log:
/u01/oracle/product/10.2.0/rdbms/log/

SQL> select * from dba_directories WHERE directory_name = 'DATA_PUMP_DIR';

expdp userid=system/oracle schemas=nidb_test dumpfile=my_exp1.dmp logfile=log_exp1.log

create directory ni_dmp_dir as '/home/oracle/db_dumps';

grant read, write on directory ni_dmp_dir to nislam;

expdp userid=system/oracle schemas=nidb_test directory=ni_dmp_dir dumpfile=my_exp1.dmp logfile=log_exp1.log




select * from dba_datapump_jobs;

Wednesday 17 October 2007

Date diff

You have table a with col t and f, to get diff of dates

select trunc( t-f ) "Day",
trunc( mod( (t-f)*24, 24 ) ) "Hr",
trunc( mod( (t-f)*24*60, 60 ) ) "Mi"
from a;