select * from v$nls_parameters;
或
select userenv('language') from dual;
set NLS_LANG = NLS_LANGUAGE_NLS_TERRITORY.NLS_CHARACTERSET
SQL> Select distinct segment_type,tablespace_name SQL> From dba_segments SQL> Where owner='NC2010'; SEGMENT_TYPE TABLESPACE_NAME ------------------ ------------------------------ TABLE NNC_DATA03 TABLE NNC_DATA02 LOBSEGMENT NNC_DATA01 INDEX NNC_INDEX01 INDEX NNC_DATA01 INDEX NNC_INDEX02 TABLE NNC_DATA01 LOBINDEX NNC_DATA01 INDEX NNC_INDEX03 9 rows selected. SQL>
select username,default_tablespace from user_users;
--创建directory 并赋权 SQL> conn / as sysdba; SQL> create directory backup as 'e:\backup'; SQL> grant read,write on directory backup to NC60; SQL> select * from dba_directories --导出schema [oracle@localhost ~]$ expdp nc60/nc60 DIRECTORY=backup DUMPFILE=tianlesoftware.dmp SCHEMAS=NC60 logfile=exp.log; --注,如果源库与目的库oracle版本不同,导出时需指定version参数。
select userenv('language') from dual;
export NLS_LANG = NLS_LANGUAGE_NLS_TERRITORY.NLS_CHARACTERSET
--查看数据文件 select file_name from dba_data_files; --创建表空间(与1.3查询结果相同) --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; --创建用户 SQL> create user NC60 identified by NC60 default tablespace NNC_DATA01 temporary tablespace temp; --赋予权限 Grant resource,connect,dba to NC60;
SQL> create directory backup as '/backup';
SQL> Grant read,write on directory backup to NC60;
[oracle@rac1 u01]$ export ORACLE_SID=orcl1
[oracle@rac1 u01]$ impdp nc60/nc60 DIRECTORY=BACKUP DUMPFILE=NC60.dmp SCHEMAS=NC60 logfile=impdp.log;
注,如果源库与目的库oracle版本不同,导入时需指定version参数。