15.00 - External Data Access Clause - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Teradata Database
Release Number
Content Type
Programming Reference
Publication ID
English (United States)

External Data Access Clause

This optional clause defines the relationship between a UDF or external stored procedure and data that is external to Teradata Database.

The option you specify determines:

  • Whether or not the external routine can read or modify external data
  • Whether or not Teradata Database will redrive the request involving the function or procedure after a database restart
  • If Redrive protection is enabled, the system preserves responses for completed SQL requests and resubmits uncompleted requests when there is a Teradata Database restart. However, if the External Data Access clause of an external routine is defined with the MODIFIES EXTERNAL DATA option, then Teradata Database will not redrive the request involving that function or procedure. For details about Redrive functionality, see:

  • Database Administration
  • The RedriveProtection and RedriveDefaultParticipation DBS Control fields in Utilities.
  • If you do not specify an External Data Access clause, the default is NO EXTERNAL DATA.

    The following table explains the options for the External Data Access clause and how Teradata Database uses them for external routines.





    The routine modifies data that is external to Teradata Database. In this case, the word modify includes delete, insert, and update operations.

    Note: Following a database failure, Teradata Database does not redrive requests involving a function or external stored procedure defined with this option.


    The routine does not access data that is external to Teradata Database. This is the default.


    The routine reads, but does not modify data that is external to Teradata Database.