FAQ

1.DB2批量导入数据到分表时会出现数据不能访问
解决方法:
db2 set INTEGRITY for tablename IMMEDIATE CHECKED
2.oracle批量导入ctl文件编写格式
解决方法:
load data
infile 'datasourcefilename' "STR x'0D0A'"
into table desttablename
truncate/repalce
Fields terminated by "|,|"
Optionally enclosed by '"'
trailing nullcols
(
表字段(多个用逗号分开)
)
2.oracle批量导入时报
Record 1: Rejected - Error on table T_DMS_OPERATORTEST, column LOGONTIME.
ORA-12899: value too large for column "USRMNG"."T_DMS_OPERATORTEST"."LOGONTIME" (actual: 15, maximum: 14)

解决方法:
2.1.使用dos2unix转义
2.2. 将"STR x'0D0A'"加到ctl文件里的导入文件行的末尾(infile 'DMSOPERATOR.file' "STR x'0D0A'")

3.DB2导数据文件命令
解决方法:
db2 load from 文件名  of del replace into 表名

4.解决oracle死锁
解决方法:
--第一步:查看是否有死锁存在,查出有数据则代表有死锁 
select p.spid,c.object_name,b.session_id,b.oracle_username,b.os_user_name  from v$process p,v$session a,v$locked_object b,all_objects   c 
where  p.addr=a.paddr 
and    a.process=b.process 
and    c.object_id=b.object_id


--第二步:查出死锁session的精确信息【sid 为前面语句的session_id】
SELECT sid, serial#, username, osuser FROM v$session where sid='第一步查询出来的session_id';


--第三步:删除死锁【第一个参数为sid,第二个为serial#】
alter system kill session '第一个参数,第二个参数';

猜你喜欢

转载自deng88.iteye.com/blog/1271855
FAQ