Oracle exp Data Backup

Source: Internet
Author: User

Oracle exp Data Backup
Recently, I finally solved the oracle database backup problem. Due to my first contact, I did not understand its mechanism. I did not pay attention to its mechanism during data search, but to the implementation method, in the early stage, I practiced the search results on the test machine. There was no success. In the absence of any progress, I decided to give up temporarily. After a while, I picked it up again, sometimes it's so strange that you have struggled for a few days without making any progress and put it on hold for the moment. It's easy to get it done when you come back ...... Let me first talk about the problem I encountered. The first time I tried export exp, it may be because the method was incorrect or why (I don't remember it) failed. Later I used the archive mode, with the successful opening of the license, the backup is still not implemented, and everything is normal on the day of the opening of the license, the database will not be connected the next day, and later confirmed that it is caused by the archive mode, during this period, we also found that oracle environment variables in the production environment may be faulty, because some of them are correctly executed on the test machine and an error is reported on the production database, if the database runs normally again, ignore it. Instead of uncontrollable risks, it is better to do so first. There are two types of ORACLE Database Backup methods: the first type is physical backup, which implements the complete restoration of the database, however, the database must run in the recovery mode (the business database runs in the non-recovery mode) and requires a large number of external storage devices, such as tape libraries. The second type of backup mode is logical backup, the business database adopts this method. This method does not require the database to run in the back-to-back mode. It not only supports simple backup, but also does not require external storage devices. Although the database logical backup method has provided the export sample column in the blog post, I still encountered a problem when exporting the reference sample column (for a long time, I do not remember why ), since the export method is determined to be correct, this time I used the exp-help method to view the exp help. Follow the Example and parameter descriptions given by exp, I tried it several times, probably understood its usage, and backed up the user mode on the test database. The execution result was successful, so I was so excited ...... The following describes the specific operations and explains the logic backup modes of the ORACLE database in the order I tried: Table backup, user backup, and full backup. 1. Full mode: Back up all objects in the database. The standby mode is usually used in business databases. This is actually very simple. According to the example operation given by exp, it is a full backup. Note that exp username/password @ oracle is incorrect. When using exp without adding a parameter for export, this will allow users to set the buffer size (which is useless yet) by default, you can export the file name, 1 full mode, 2 user mode, 3 Table mode, user mode by default, and the remaining items can be exp username/password 2 by default. user Mode: backs up all objects in a user mode. The standby database usually uses the backup method exp username/password file = test. dmp log = test. log 3. Table mode: backs up the specified object (table) in a user mode ). This method is usually not used by the standby database for backup, but the following example should be used for reference: exp username/password grants = y tables = (tables_name1, tables_name2) orexp username/password grants = y tables = (T1: P1, T1: P2) Data Import: same example and exp of imp: imp scott/TIGEROr, you can control how Import runs by entering the IMP command followedby varous arguments. to specify parameters, you use keywords: Format: imp keyword = value or KEYWORD = (value1, value2 ,..., valueN) Example: imp scott/tiger ignore = y tables = (EMP, DEPT) FULL = N or TABLES = (T1: P1, T1: P2 ), if T1 is partitioned table is used today, but you cannot find how to import data to the specified database. imp username/password file = test. dmp ignore = y this import method can only import files to the current user, ignore = y will forcibly Overwrite

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.