CREATE AUTHORIZATION Examples | Teradata Vantage - 17.10 - Example: Creating a DEFINER Authorization - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

The following example creates a DEFINER authorization object with the name sales_processing for the user name salesmng and the user password mysecret.

CREATE AUTHORIZATION sales_processing 
AS DEFINER TRUSTED
USER 'salesmng'
PASSWORD 'mysecret';

The database uses this OS platform user context to execute all external routines that contain an EXTERNAL SECURITY DEFINER clause when run under the same OS user authorization independent of the user who runs the routine.