ARCHIVE - COPY STATEMENT

Database
Enthusiast

ARCHIVE - COPY STATEMENT

I am trying to restore the table using the COPY command . The table is not present in the target database. I am creating the new table using the ARCHIVE done using the PPI condition. The ARCH file has only one month data present in it. I am getting an error for Target_Table does not exist.

COPY DATA TABLE (target_database)
(FROM (destination database),REPLACE CREATOR, EXCLUDE
TABLE(dest_table1)),
(DBA.target_table_NEW)
(FROM (dest_db.dest_table1), REPLACE CREATOR,
PARTITIONS WHERE
(! DBA.target_table_NEW.SNT_DT BETWEEN
DATE'2008-01-01' AND DATE'2008-01-31' !)
),
RELEASE LOCK
,FILE=ARCHIVE ;

Any suggestions !!

3 REPLIES
Enthusiast

Re: ARCHIVE - COPY STATEMENT


COPY data table (target.tbl_new)
(FROM (srcdb.tbl))
,RELEASE LOCK
,FILE = partdata
;
Enthusiast

Re: ARCHIVE - COPY STATEMENT

Thanks Joe,

I was expecting your reply on this.

Well i had taken the PPI archive using the PARTITION WHERE criteria.

And i want to copy the subset of the data in new table.

If not wrong ,Table should get created using this archive when i am using the COPY command using the PARTITION WHERE clause.

In short, from the backup i want to copy (create the new table in target database with the archived partition only) the table with the PPI .

Enthusiast

Re: ARCHIVE - COPY STATEMENT

I was able to restore using that syntax, ofcourse it would put back only that data that it found in the archive.