Oracle Data Security Maintenance
I remember a philosopher saying that changes in things are inseparable from internal and external causes. Therefore, Oracle data security is certainly divided into two parts: internal and external. Well, let's start from the beginning:
1. Starting from the Oracle system itself
For Oracle Data, let's get rid of the amazing hacker and other external reasons. Let's first think about our database. What hard disk damage, what software damage, what operations a series of system problems caused by our negligence can completely let the data in the database we have worked hard to build never go. Then, let's look for reasons from ourselves.
I. Solutions to system problems-database backup and recovery
Database Backup:
There are three methods for Oracle Database Backup: Export/Import), cold backup, and hot backup. Exporting backup is a logical backup, while cold backup and hot backup are physical backup.
<1 Export/Import)
The Export can be used to extract data from the database, and the Import can be used to send the extracted data back to the Oracle database.
A. Simple Export data Export) and Import data Import)
Oracle supports three types of output:
(1) Table mode T), which exports the data of the specified table.
(2) User Mode U), which exports all objects and data of the specified user.
(3) Full database mode) to export all objects in the database.
Data Export Import) is the inverse process of data Import Export. Their data flows are different.
B. incremental Export/Import
Incremental export is a common data backup method. It can only be implemented for the entire database and must be exported as a SYSTEM. During this export, the system does not require any answers. The default export file name is export. dmp. If you do not want your output file to be named export. dmp, you must specify the file name to use in the command line.
Incremental export includes three types:
1) completely incrementally export Complete)
Back up the entire database, for example:
$ Exp system/manager inctype = complete file = 990702.dmp
2) incremental Export
Back up the data changed after the last backup. For example:
$ Exp system/manager inctype = incremental file = 990702.dmp
3) Cumulative incremental Export)
The accumulative export mode only exports the changed information in the database after the last full export. For example:
$ Exp system/manager inctype = cumulative file = 990702.dmp
The database administrator can schedule a backup schedule and export the data in three different ways. For example, the database backup task can be arranged as follows:
· Monday: full export)
· Tuesday: Incremental Export B)
· Wednesday: Incremental export C)
· Thursday: Incremental export D)
· Friday: accumulative export E)
· Saturday: Incremental export F)
· Sunday: Incremental export G)
If the database is accidentally damaged on Sunday, the database administrator can follow these steps to restore the database:
Step 1: Use the create database Command to regenerate the DATABASE structure;
Step 2: create an additional return segment that is large enough.
Step 3: import A in full Increments:
$ Imp system./manager inctype = rectore full = y file =
Step 4: Accumulative incremental import E:
$ Imp system/manager inctype = rectore full = y file = E
Step 5: import the latest incremental F:
$ Imp system/manager inctype = restore full = y file = F
<2> cold backup
Cold backup occurs when the database is shut down normally. When the database is shut down normally, it will provide us with a complete database. Cold backup is a way to copy key files to another location. Cold backup is the fastest and safest way to back up Oracle information.
Advantages of cold backup:
· It is a very fast backup method. You only need to copy files)
· Easy archiving and simple copy)
· It is easy to restore to a certain point in time by simply copying the file back)
· Can be combined with archiving methods to restore the database to the "latest State.
· Low maintenance and high security.
However, cold backup also has the following shortcomings:
· When used separately, only recovery at a certain time point can be provided.
· During the entire backup process, the database must be backed up instead of other work. That is to say, in the cold backup process, the database must be closed.
· If the disk space is limited, it can only be copied to tape and other external storage devices, and the speed will be very slow.
· Cannot be restored by table or by user.
If possible, it mainly depends on efficiency). Back up the information to the disk, and then start the database so that the user can work) and copy the backup information to the tape, the database can also work ). Files that must be copied in cold backup include:
· All data files
· All control files
· All online redo log files
· Init. ora file (optional)
It is worth noting that cold backup must be performed when the database is closed. When the database is turned on, the execution of database file system backup is invalid.
The following is a complete example of cold backup:
1) Close the database $ sqldba lmode = y
SQLDBA> connect internal;
SQLDBA> shutdown normal;
2) use the copy command to back up all the time files, redo log files, control files, and initialize parameter files.
SQLDBA>! Cp <file> <backup directory>
3) restart the Oracle database
$ Sqldba lmode = y
SQLDBA> connect internal;
SQLDBA> startup;
<3> Hot Backup
Hot Backup uses archivelog mode to back up data when the database is running. Therefore, if you have a cold backup file last night and a hot backup file today, you can use this data to restore more information when a problem occurs. Hot Backup requires that the database be operated in Archivelog mode and requires a large amount of archive space. Once the database is running in the archivelog state, you can back up the database. The Hot Backup command file consists of three parts:
1. Data Files are backed up in one tablespace and one tablespace.
1) set the tablespace to the backup status
2) Back up tablespace data files
3) restore the tablespace to normal
2. Back up the archive log file.
1) temporarily stop the archiving process
2) files in the archive redo log target directory under log
3) restart the archive process.
4) back up the archived redo log file
3. Run the alter database backup controlfile command to back up and copy files.
Advantages of Hot Backup:
It can be backed up at the tablespace or data file level, with a short backup time.
The database is still available during Backup.
Can be restored to a certain point in time in seconds ).
Restore almost all database entities.
Recovery is fast and can be recovered when the database is still working in most cases.
Hot Backup is insufficient:
No error is allowed; otherwise, the consequences are serious.
If the Hot Backup fails, the result cannot be used for restoration at a time point.
Because it is difficult to maintain, you must be careful not to "end with failure ".
The maintenance of Oracle data security is very important. Only by ensuring the security of the database is conducive to the healthy development of enterprises. The above content is the security maintenance questions about Oracle data that I want to share with you.