Oracle数据泵详解
数据泵与常规方式对比:Oracle 10g开始引入数据泵,与传统exp/imp相比,数据泵可以作业分离,允许挂起和恢复导入导出任务,可以从
数据泵与常规方式对比:Oracle 10g开始引入数据泵,与传统exp/imp相比,数据泵可以作业分离,允许挂起和恢复导入导出任务,可以从失败点重新启动失败的作业,还可以控制导入导出的版本(version)
1、expdp命令:
1>常用参数:
content :导出数据还是只导出元数据(表和索引创建语句等),选项有:ALL、DATA_ONLY、METADATA_ONLY
directory:dumpfile和logfile的目录对象
dumpfile/logfile
exclude:不导出指定的对象(与这些对象有依赖的也不会导出)eg:exclude=table:"like'DBA_%'"
include:导出指定的对象,与exclude功能相反,用法相同
job_name:定义导出作业的名称
attach:附加到已经在运行的现有作业,用于管理作业
full:默认值为n,full=y表示导出所有对象
nologfile:=y表示不写expdp的日志文件,,默认值为n
tables/tablespaces:运行导出指定表/表空间,包括与这个表/表空间有依赖关系的所有对象
version:限制要导出的对象到指定版本的数据库
2>举例:
--创建导出目录及相关用户赋权
create or replace directory dumpdir as '/data/backup';
grant all on directory dumpdir to system;
grant EXPORT FULL DATABASE to system;
--导出全库:导出数据库所有对象
expdp system/pwd@ip/ORACLE_SID dumpfile=dumpdir:db_%U.dmp logfile=dumpdir:db_exp_%U.log job_name=exp_db full=y
--导出指定表空间:导出指定表空间的对象
expdp system/pwd@ip/ORACLE_SID tablespaces=tbs dumpfile=dumpdir:tbs_01.dmp logfile=dumpdir:tbs_exp_01.log job_name=exp_tbs
--导出特定对象:导出指定对象(如下例的function、procedure和XT开头的表)
expdp system/pwd@ip/ORACLE_SID include=function include=procedure include=table:"like'XT%'" dumpfile=dumpdir:tab_01.dmp nologfile=y job_name=exp_tab
--导出表:导出指定表的对象
expdp system/pwd@ip/ORACLE_SID tables=XTCS,XTDW dumpfile=dumpdir:tab_02.dmp nologfile=y job_name=exp_tab01
2、 impdp命令:
1>常用参数:
content :导入数据还是只导入元数据(表和索引创建语句等),选项有:ALL、DATA_ONLY、METADATA_ONLY
directory:dumpfile和logfile的目录对象
dumpfile/logfile
include:导入指定的对象,eg:exclude=table:"like'DBA_%'"
job_name:定义导入作业的名称
attach:附加到已经在运行的现有作业,用于管理作业
full:默认值为n,full=y表示导出所有对象
nologfile:=y表示不写expdp的日志文件,默认值为n
tables/tablespaces:运行导出指定表/表空间,包括与这个表/表空间有依赖关系的所有对象
table_exists_action:定义当表已经存在时执行的操作,可选项:
=skip(默认值)不加载数据直接跳过当前对象并处理下一个
=append追加在当前表的数据之后写入
=replace先删除表,再创建表并加载数据
=truncate先清除所有数据行,再写入
2>举例:
--创建导入目录及相关用户赋权
create or replace directory pumpdir as '/data/backup';
grant all on directory pumpdir to system;
grant IMPORT FULL DATABASE to system;
--导入全库:导入数据库所有对象
impdp system/pwd@ip/ORACLE_SID dumpfile=pumpdir:db_01.dmp logfile=pumpdir:db_imp_%U.log job_name=imp_db full=y
--导入指定表空间:导入指定表空间的对象
impdp system/pwd@ip/ORACLE_SID tablespaces=tbs dumpfile=pumpdir:tbs_01.dmp logfile=pumpdir:tbs_imp_01.log job_name=exp_tbs table_exists_action=truncate
--导入特定对象:导入指定对象(如下例的function、procedure和XT开头的表)
impdp system/pwd@ip/ORACLE_SID include=function include=procedure include=table:"like'XT%'" dumpfile=pumpdir:tab_01.dmp nologfile=y job_name=imp_tab
--导入表:导入指定表的对象
impdp system/pwd@ip/ORACLE_SID tables=XTCS,XTDW dumpfile=pumpdir:tab_02.dmp nologfile=y job_name=imp_tab01
Linux-6-64下安装Oracle 12C笔记
RHEL6.4_64安装单实例Oracle 12cR1
Oracle 12C新特性之翻页查询
解读 Oracle 12C 的 12 个新特性
本文永久更新链接地址:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Go language is an efficient, concise and easy-to-learn programming language. It is favored by developers because of its advantages in concurrent programming and network programming. In actual development, database operations are an indispensable part. This article will introduce how to use Go language to implement database addition, deletion, modification and query operations. In Go language, we usually use third-party libraries to operate databases, such as commonly used sql packages, gorm, etc. Here we take the sql package as an example to introduce how to implement the addition, deletion, modification and query operations of the database. Assume we are using a MySQL database.

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

HTML cannot read the database directly, but it can be achieved through JavaScript and AJAX. The steps include establishing a database connection, sending a query, processing the response, and updating the page. This article provides a practical example of using JavaScript, AJAX and PHP to read data from a MySQL database, showing how to dynamically display query results in an HTML page. This example uses XMLHttpRequest to establish a database connection, send a query and process the response, thereby filling data into page elements and realizing the function of HTML reading the database.

PHP is a back-end programming language widely used in website development. It has powerful database operation functions and is often used to interact with databases such as MySQL. However, due to the complexity of Chinese character encoding, problems often arise when dealing with Chinese garbled characters in the database. This article will introduce the skills and practices of PHP in handling Chinese garbled characters in databases, including common causes of garbled characters, solutions and specific code examples. Common reasons for garbled characters are incorrect database character set settings: the correct character set needs to be selected when creating the database, such as utf8 or u

Through the Go standard library database/sql package, you can connect to remote databases such as MySQL, PostgreSQL or SQLite: create a connection string containing database connection information. Use the sql.Open() function to open a database connection. Perform database operations such as SQL queries and insert operations. Use defer to close the database connection to release resources.
