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

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

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

    CREATE AUTHORIZATION SYSLIB.accounting AS DEFINER DEFAULT
      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.