2008. június 15., vasárnap

Oracle - adatbázis export, import

előkész:
mkdir /usr/lib/oracle/xe/tmp

CREATE OR REPLACE DIRECTORY dmpdir AS '/usr/lib/oracle/xe/tmp';

GRANT READ,WRITE ON DIRECTORY dmpdir TO proba_nev;

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_HOME
ORACLE_SID=XE
export ORACLE_SID
NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export NLS_LANG
PATH=$ORACLE_HOME/bin:$PATH
export PATH

export:
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/expdp SYSTEM/system SCHEMAS=proba_nev DIRECTORY=dmpdir DUMPFILE=proba.dmp LOGFILE=expschem.log

import:
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/impdp SYSTEM/system SCHEMAS=proba_nev DIRECTORY=dmpdir DUMPFILE=schema1.dmp REMAP_SCHEMA=proba_nev:hr EXCLUDE=constraint, ref_constraint, index TABLE_EXISTS_ACTION=replace LOGFILE=impschema.log

vagy

/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/impdp SYSTEM/system SCHEMAS=proba_nev DIRECTORY=dmpdir DUMPFILE=schema1.dmp REMAP_SCHEMA=proba_nev:hr TABLE_EXISTS_ACTION=replace LOGFILE=impschema.log

Nincsenek megjegyzések: