I. Export data using a data Pump 1.1. Determine the character set:
SELECT * from V$nls_parameters;
Or
Select Userenv (' language ') from dual;
1.2. Setting up the client character set (Windows)
Set Nls_lang = Nls_language_nls_territory. Nls_characterset
1.3. Determine the table space occupied by the object of the schema
Sql> Select distinctsegment_type,tablespace_name SQL> fromdba_segments SQL> WhereOwner='NC2010'; Segment_type Tablespace_name------------------ ------------------------------TABLEnnc_data03TABLEnnc_data02lobsegment nnc_data01INDEXnnc_index01INDEXNNC_DATA01INDEXnnc_index02TABLENnc_data01lobindex nnc_data01INDEXnnc_index039rows selected. SQL>
1.4 Viewing the User default table space
Select Username,default_tablespace from User_users;
1.5. Export data with Data pump
--Create directory and empowerSql>Conn/ asSysdba; SQL> CreateDirectoryBackup as 'E:\backup'; SQL> Grant Read, write onDirectoryBackup toNC60; SQL> Select * fromdba_directories--Export Schema[[email protected] ~]$ EXPDP NC60/NC60 DIRECTORY=BackupDumpFile=Tianlesoftware.dmp SCHEMAS=NC60 logfile=Exp.Log;--Note, if the source library is different from the Oracle version of the destination library, you need to specify the version parameter when exporting.
Two. Import a dump file into a RAC or single instance 2.1 to determine the character set
Select Userenv (' language ') from dual;
2.2 Setting up the client character set (Linux)
Export Nls_lang = nls_language_nls_territory. Nls_characterset
2.3 Checking the RAC run status 2.4 Creating related users and table spaces
--View data FilesSelect file_name fromDba_data_files;--Create tablespace (same as 1.3 query results)--sql> Create tablespace nnc_data01 datafile ' +data/orcl/datafile/tianlesoftware.dbf ' size 50m;--sql> Create tablespace nnc_data02 datafile ' +data/orcl/datafile/tianlesoftware.dbf ' size 50m;--sql> Create tablespace nnc_data03 datafile ' +data/orcl/datafile/tianlesoftware.dbf ' size 50m;--sql> Create tablespace nnc_index01 datafile ' +data/orcl/datafile/tianlesoftware.dbf ' size 50m;--sql> Create tablespace nnc_index02 datafile ' +data/orcl/datafile/tianlesoftware.dbf ' size 50m;--sql> Create tablespace nnc_index03 datafile ' +data/orcl/datafile/tianlesoftware.dbf ' size 50m;--Create userSql> Create UserNC60 identified byNC60defaultTablespace NNC_DATA01TemporaryTablespaceTemp;--granting PermissionsGrantResource,connect,dba toNC60;
2.5 Creating an Import directory
Sql> Create directory backup as '/backup ';
Sql> Grant read,write on the directory backup to NC60;
2.6 Importing Data
[Email protected] u01]$ export ORACLE_SID=ORCL1
[Email protected] u01]$ IMPDP nc60/nc60 directory=backup dumpfile=nc60.dmp schemas=nc60 logfile=impdp.log;
Note, if the source library is different from the Oracle version of the destination library, you need to specify the version parameter when importing.
Oracle uses data pump to migrate users