Expdp export multi-path and expdp export path

Source: Internet
Author: User

Expdp export multi-path and expdp export path
I. Preface:
Some users do not use RMAN for Backup recovery because the DBA level is not too high, training RMAN for on-site engineers or users will lead to additional expenses and unnecessary troubles. If
If the data recovery requirements are not particularly high, or when the recovery from different machines is performed, expdp/impdp is a good choice.

If you need multiple backups in the RAC environment, you can use the multi-path backup of expdp to back up one copy on ASM and back up one copy locally, alternatively, you can make one copy on the NAS shared disk,
In this way, data can be restored if any server or storage is damaged.

The following is my testing process. Modify the directory as needed:

This is the test environment, and the production environment is similar. You only need to modify the directory (ASM path: + DISKGROUP_NAME/DIRPATH)

2. Create related directories and grant permissions

[root@source DBData]# cd /[root@source /]# cd DBBackup/[root@source DBBackup]# ls[root@source DBBackup]# mkdir expdp1[root@source DBBackup]# mkdir expdp2[root@source DBBackup]# chown -R oracle:oinstall expdp1[root@source DBBackup]# chown -R oracle:oinstall expdp2[root@source DBBackup]# lltotal 8drwxr-xr-x 2 oracle oinstall 4096 Sep 5 13:33 expdp1drwxr-xr-x 2 oracle oinstall 4096 Sep 5 13:33 expdp2

3. Access the database for directory and grant permissions

[root@source DBBackup]# su - oracle[oracle@source ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 5 13:34:12 2014Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>SQL> create directory expdp1 as \

4. start exporting

[oracle@source expdp1]$ expdp ggs/ggs dumpfile=expdp1:ggs001.dmp,expdp2:ggs001.dmp parallel=2Export: Release 11.2.0.4.0 - Production on Fri Sep 5 13:43:14 2014Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsFLASHBACK automatically enabled to preserve database integrity.Starting \



Oracle Data Import and Export imp/exp command more than 10 Gb expdp/impdp command detailed

This Baidu search engine is detailed, and the landlord has not searched for it,
Data export:
1. Export the database TEST completely, and the username system Password manager is exported to D: daochu. dmp.
Exp system/manager @ TEST file = d: daochu. dmp full = y
2. Export the tables of system users and sys users in the database
Exp system/manager @ TEST file = d: daochu. dmp owner = (system, sys)
3. Export the inner_policy and policy_staff_relat tables in the database.
Exp aichannel/aichannel @ TESTDB2 file = d: datanewsmgnt. dmp tables = (inner_policy, policy_staff_relat)

4. Export the data with the field filed1 in table 1 in the database starting with "00"
Exp system/manager @ TEST file = d: daochu. dmp tables = (table1) query = "where filed1 like '201312 '"

The above is a commonly used export. For compression, you can use winzip to compress the dmp file.
You can also add compress = y to the command above.

Data Import
1. import data from D: daochu. dmp to the TEST database.
Imp system/manager @ TEST file = d: daochu. dmp
Imp aichannel/aichannel @ HUST full = y file = d: datanewsmgnt. dmp ignore = y
The above may be a problem, because some tables already exist, and then it will report an error, the table will not be imported.
Add ignore = y to the end.
2. Import table 1 in d: daochu. dmp
Imp system/manager @ TEST file = d: daochu. dmp tables = (table1)

The preceding import and export operations are sufficient. In many cases, you must first completely delete the table and then import it.

Note:
If the operator has sufficient permissions, a prompt is displayed.
Databases can be connected. You can use tnsping TEST to obtain whether the database TEST can be connected.

Of course, the above method may export a large package when exporting data, because your user may grant DBA permissions during authorization, therefore, you can use the following method to back up the database:

Database Backup
We recommend that you back up the data every week after the system transition. Or back up the data table to be changed before the data table changes significantly.
Perform the following steps to back up the data.
In the command line, type "cmd" and press enter to enter the command line window.
In the window, enter:
Exp mas/123456 @ mas

System prompt: enter an array to extract the buffer size: 4096>
You can press enter directly;

System prompt: Export File: EXPDAT. DMP>
Enter the location of the exported file. The path must exist. Oracle will not automatically create the path here, but the file name can be created. The backup file is suffixed with dmp.
Enter e: \ work \ mas_db_090925v1.dmp and press Enter.

System prompt: (1) E (complete database), (2) U (User) or (3) T (table): (2) U> u
You can enter u or press enter, because the default value is U.

System prompt: Export Permission (... full text>

Use EXPDP to export two users, SCHEMAS = USER1, and USER2 IMPDP. If you only want to import user1, how do you write

Write only one SCHEMAS parameter,
If you want to change the user name, you can write only one user in the REMAP_SCHEMA parameter. For example, in REMAP_SCHEMA = USERA: USERB

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.