Get Trading Partner Agreement Information Parameters

21-2 Oracle Fusion Middleware Users Guide for Oracle B2B 2. Give permissions to this directory so that the database process can write to it. For example, chmod 777 tmparchive 3. Log in to the database as sysdba. sqlplus as sysdba 4. Set up B2B_EXPORT_DIR. SQL create or replace B2B_EXPORT_DIR as tmparchive 5. Grant the SOA schema user for example, b2b_soainfra permission for the export. SQL grant read, write on directory B2B_EXPORT_DIR to b2b_soainfra; SQL grant exp_full_database to b2b_soainfra; To archive, with an option to purge: Set up the archive directory and permissions before using the following PLSQL API. 1. Log in as the SOA schema user. sqlplus b2b_soainfrapassword 2. Execute the archive procedure, for example, SQL exec b2b_archive_procedure21-JAN-2008,28-JAN-2008,MSG_COMPLETE,JAN.dmp,N ; The signature of the procedure is b2b_archive_procedurefromDate, toDate, messageState, fileName, should_purge; Table 21–1 lists the parameters for the b2b_archive_procedure API. Table 21–1 b2b_archive_procedure Parameters Parameter Example Description fromDate 21-JAN-2008 Starting date for archival, DD-MON-YYYY toDate 28-JAN-2008 Ending date for archival, DD-MON-YYYY messageState MSG_COMPLE TE State of the business message. The MSG_COMPLETE state is typically archived. Other possible states are MSG_INVALID, MSG_CONTINUE_PROCESS, MSG_COLLAB_WAIT, MSG_PROCESS_ACK, MSG_SEND_ACK, MSG_WAIT_ACK, MSG_ERROR, MSG_WAIT_TRANSMIT, MSG_SEND_EXP, MSG_PROCESS_EXP, MSG_ABORTED, MSG_TRANSMITFAILED, MSG_WAIT_FA, MSG_SEND_FA, MSG_WAIT_BATCH fileName JAN.dmp Name of the archive file to be created by the database. Ensure that a file with this name does not exist in the archive directory. should_purge N Y removes the archived rows. The default is N. Scripts for Archiving and Restoring Data 21-3

21.3 Restoring B2B Business Messages

To restore business messages, set up the import directory and permissions and then run the restore procedure. To set up the import directory and permissions: 1. On the PC running the database, create a directory for the import file. mkdir tmpimport 2. Give permissions to this directory so that the database process can read from it. chmod 777 tmpimport 3. Log in to the database as sysdba. sqlplus as sysdba 4. Set up B2B_IMPORT_DIR. SQL create or replace B2B_IMPORT_DIR as tmpimport 5. Grant the SOA schema user b2b_soainfra permission for the export. SQL grant read, write on directory B2B_IMPORT_DIR to b2b_soainfra; SQL grant imp_full_database to b2b_soainfra; To restore business messages: Set up the import directory and permissions before using the following PLSQL API. 1. Log in as the SOA infra schema user. sqlplus soa_infra_userpassword 2. Execute the import procedure, for example SQL exec b2b_restore_procedureJAN.dmp; The signature of the procedure is b2b_restore_procedurefileName Use the Reports tab to search for and display the imported data.