17.00 - Example: Creating a Default DEFINER Authorization - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Advanced SQL Engine
Teradata Database
Release Number
Release Date
September 2020
Content Type
Programming Reference
Publication ID
English (United States)

This example creates a definer authorization with the name accounting in the SYSLIB database for the client user name accdept and user password nesuahkcotsk.

      USER 'accdept'
      PASSWORD 'nesuahkcotsk';

The example associates accounting as the DEFAULT authorization in the SYSLIB database with the specified client user name accdept.

Because accdept is the DEFAULT authorization object, the system associates it with all external routines that contain the EXTERNAL SECURITY DEFINER clause. All external routines in database SYSLIB that contain an EXTERNAL SECURITY DEFINER clause are executed using the user context defined by this request.

Recall that there can only be one default definer object in a database. All others must have specific names. If the DEFAULT already exists, the system returns an error to the requestor.