Rem
Rem $Header: dbmstrig.sql 13-nov-98.12:16:46 weiwang Exp $
Rem
Rem dbmstrig.sql
Rem
Rem  Copyright (c) Oracle Corporation 1998. All Rights Reserved.
Rem
Rem    NAME
Rem      dbmstrig.sql - DBMS TRIGger function
Rem
Rem    DESCRIPTION
Rem      A group of system event attribute functions: use inside system trigger
Rem      body
Rem
Rem    NOTES
Rem      to be created in the schema of SYS
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    weiwang     11/13/98 - Created
Rem

Rem returns the system event that invokes the system trigger
create or replace function sysevent return varchar2 is
begin
  return dbms_standard.sysevent;
end;
/
grant execute on sysevent to public
/

Rem returns the object type on which the DDL statement is being done
create or replace function dictionary_obj_type return varchar2 is
begin
return dbms_standard.dictionary_obj_type;
end;
/
grant execute on dictionary_obj_type to public
/

Rem returns the object owner on which the DDL statement is being done
create or replace function dictionary_obj_owner return varchar2 is
begin
return dbms_standard.dictionary_obj_owner;
end;
/
grant execute on dictionary_obj_owner to public
/

Rem returns the object name on which the DDL statement is being done
create or replace function dictionary_obj_name return varchar2 is
begin
return dbms_standard.dictionary_obj_name;
end;
/
grant execute on dictionary_obj_name to public
/

Rem returns the current database name
create or replace function database_name return varchar2 is
begin
return dbms_standard.database_name;
end;
/
grant execute on database_name to public
/

Rem returns the current instance number
create or replace function instance_num return binary_integer is
begin
return dbms_standard.instance_num;
end;
/
grant execute on instance_num to public
/

Rem returns the current login user
create or replace function login_user return varchar2 is
begin
return dbms_standard.login_user;
end;
/
grant execute on login_user to public
/

Rem whether the specified error number (errno) is in the error stack
create or replace function is_servererror (errno binary_integer)
return boolean is
begin
return dbms_standard.is_servererror(errno);
end;
/
grant execute on is_servererror to public
/

Rem returns the error in the specified position of the error stack
create or replace function server_error (position binary_integer)
return binary_integer is
begin
return dbms_standard.server_error(position);
end;
/
grant execute on server_error to public
/

Rem returns the DES encrypted password of the user being created or altered
create or replace function des_encrypted_password
return varchar2 is
begin
return dbms_standard.des_encrypted_password;
end;
/
grant execute on des_encrypted_password to public
/
