search
HomeDatabaseMysql TutorialOracle导入/导出(imp/exp)命令

Oracle 的导入实用程序 (Import utility) 允许从数据库提取数据,并且将数据写入操作系统文件。

Oracle 的导入实用程序 (Import utility) 允许从数据库提取数据,并且将数据写入操作系统文件。

imp 使用的基本格式: imp[username[/password[@service]]] ,以下例举 imp 常用用法。

1. 获取帮助

  imp help=y

2. 导入一个完整数据库

  imp system/manager file=bible_db log=dible_db full=y ignore=y

3. 导入一个或一组指定用户所属的全部表、索引和其他对象

  imp system/manager file=seapark log=seapark fromuser=seapark imp

  system/manager file=seapark log=seapark fromuser=(seapark,amy,amyc,harold)

4. 将一个用户所属的数据导入另一个用户

  imp system/manager file=tank log=tank fromuser=seapark touser=seapark_copy

  imp system/manager file=tank log=tank fromuser=(seapark,amy)

  touser=(seapark1, amy1)

5. 导入一个表

  imp system/manager file=tank log=tank fromuser=seapark TABLES=(a,b)

6. 从多个文件导入

  imp system/manager file=(paycheck_1,paycheck_2,paycheck_3,paycheck_4)

log=paycheck, filesize=1G full=y

7. 使用参数文件

  imp system/manager parfile=bible_tables.par

bible_tables.par 参数文件:

  #Import the sample tables used for the Oracle8i Database Administrator's

Bible. fromuser=seapark touser=seapark_copy file=seapark log=seapark_import

8. 增量导入

  imp system./manager inctype= RECTORE FULL=Y FILE=A

Oracle imp/exp

C:Documents and Settingsadministrator>exp help=y

Export: Release 9.2.0.1.0 - Production on 星期三 7 月 28 17:04:43 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

  ===========================================

通过输入 EXP 命令和用户名 / 口令,您可以
后接用户名 / 口令的命令 :

例程 : EXP SCOTT/TIGER

或者,,您也可以通过输入跟有各种参数的 EXP 命令来控制 “ 导出 ”
按照不同参数。要指定参数,您可以使用关键字 :

格式 : EXP KEYWORD=value 或 KEYWORD=(value1,value2,...,valueN)
例程 : EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
或 TABLES=(T1: P1,T1: P2) ,如果 T1 是分区表

USERID 必须是命令行中的第一个参数。

关键字   说明 ( 默认 )        关键字       说明 ( 默认 )
--------------------------------------------------------------------------
USERID   用户名 / 口令            FULL         导出整个文件 (N)
BUFFER   数据缓冲区大小           OWNER     所有者用户名列表
FILE       输出文件 (EXPDAT.DMP)  TABLES       表名称列表
COMPRESS   导入到一个区 (Y) RECORDLENGTH IO 记录的长度
GRANTS  导出权限 (Y)           INCTYPE      增量导出类型
INDEXES    导出索引 (Y)         RECORD       跟踪增量导出 (Y)
DIRECT     直接路径 (N)            TRIGGERS     导出触发器 (Y)
LOG        屏幕输出的日志文件   STATISTICS   分析对象 (ESTIMATE)
ROWS    导出数据行 (Y)        PARFILE      参数文件名
CONSISTENT 交叉表的一致性 (N) CONSTRAINTS  导出的约束条件 (Y)

OBJECT_CONSISTENT    只在对象导出期间设置为读的事务处理 (N)
FEEDBACK             每 x 行的显示进度 (0)
FILESIZE              每个转储文件的最大大小
FLASHBACK_SCN        用于将会话快照设置回以前状态的 SCN
FLASHBACK_TIME       用于获取最接近指定时间的 SCN 的时间
QUERY                用于导出表的子集的 select 子句
RESUMABLE            遇到与空格相关的错误时挂起 (N)
RESUMABLE_NAME       用于标识可恢复语句的文本字符串
RESUMABLE_TIMEOUT    RESUMABLE 的等待时间
TTS_FULL_CHECK       对 TTS 执行完整的或部分相关性检查
TABLESPACES          要导出的表空间列表
TRANSPORT_TABLESPACE 导出可传输的表空间元数据 (N)
TEMPLATE             调用 iAS 模式导出的模板名

在没有警告的情况下成功终止导出。
==================================================

C:Documents and Settingsadministrator>imp help=y

Import: Release 9.2.0.1.0 - Production on 星期三 7 月 28 17:06:54 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

可以通过输入 IMP 命令和您的用户名 / 口令
后接用户名 / 口令的命令 :

例程 : IMP SCOTT/TIGER

或者 , 可以通过输入 IMP 命令和各种参数来控制 “ 导入 ”
按照不同参数。要指定参数,您可以使用关键字 :

格式 : IMP KEYWORD=value 或 KEYWORD=(value1,value2,...,vlaueN)
例程 : IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N
或 TABLES=(T1: P1,T1: P2) ,如果 T1 是分区表

USERID 必须是命令行中的第一个参数。

关键字   说明(默认)         关键字       说明(默认)
--------------------------------------------------------------------------
USERID   用户名 / 口令            FULL 

更多Oracle相关信息见Oracle 专题页面 ?tid=12

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Reduce the use of MySQL memory in DockerReduce the use of MySQL memory in DockerMar 04, 2025 pm 03:52 PM

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

How to solve the problem of mysql cannot open shared libraryHow to solve the problem of mysql cannot open shared libraryMar 04, 2025 pm 04:01 PM

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Run MySQl in Linux (with/without podman container with phpmyadmin)Run MySQl in Linux (with/without podman container with phpmyadmin)Mar 04, 2025 pm 03:54 PM

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

What is SQLite? Comprehensive overviewWhat is SQLite? Comprehensive overviewMar 04, 2025 pm 03:55 PM

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Running multiple MySQL versions on MacOS: A step-by-step guideRunning multiple MySQL versions on MacOS: A step-by-step guideMar 04, 2025 pm 03:49 PM

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools