Create a table partition
Create tablespace Apps datafile ' &1\apps.dbf ' size 10m autoextend on next 8m;create tablespace appsys datafile ' &1 \appsys.dbf ' size 10m autoextend on next 8m;
Create a partitioned table space
Create tablespace apps_00 datafile ' &1\apps_00.dbf ' size 10M autoextend on next 8m;create tablespace appsys_00 Datafil E ' &1\appsys_00.dbf ' size 10M autoextend on next 8M;
Delete User
Drop user Apps Cascade;drop user Appsys Cascade;
Create user
Create user apps identified by Cape Default tablespace apps;create user Appsys identified by Cape default Tablespace Appsy S
Authorized
Grant DBA to apps with admin Option;grant dba to appsys;grant create any table to apps;grant alter any table to Apps;grant Drop any table to apps;grant create all index to Apps;grant drop any index to apps;
Create a Directory
Create or replace directory Expdp_wms_dir as ' D:\data_bak\ '; Grant read, write on the directory Expdp_wms_dir to APPS;
Exp/imp Backup and restore
Exp User/[email protected] file=d:\db_20101010.dmp log=d:\db_20101010.log owner= (apps,appsys) Imp User/[email Protected] file=d:\db_20101010.dmp log=d:\db_20101010.log fromuser=apps touser=apps fromuser=appsys Touser=appsys Ignore=y
EXPDP/IMPDP Backup Restore
EXPDP User/[email protected] dumpfile=db20141216.dmp logfile=db20141216.log schemas= (Apps,appsys) directory=expdp_ Dir job_name=expdp_job version=11.1.0.2impdp user/[email protected] dumpfile=db20141216. DMP logfile=db20141216.log schemas= (apps,appsys) Directory=impdp_dir job_name=impdp_job
Backup and restore of Oracle