Hence it is easy to build this simple PL/SQL loop to request to all unsent content is reposted.
BEGIN FOR x in ( SELECT prcsinstance FROM psprcsrqst WHERE diststatus = 4 --that are not posted AND runstatus = 9 --successful processes ) LOOP UPDATE PSPRCSRQST SET DISTSTATUS = '7' WHERE PRCSINSTANCE = x.prcsinstance; UPDATE PSPRCSQUE SET DISTSTATUS = '7' WHERE PRCSINSTANCE = x.prcsinstance; UPDATE PS_CDM_LIST SET DISTSTATUS = '8' , TRANSFERINSTANCE = 0 WHERE PRCSINSTANCE = x.prcsinstance AND DISTSTATUS <> '5'; --posted END LOOP; END; / COMMIT /
Distribution status stays "Posting"
- The below script is for server name PSNT2, which you’ll need to replace with the appropriate name of the server name in your case. DELETE FROM PS_SERVERDEFN WHERE SERVERNAME= ‘PSNT2’ ; DELETE FROM PSSERVERSTAT where SERVERNAME = ‘PSNT2’ ; DELETE FROM PS_SERVERCLASS WHERE SERVERNAME= ‘PSNT2’ ; DELETE FROM PS_SERVEROPRTN WHERE SERVERNAME= ‘PSNT2’ ; DELETE FROM PS_SERVERACTVTY WHERE SERVERNAME= ‘PSNT2’ ; DELETE FROM PS_SERVERMESSAGE WHERE SERVERNAME= ‘PSNT2’ ; DELETE FROM PS_SERVERNOTIFY WHERE SERVERNAME= ‘PSNT2’ ; DELETE FROM PS_SERVERPURGLIST WHERE SERVERNAME= ‘PSNT2’ ; DELETE FROM PSPRCSQUE WHERE SERVERNAMERQST= ‘PSNT2’ ; DELETE FROM PS_CDM_TRANSFER WHERE SERVERNAMERUN= ‘PSNT2’ ; DELETE FROM PSPRCSRQST WHERE SERVERNAMERQST= ‘PSNT2’ ; DELETE FROM PS_SERVERCATEGORY WHERE SERVERNAME = ‘PSNT2’
No comments:
Post a Comment