The following errors are observed when running copy in an environment where source and target databases are one in the same and the source and target schema and table names are identical:
sp_ctrl (alvsupu07:5439)> copy sha76.table1 to sha76.table2
copying 1 of 1 objects
copy started; job id 102
sp_ctrl (alvsupu07:5439)> copy status
Job ID : 102
PID : 17667
Host : alvsupu07
Started : 16-MAY-11 17:46:58
Job Type : Copy
Status : Wait for Marker
ID Tablename Status Time Total Rows %Comp Total Time
------ ------------------------------------ ---------- ---------- ---------- ---
-- ----------
1 "SHA76"."TABLE1" Locked - Cannot rename table on target; source name exists
The following errors are observed in sync client log though sync server log shows no errors:
17671 16/17:47:10 ERROR:SyncTableHandler:0: Table SHA76.TABLE1 exists! Cannot rename TABLE2 to TABLE1
17671 16/17:47:13 INFO:APP:0: Setting debug to 0
17671 16/17:47:13 INFO:SyncApplication:0: Starting SYNC...
17671 16/17:47:58 INFO:SyncImportThread:1: Export is now complete
17671 16/17:48:03 INFO:SyncLogMonitor:1: Importing table "TABLE1"
17671 16/17:48:03 INFO:SyncLogMonitor:1: Done importing 4 rows
17671 16/17:48:03 INFO:SyncLogMonitor:1: Import process complete: success = 1, warnings = 1
17671 16/17:48:04 INFO:SyncMessager:0: Import thread 1 completed successfully
17671 16/17:48:04 INFO:SyncMessager:0: SYNC SUCCESS
copy will not work when source and target databases are one in the same and the source and target schema and table names are identical.
The copy will not work when source and target databases are one in the same and the source and target schema and table names are identical. One may have to use alternate means like compare to sync such objects.
The Shareplex Reference Guide this fact specified, albeit indirectly:
The copy/append command will only be able to copy or append data between two objects on the same database if the objects reside in different schemas.