ITeye博客

oracle导入导出数据和导出表结构

xiaosu_521 · 2008-03-11 20:36 · Database · CSS · 数据结构 · SQL · Oracle · Linux · Markdown

<meta content="text/html; charset=utf-8" http-equiv="CONTENT-TYPE"> <meta name="GENERATOR" content="OpenOffice.org 2.0 (Linux)"> <meta name="AUTHOR" content="sl"> <meta name="CREATED" content="20080311;17380000"> <meta name="CHANGEDBY" content="sl"> <meta name="CHANGED" content="20080311;17470000"> <style type="text/css"> </style> <ol> <li> <p style='margin-bottom: 0cm;'>导出一个用户下的所有表数据</p> </li> </ol> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'>常用的命令</p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'><font>Exp user/password@instance file=file.dmp rows=y log=log_name</font></p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'>其中<font>username/password</font>为导出用户的用户名和密码</p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'><font>Instance</font>为导出的实例名</p> <p style='margin-bottom: 0cm;'><br/> </p> <ol start='2'> <li> <p style='margin-bottom: 0cm;'>导出一个用户下的表结构为<font>sql</font>文件</p> </li> </ol> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'>使用命令好像导出的都是<font>dmp</font>文件</p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'>可以使用<font>plsql</font>软件在<font>tools--<font></font>export user object</font></p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'>如果不要到处<font>table space </font>,不要勾<font>include storage</font></p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'>选择导出的路径文件名,<font>export</font>可以直接导出了</p> <p style='margin-bottom: 0cm;'><br/> </p> <ol start='3'> <li> <p style='margin-bottom: 0cm;'>导入一个用户下的所有表数据</p> </li> </ol> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'>常用命令</p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'><font>Imp username/password file=file.dmp fromuser=user1 touser=user2 rows=y </font> </p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'>其中<font>username/password</font>为导入到数据库的用户名和密码</p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'><font>Fromuser</font>为备份数据库时的用户</p> <p style='margin-left: 0.64cm; margin-bottom: 0cm;'><font>Touser</font>为导入数据库的用户,一般和<font>username</font>同</p>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。