Lemme giv an example where we found dificulty in using COPYOriginally posted by TomazZ
I am not aware that COPY has any issues regarding 7-bit charactersets.
Can you explain this?
This sounds strange, but when I looked into the record/s which was causing COPY to fail, I found that value was ASCII(¹)=185.Code:WWCIW_DBA@WW15> truncate table wwciw_sap.ytcurr; Table truncated. WWCIW_DBA@WW15> copy from wwciw_dba@ww04 to wwciw_dba@ww15- > insert ytcurr- > using- > select * from ytcurr FROM TO Array fetch/bind size is 5000. (arraysize is 5000) Will commit after every 5 array binds. (copycommit is 5) Maximum long size is 80. (long is 80) SQLRCN in cpytbl failed: -1075 SQLRCN in cpyyerr failed: -1075 ERROR: ORA-00001: unique constraint (WWCIW_SAP.PK_YTCURR) violated WWCIW_DBA@WW15> select name from v$database; NAME --------- WW15 WWCIW_DBA@WW15> truncate table wwciw_sap.ytcurr; Table truncated. WWCIW_DBA@WW15> insert into ytcurr select * from ytcurr@ww04; 594951 rows created. -- Now it dosent error, Strange WWCIW_DBA@WW15> commit; Commit complete.
But when we used, DB Link all records were inserted without any errors..
Reason for COPY to fail was, it wasnt sensing the difference between '9' and '9' see below
Abhay.Code:WW04_DBA> select * from nls_database_parameters where parameter = 'NLS_CHARACTERSET'; PARAMETER VALUE ------------------------------ ---------------------------------------- NLS_CHARACTERSET US7ASCII WW04_DBA> select chr(185) "ASCII(¹)", chr(57) "ASCII(9)" from dual; A A - - 9 9 But See in other Charactersets ( 8-Bit ) TEST_ABHAY> select * from nls_database_parameters where parameter = 'NLS_CHARACTERSET'; PARAMETER VALUE ------------------------------ ---------------------------------------- NLS_CHARACTERSET WE8MSWIN1252 TEST_ABHAY> select chr(185) "ASCII(¹)", chr(57) "ASCII(9)" from dual; A A - - ¹ 9




Reply With Quote