参考:http://www.linuxidc.com/Linux/2011-09/43892.htm Oracle 11g 初学者指南 http://www.linuxidc.com/Linux/2014-10/108041
参考:
Oracle 11g 初学者指南
网上的资料都很零碎,而且大部分都不能完成要求的功能,所以做了些整理与完善
准备工作
1 在环境变量中队bin目录进行配置。默认情况下,安装Oracle数据库时,将自动配置相应的环境变量,
例如D:/oracle/product/10.2.0/db_1/BIN
2 在oracle安装路径的bin文件夹中,确定expdp.exe和impdp.exe文件的存在。
3 创建一个外部目录。
data pump要求为将要创建和读取的数据文件和日志文件创建目录,用来指向
使用的外部目录。在oracle中创建目录对象时,,可以使用 create directory
语句。
【实例】
1,检查,高级环境变量-pathpath里面有无bin目录
2,检查expdp.exe、impdp.exe文件是否存在。
3,建立目录
c:/> sqlplus /nolog
sql> conn sys/sys as sysdba
sql> create directory mypump as 'd:/app/temp';
sql> grant read, write on directory mypump to scot
实现数据导出
【实例】
1,表模式导出
expdp scott/scott_2009 directory=mypumpdumpfile=expdptab.dmp tables=dept,emp
(select * from dba_tablespaces; altertablespace testspace online;)
2,schema模式导出
(ORA-39083 这个错误的原因是出在用户的权限上,而且是在导出的时候在expdp之前执行 grant EXP_FULL_DATABASE to scott;)
expdp system/system directory=mypumpdumpfile=expdp.dmp schemas=scott nologfile=y
3,表空间数据导出
expdp system/system directory=mypumpdumpfile=expdpspace.dmp tablespaces=EPISCMCC_DTS
4,全库模式导出
expdpsystem/system directory=mypump dumpfile=expdp.dmp full=y
实现数据导入
1,表模式导入
impdpscott/scott_2009 directory=mypump dumpfile=expdptab.dmp tables=dept,emp
2,schema模式导入
impdpsystem/system directory=mypump dumpfile=expdp.dmp schemas=scott
3,表空间数据导入
impdp system/tiger directory=mypump dumpfile=expdspaces.dmp remap_tablespace=EPISCMCC_DTS:EPISCMCC_DTS table_exists_action=replace
4,全库模式导入
impdpsystem/system directory=mypump dumpfile=expdp.dmp full=y table_exists_action=replace
其中:在表空间导入与全库导入的时候要事先创建表空间与相应的表空间下的用户具体步骤如下:
导入到数据库之前,要在新数据库创建相应的表空间及用户
其中源数据库中的表空间为EPICMCC_DTS,该表空间下的用户为EPICMCC
/*创建临时表空间*/
create temporary tablespace EPISCMCC_TEMP
tempfile 'C:\app\z002w00r-e01\oradata\orcl\EPISCMCC_TEMP.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local
/*创建表空间*/
create tablespace EPISCMCC_DTS
logging
datafile 'C:\app\z002w00r-e01\oradata\orcl\EPISCMCC_DTS.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local
/*创建用户指定表空间*/
create user EPISCMCC identified by tiger
default tablespace EPISCMCC_DTS
temporary tablespace EPISCMCC_TEMP
/*给用户授权*/
grant connect,resource,dba to EPISCMCC
----------------------------华丽丽的分割线----------------------------
Oracle导入导出expdp IMPDP详解
Oracle 10g expdp导出报错ORA-4031的解决方法
Oracle 10gr2 rac expdp 报错UDE-00008 ORA-31626
Oracle中利用expdp/impdp备份数据库的使用说明
Oracle备份还原(expdp/impdp)
本文永久更新链接地址:

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

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]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

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

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

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),

Dreamweaver CS6
Visual web development tools

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

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 English version
Recommended: Win version, supports code prompts!
