Skip to content

Instantly share code, notes, and snippets.

@zhuqling
Last active August 29, 2015 14:09
Show Gist options
  • Save zhuqling/0a875ab9348e0df606a6 to your computer and use it in GitHub Desktop.
Save zhuqling/0a875ab9348e0df606a6 to your computer and use it in GitHub Desktop.
ORACLE restrore dmp file
# ORACLE restrore dmp file
## create tablespace
<pre>
create temporary tablespace STUDIO_temp tempfile '<DBPATH>/STUDIO_temp.dbf' size 500M;
create tablespace STUDIO datafile '<DBPATH>/STUDIO.dbf' size 500M;
create temporary tablespace FRAMEWORK_temp tempfile '<DBPATH>/FRAMEWORK_temp.dbf' size 500M;
create tablespace FRAMEWORK datafile '<DBPATH>/FRAMEWORK.dbf' size 500M;
</pre>
## create user
<pre>
CREATE USER <USER> IDENTIFIED BY <PASSWORD>;
</pre>
## grant user privillege
<pre>
grant dba to <USER>;
</pre>
## import dmp file
<pre>
run in shell
imp <USER>/<PASSWORD> file=<FILELOCATION>/STUDIO.dmp fromuser=<ORIGIN_USER> touser=<USER> buffer=512000
imp <USER>/<PASSWORD> file=<FILELOCATION>/FRAMEWORK.dmp fromuser=<ORIGIN_USER> touser=<USER> buffer=512000
</pre>
## 安装oracel 注意事项
* 11g版本不要在安装里创建数据库,此时创建数据库无法选择使用UTF8,会默认使用UTF16,导致与导入文件编码不一致,需在安装完成后,使用databse configuration assistance 创建数据库,可以选择使用UTF8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment