Triggers are stored programs that are associated with a table. A trigger is executed when the event on which it is based occurs. The events that will ?fire? a trigger are commands that perform INSERT, UPDATE, or DELETE actions. As an example, let us say that the DBA of the Acme Corporation decides to track the updates to the Reim_Requests_BT table, specifically the updates to the ApprovedById field of this table. In this case the trigger script would start like this:
CREATE OR REPLACE TRIGGER req_audit
AFTER UPDATE OF
FOR EACH ROW
-- rest of the script
Backing Up and Recovering the Database.
Even with rigorous security, a company can be vulnerable to data loss. One of the best approaches a company could follow is to have a backup procedure in place to help ensure that the system can be successfully recovered. There are several different forms of backups that can be performed to ensure the recovery of data to a database. They are:
? Cold backups ? performed with the database shut down
? Hot backups ? performed with the database up
? Logical backups ? exports with the database up
? The Enterprise Backup Utility ? for Oracle and UNIX version 7
? Backup set using the Recovery Manager ? for Oracle 8 with the database up
? Image copy using the Recovery Manager ? for Oracle 8 with the database up
Hot and cold backups make copies of database files and store them to another disk on the system or to tape. When certain database files become damaged, they can be replaced by the copies made during the backup. A cold backup, also known as image backup, is performed when the database is down and there are no active processes within the database. The backup process, referred to as a file-level copy, then copies each database file either to another disk or to tape. In the event of data loss, the database can be recovered to the condition it was in when the copy was made. When performed in conjunction with archive logging, the database can be recovered up to a ?point in time?. The disadvantage of file-level copying is that it is very difficult to recover an individual table easily.
A hot backup is performed while the database remains up and running. Essentially, it performs the same actions as a cold backup, providing recovery up to a ?point in time?. As with cold backups, individual tables cannot easily be recovered. Logical backups (Exports) enable to capture all of the objects owned by a particular user, or a specific table or set of tables. Unlike a hot or cold backup, which captures complete data files, an export captures random pieces of the database or a complete copy of the entire database to one compressed file. Export files allow moving or copying a database from one system to another.
We now turn to presenting more subtle attacks on databases, especially databases attached to widely accessible networks such as the Internet.
Suggested Jobs More Jobs >>