xstrm.c
/*---------------------------------------------------------------------
 * print_lcr - Print header information of given lcr.
 *---------------------------------------------------------------------*/
Print header information of given lcr.
Print header information of given lcr .
static void print_lcr(oci_t *ocip, void *lcrp, ub1 lcrtype,
                      oratext **src_db_name, ub2  *src_db_namel)
{
  oratext     *cmd_type;
  ub2          cmd_type_len;
  oratext     *owner;
  ub2          ownerl;
  oratext     *oname;
  ub2          onamel;
  oratext     *txid;
  ub2          txidl;
  sword        ret;
  ub2 oldColCnt    ;
  ub2 newColCnt    ;
  printf("\n ----------- %s LCR Header  -----------------\n",
         lcrtype == OCI_LCR_XDDL ? "DDL" : "ROW");
  ret = OCILCRHeaderGet(ocip->svcp, ocip->errp,
                        src_db_name, src_db_namel,              
                        &cmd_type, &cmd_type_len,            
                        &owner, &ownerl,                       
                        &oname, &onamel,                      
                        (ub1 **)0, (ub2 *)0,                      
                        &txid, &txidl, (OCIDate *)0,   
                        &oldColCnt, &newColCnt,              
                        (ub1 **)0, (ub2 *)0,                 
                        (oraub8*)0, lcrp, OCI_DEFAULT);
  if (ret != OCI_SUCCESS)
    ocierror(ocip, (char *)"OCILCRHeaderGet failed");
  else
  {
    printf("  src_db_name=%.*s\n  cmd_type=%.*s txid=%.*s\n",
           *src_db_namel, *src_db_name, cmd_type_len, cmd_type, txidl, txid );
           printf("  old row count %d  new row count %d\n",oldColCnt,newColCnt);
    if (ownerl > 0)
      printf("  owner=%.*s oname=%.*s \n", ownerl, owner, onamel, oname);
  }
}
static void print_lcr ( oci_t * ocip , void * lcrp , ub1 lcrtype , oratext * * src_db_name , ub2 * src_db_namel ) { oratext * cmd_type ; ub2 cmd_type_len ; oratext * owner ; ub2 ownerl ; oratext * oname ; ub2 onamel ; oratext * txid ; ub2 txidl ; sword ret ; ub2 oldColCnt ; ub2 newColCnt ; printf ( " \n \n " , lcrtype == OCI_LCR_XDDL ? " " : " " ) ; ret = OCILCRHeaderGet ( ocip -> svcp , ocip -> errp , src_db_name , src_db_namel , & cmd_type , & cmd_type_len , & owner , & ownerl , & oname , & onamel , ( ub1 * * ) 0 , ( ub2 * ) 0 , & txid , & txidl , ( OCIDate * ) 0 , & oldColCnt , & newColCnt , ( ub1 * * ) 0 , ( ub2 * ) 0 , ( oraub8 * ) 0 , lcrp , OCI_DEFAULT ) ; if ( ret != OCI_SUCCESS ) ocierror ( ocip , ( char * ) " " ) ; else { printf ( " \n \n " , * src_db_namel , * src_db_name , cmd_type_len , cmd_type , txidl , txid ) ; printf ( " \n " , oldColCnt , newColCnt ) ; if ( ownerl > 0 ) printf ( " \n " , ownerl , owner , onamel , oname ) ; } }
print_lcr - Print header information of given lcr.
print_lcr - Print header information of given lcr .
/* Get LCR Header information */ /* source db */ /* command type */ /* owner name */ /* object name */ /* lcr tag */ /* txn id  & src time */ /* OLD/NEW col cnts */ /* LCR position */