Triggers

In both SQL Server and Oracle environments, triggers are available on logon, object changes, and data changes. Triggers can be fired for events such as startup or shutdown and when inserts, updates, and deletes are issued. The concept of the trigger is the same in both Oracle and SQL Server, but there are some differences in the types available and when they execute. Table 9-2 summarizes the types of triggers available on both platforms.

The triggers on the database system events, such as startup, shutdown, and server message events, can be used for auditing or changing session parameters.

##Audit logins via sqlplus into a tablecreate or replace triggerafter logon on databasebegininsert into logon_from_sqlplus (user_name, logon_time) ...

Get Oracle Database Administration for Microsoft SQL Server DBAs now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.