Oracle Database Backup Data is missing

Source: Internet
Author: User

Oracle Database Backup Data is missing

Oracle databases have been used in the project. Since I have been focusing more on the ORM ing framework, I have barely paid attention to Oracle features, and I do not know many things, in addition, the probability of Database Change in the project is almost zero, so it is necessary to study Oracle. The so-called, do not fear not to know, do not know. Otherwise, you don't know where to start.


The Oracle learning over the past two days has gained a lot. Many strange problems encountered during the tests a few days ago have been well explained. Here is a typical example.


In the test phase, when I look at the manager's skills in operating the various commands of Oracle, I feel a little uneasy. The manager is the manager. This is the number of years that no code is written. These Oracle commands are clearly recorded.

During the first test, the system reported a bunch of inexplicable bugs. The result shows that the backup database is incomplete. As a result, many tables and views are missing in the database in the test environment.


PS: At that time, my idea was to install Oracle in a virtual machine ~~~ However, it turns out that it is okay to install Oracle in a virtual machine ~~~


After finding the problem, we are all puzzled. How can we solve this problem in Oracle databases? It must not be a problem with the database, but the backup steps are fixed. In addition, in the gxpt project, there was no such problem during database backup restoration. There should be no problem in gxpt restoration. The problem occurs in the tky project.

It was discovered that this was caused by the flash back technology of Oracle. The Oracle database also has a recycle bin like the windows system. After the normal table deletion operation is performed, the actual deletion is not performed, but they are placed in the recycle bin. One benefit of putting the table in the recycle bin is that the deleted table can be restored at any time.

You can run the "select * from tab" Operation in the SQL plus window to View tables in the database. All the tables and long-coded items are queried here, which are traces of table deletion.


However, flash back has some drawbacks. It means that when the database is backed up, if the recycle bin is not cleared, the backup data may be incomplete.

This explains the cause of backup failure. In the gxpt project, the JPA ing is used, which naturally shields these database features.


Oracle Database problems: if the database system accidentally loses data files that are not backed up, how can we restore the database to a normal state?

The data is definitely lost. You can choose to drop the lost data file offline and try to start the database.

Will data loss occur when someone is entering new data during oracle database backup ???

This will certainly not cause data loss.

Because the oracle database locks data, exclusive locks are used during data update, and shared locks are used during data query.

The exclusive lock means that when data X is used by A, B cannot be updated...
The so-called shared lock means that when A is using data X, B can also query...

During backup, the database backs up all the data at this time. If someone is writing data to the database at this time, the database may write data to the cache first. After the data backup is complete, when writing data to a database, you need to back up new data again.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.