13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Data Set Options <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong> 4 TPT_APPL_PHASE= Data Set Option 375DBMS support:TeradataSyntaxTPT_APPL_PHASE=YES | NOSyntax DescriptionYESspecifies that the Fastload or MultiLoad run that is being restarted has failed in theapplication phase. This is valid only when <strong>SAS</strong> uses the TPT API.NOspecifies that the load process that is being restarted has not failed in the applicationphase.DetailsTo use this option, you must first set TPT=YES.<strong>SAS</strong> can restart from checkpoints any Fastload, MultiLoad, and Multi-Statementinsert that is run using the TPT API. The restart procedure varies: It depends onwhether checkpoints were recorded and in which phase the step failed during the loadprocess. Teradata loads data in two phases: the acquisition phase and the applicationphase. In the acquisition phase, data transfers from <strong>SAS</strong> to Teradata. After this phase,<strong>SAS</strong> has no more data to transfer to Teradata. If failure occurs after this phase, setTPT_APPL_PHASE=YES in the restart step to indicate that restart is in theapplication phase. (Multi-Statement insert does not have an application phase and soneed not be restarted if it fails after the acquisition phase.)Use OBS=1 <strong>for</strong> the source data set when restart occurs in the application phase.When <strong>SAS</strong> encounters TPT_RESTART=YES and TPT_APPL_PHASE=YES, it initiatesrestart in the application phase. No data from the source data set is actually sent. Ifyou use OBS=1 <strong>for</strong> the source data set, the <strong>SAS</strong> step completes as soon as it reads thefirst record. (It actually throws away the record because <strong>SAS</strong> already sent all data toTeradata <strong>for</strong> loading.)ExamplesHere is a sample <strong>SAS</strong> program that failed after the acquisition phase.libname x teradata user=testuser pw=testpw;data x.test(MULTILOAD=YES TPT=YES CHECKPOINT=7);do i=1 to 20;output;end;run;ERROR: Teradata connection: Failure occurred after the acquisition phase.Restart outside of <strong>SAS</strong> using checkpoint data 14.Set TPT_APPL_PHASE=YES to restart when failure occurs in the application phasebecause <strong>SAS</strong> has already sent all data to Teradata.proc append base=x.test(MULTILOAD=YES TPT_RESTART=YESTPT_CHECKPOINT_DATA=14 TPT_APPL_PHASE=YES) data=test(obs=1);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!