Database backup and restoration process 1. New database instance note character set is UTF-82, command line C: \> set ORACLE_SID = EAS (note Instance name is not capitalized Instance name) define default instance C: \> sqlplus/nolog3. user system user Logon SQL> user/password as sysdba ---- log on to SQLPLUS to create the directory SQL> create directory expdp_dump as 'f: \ dmp '; ---- Use system to log on and grant the user permissions www.2cto.com SQL> grant read, write on directory expdp_dump to system; ---- use LS to log on to SQLPLUS to create the directory SQL> SELECT * FROM dba_directories;
---- Query the subdirectories created: SQL> SELECT * FROM dba_directories; ---- to delete a directory, You Need To: SQL> drop directory expdp_dump; 4. Create the actual folder path on the corresponding drive letter. 5. Back up the database instance expdp system/eas70 @ orcl schemas = ccmc directory = expdp_dump exclude = statistics parallel = 4 dumpfile = eas703.dmp logfile, create a tablespace, the tablespace name is the same as the database name backed up.) create tablespace EAS_D_EASDBA_STANDARD datafile 'f: \ database \ eas. ora 'size 5000 m autoextend on; create tablespace EAS_D_EASDBA_TEMP2 datafile 'F: \ database \ eastmp. dbf 'size 500 m autoextend on; create temporary tablespace EAS_T_EASDBA_STANDARD tempfile 'f: \ database \ eas. dbf 'size 500 m autoextend on;
7. create user ccmc identified by eas default tablespace EAS_D_EASDBA_STANDARD temporary tablespace partition; ---- view user method: www.2cto.com select * from all_users; ---- delete user method: drop user test cascade; 8. grant connect, resource, dba to ccmc; 9. Import --- import Script: $ impdp system/easdba remap_schema = ccmc: ccmc directory = expdp_dump parallel = 2 dumpfile = eas703.dmp logfile1_eas703.txt author lucherr