vi par.txt userid=system/oracle tables=(user.table,...) query="where org_no like 32%" filesize=1000M file=1.dmp,2.dmp,3.dmp statistics=none indexes=N log=exp.log
vi exp.shnode
exp parfile=par.txt sql
nohup ./exp.sh &数据库
imp coast/coast@127.0.0.1:1521/sid file=.\newsmgnt.dmp tables=(T_NODES,T_SD_BGK4500_1,T_SD_BGK4500_2,T_SD_BGK6150_2C,T_SD_CABELL229,T_SD_POSITION,T_SD_RAINGAUGE) exp userid=zf/j@oracle9i tables=xsxkbn file=xsxkb20110825_2.dmp exp userid=zf/j@oracle9i tables=(table1,table2,table3) file=xsxkb20110825_2.dmp
例子:bash
exp sgcis/password@jjgk files=/home/oracle/jjgk-ogg0717-1.dmp logs=/home/oracle/jjgk-ogg0717-1.log tables=PM_PRJECT_INFO,PM_SIN_PROJECT_INFO,PM_PROPLAN_FCB,PM_PRJECT_APPROVAL,PM_SIN_PHASE_INFO exp sgcis/password@jjgk files=/home/oracle/jjgk-ogg0717-2.dmp logs=/home/oracle/jjgk-ogg0717-2.log tables=PM_NEXT_RISK_INFO,PM_SECU_RISK_INFO,PM_PRO_SAFE_MONTHREP,PM_PRO_SAFE_BASEINFO2,PM_PROGRESS_COLLECT_DEL exp sgcis/password@jjgk files=/home/oracle/jjgk-ogg0717-3.dmp logs=/home/oracle/jjgk-ogg0717-3.log tables=PM_PROGRESS_COLLECT,PM_BID_PROJECT_INFO,IM_PART_ARMY_BASIINFO,PM_PART_UNITS,PM_IMPL_PLAN exp sgcis/password@jjgk files=/home/oracle/jjgk-ogg0717-4.dmp logs=/home/oracle/jjgk-ogg0717-4.log tables=PM_PRJECT_STAGE,P_CODE,PM_PROGRESS_FILL_DET,PM_PLAN_ITEM_LIBRARY,ISC_SPECIALORG_UNIT,ISC_ORG_ATTRIBUTE
详情见:session
http://blog.csdn.net/xyz846/article/details/6437963 oracle
各类问题:ide
1.EXP-00091: EXP-00091: Exporting questionable statistics ui
指定Linux系统的NLS_LANG环境变量为数据库的数据集
1)查询数据库的字符集(方法不少只用一种)
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBKspa
2)设置Linux操做系统的NLS_LANG环境变量
[oracle]$export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
Window系统的环境变量的修改方法是:
C:\>set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK操作系统
[oracle@node2 ~]$ exp -help Export: Release 11.2.0.1.0 - Production on Mon Mar 12 02:07:04 2018 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. You can let Export prompt you for parameters by entering the EXP command followed by your username/password: Example: EXP SCOTT/TIGER Or, you can control how Export runs by entering the EXP command followed by various arguments. To specify parameters, you use keywords: Format: EXP KEYWORD=value or KEYWORD=(value1,value2,...,valueN) Example: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR) or TABLES=(T1:P1,T1:P2), if T1 is partitioned table USERID must be the first parameter on the command line. Keyword Description (Default) Keyword Description (Default) -------------------------------------------------------------------------- USERID username/password FULL export entire file (N) BUFFER size of data buffer OWNER list of owner usernames FILE output files (EXPDAT.DMP) TABLES list of table names COMPRESS import into one extent (Y) RECORDLENGTH length of IO record GRANTS export grants (Y) INCTYPE incremental export type INDEXES export indexes (Y) RECORD track incr. export (Y) DIRECT direct path (N) TRIGGERS export triggers (Y) LOG log file of screen output STATISTICS analyze objects (ESTIMATE) ROWS export data rows (Y) PARFILE parameter filename CONSISTENT cross-table consistency(N) CONSTRAINTS export constraints (Y) OBJECT_CONSISTENT transaction set to read only during object export (N) FEEDBACK display progress every x rows (0) FILESIZE maximum size of each dump file FLASHBACK_SCN SCN used to set session snapshot back to FLASHBACK_TIME time used to get the SCN closest to the specified time QUERY select clause used to export a subset of a table RESUMABLE suspend when a space related error is encountered(N) RESUMABLE_NAME text string used to identify resumable statement RESUMABLE_TIMEOUT wait time for RESUMABLE TTS_FULL_CHECK perform full or partial dependency check for TTS VOLSIZE number of bytes to write to each tape volume TABLESPACES list of tablespaces to export TRANSPORT_TABLESPACE export transportable tablespace metadata (N) TEMPLATE template name which invokes iAS mode export Export terminated successfully without warnings.
上回的状况是导数据、发现源端和目标端表结构不一致(目标端多了一个时间戳字段) 在源端建了一个临时表(和目标端的表结构一致) 而后使用
insert into PM_NEXT_RISK_INFO0719
(id, pk_id, updatetime)
select id, pk_id, '2017-07-20' from PM_NEXT_RISK_INFO
https://blog.csdn.net/ruichaolin/article/details/6826019
相同表结构:insert into PM_PROGRESS_FILL_DET select * from sgcis.PM_PROGRESS_FILL_DET0719;