动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Oracle教程 ]的信息

本月文章推荐
.Oracle SQL*Loader 使用指南.
.Win2000安装ASE12.5(英文版)显乱.
.ORACLE SQL性能优化系列(九).
.oracle三大技术应用大会合为一体.
.如何快速查找文件.
.案例:redo log日志组处于高激活.
.ORA-00600 2262错误解决.
.oracle 转换函数的使用.
.数据表性能优化实例.
.10g即时客户端在不同系统环境下的.
.Oracle 恢复管理器 (RMAN) 的功能.
.PL/Sql循序渐进全面学习教程.
.关于p4机器上安装oracle8i的问题.
.Oracle10g回溯版本查询追踪行变化.
.Oracle中spfile和pfile间区别和联.
.Installing Oracle9i Database o.
.Oracle数据库的几个关闭方法与例.
.ORACLE入门之简析REDO LOGFILE.
.细化解析:Oracle 10g ASM 的一点.
.如何掌握 Oracle 中的时间间隔型.

如何把数据导入不同的表空间?

发表日期:2008-2-9 |



  很多人在进行数据迁移时,希望把数据导入不同于原系统的表空间,在导入之后却往往发现,数据被导入了原表空间。
  
  本例举例说明解决这个问题:
  
  1.假如缺省的用户具有DBA权限
  
  那么导入时会按照原来的位置导入数据,即导入到原表空间
  $ imp bjbbs/passwd file=bj_bbs.dmp fromuser=jive touser=bjbbs grants=n
  
  Import: Release 8.1.7.4.0 - ProdUCtion on Mon Sep 22 11:49:41 2003
  
  (c) Copyright 2000 Oracle Corporation. All rights reserved.
  
  Connected to: Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
  With the Partitioning option
  JServer Release 8.1.7.4.0 - 64bit Production
  
  EXPort file created by EXPORT:V08.01.07 via conventional path
  
  Warning: the objects were exported by JIVE, not by you
  
  import done in ZHS16GBK character set and ZHS16GBK NCHAR character set
  . . importing table        "HS_ALBUMINBOX"     12 rows imported
  . . importing table        "HS_ALBUM_INFO"     47 rows imported
  . . importing table          "HS_CATALOG"     13 rows imported
  . . importing table     "HS_CATALOGAUTHORITY"     5 rows imported
  . . importing table     "HS_CATEGORYAUTHORITY"     0 rows imported
  ....
  . . importing table         "JIVEUSERPROP"     4 rows imported
  . . importing table          "JIVEWATCH"     0 rows imported
  . . importing table          "PLAN_TABLE"     0 rows imported
  . . importing table          "TMZOLDUSER"     3 rows imported
  . . importing table         "TMZOLDUSER2"     3 rows imported
  About to enable constraints...
  Import terminated successfully without warnings.
  
  查询发现仍然导入了USER表空间
  
  $ sqlplus bjbbs/passwd
  
  SQL*Plus: Release 8.1.7.0.0 - Production on Mon Sep 22 11:50:03 2003
  
  (c) Copyright 2000 Oracle Corporation. All rights reserved.
  
  Connected to:
  Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
  With the Partitioning option
  JServer Release 8.1.7.4.0 - 64bit Production
  
  SQL> select table_name,tablespace_name from user_tables;
  
  TABLE_NAME           TABLESPACE_NAME
  ------------------------------ ------------------------------
  HS_ALBUMINBOX         USERS
  HS_ALBUM_INFO         USERS
  HS_CATALOG           USERS
  HS_CATALOGAUTHORITY      USERS
  HS_CATEGORYAUTHORITY      USERS
  HS_CATEGORYINFO        USERS
  HS_DLF_DOWNLOG         USERS
  ...
  JIVEWATCH           USERS
  PLAN_TABLE           USERS
  TMZOLDUSER           USERS
  
  TABLE_NAME           TABLESPACE_NAME
  ------------------------------ ------------------------------
  TMZOLDUSER2          USERS
  
  45 rows selected.
  
  2.回收用户unlimited tablespace权限
  
  这样就可以导入到用户缺省表空间
  
  SQL> create user bjbbs identified by passwd
   2 default tablespace bjbbs
   3 temporary tablespace temp
   4 /
  
  User created.
  
  SQL> grant connect,resource to bjbbs;

  
  Grant succeeded.
  
  SQL> grant dba to bjbbs;
  
  Grant succeeded.
  
  SQL> revoke unlimited tablespace from bjbbs;
  
  Revoke succeeded.
  
  SQL> alter user bjbbs quota 0 on users;
  
  User altered.
  
  SQL> alter user bjbbs quota unlimited on bjbbs;
  
  User altered.
  
  SQL> exit
  Disconnected from Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
  With the Partitioning option
  JServer Release 8.1.7.4.0 - 64bit Production
  
  重新导入数据
  
  $ imp bjbbs/passwd file=bj_bbs.dmp fromuser=jive touser=bjbbs grants=n
  
  Import: Release 8.1.7.4.0 - Production on Mon Sep 22 12:00:51 2003
  
  (c) Copyright 2000 Oracle Corporation. All rights reserved.
  
  Connected to: Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
  With the Partitioning option
  JServer Release 8.1.7.4.0 - 64bit Production
  
  Export file created by EXPORT:V08.01.07 via conventional path
  
  Warning: the objects were exported by JIVE, not by you
  
  import done in ZHS16GBK character set and ZHS16GBK NCHAR character set
  . . importing table        "HS_ALBUMINBOX"     12 rows imported
  . . importing table        "HS_ALBUM_INFO"     47 rows imported
  . . importing table          "HS_CATALOG"     13 rows imported
  . . importing table     "HS_CATALOGAUTHORITY"     5 rows imported
  . . importing table     "HS_CATEGORYAUTHORITY"     0 rows imported
  . . importing table       "HS_CATEGORYINFO"     9 rows imported
  . . importing table        "HS_DLF_DOWNLOG"     0 rows imported
  ....
  . . importing table           "JIVEUSER"    102 rows imported
  . . importing table         "JIVEUSERPERM"     81 rows imported
  . . importing table         "JIVEUSERPROP"     4 rows imported
  . . importing table          "JIVEWATCH"     0 rows imported
  . . importing table          "PLAN_TABLE"     0 rows imported
  . . importing table          "TMZOLDUSER"     3 rows imported
  . . importing table         "TMZOLDUSER2"     3 rows imported
  About to enable constraints...
  Import terminated successfully without warnings.
  
  SQL> select table_name,tablespace_name from user_tables;
  
  TABLE_NAME           TABLESPACE_NAME
  ------------------------------ ------------------------------
  HS_ALBUMINBOX         BJBBS
  HS_ALBUM_INFO         BJBBS
  HS_CATALOG           BJBBS
  HS_CATALOGAUTHORITY      BJBBS
  ....
  JIVETHREAD           BJBBS
  JIVETHREADPROP         BJBBS
  JIVEUSER            BJBBS
  JIVEUSERPERM          BJBBS
  JIVEUSERPROP          BJBBS
  JIVEWATCH           BJBBS
  PLAN_TABLE           BJBBS
  TMZOLDUSER           BJBBS
  
  TABLE_NAME           TABLESPACE_NAME
  ------------------------------ ------------------------------
  TMZOLDUSER2          BJBBS
  
  45 rows selected.
  
  现在数据被导入到正确的用户表空间中. right">(出处:清风软件下载学院)
上一篇:10g新特性之-expdp与传统exp的速度比较 人气:417
下一篇:使用Oracle9i的blockrecover新特性修复数据库中的坏块 人气:456
浏览全部Oracle教程的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-8-19 久溜溜电影系统(免维护+小偷) v5
2008-8-19 晴天免费电影系统完整版(带迅雷采
2008-8-19 Twinklous File Manager v1.5
2008-8-19 千米旅游网站管理系统 v2.0
2008-8-19 资阳人才网 v2.0
2008-8-19 全球商务B2B网站系统 v1.0 asp版
2008-8-19 动域网主机代理管理系统 v1.0
2008-8-19 JH2008-企业网站(全站生成html)
2008-8-19 GlobalEC C2C管理系统 v1.0
2008-8-16 iLaba Player(小喇叭播放器) v2.
2008-8-16 DoubleClickFix 鼠标双击修正工具
2008-8-16 CrystalCPUID 4.15.2.451
2008-8-16 VeryCD 电驴(easyMule) 1.0.4 Bu
2008-8-16 uTorrent 1.8 Build 11813 - Sta
2008-8-16 比特精灵(BitSpirit) v3.3.2.287
2008-8-16 StayInTune音叉 v1.0 破解版
2008-8-16 iChing《周易》汉化补丁 v1.0
2008-8-16 Starmap星空图v1.0汉化破解版
  发表评论
姓 名: 验证码:
内 容:
[ 汉字翻译拼音 ] [ 广告代码 ] [ 符号对照表 ] [ 进制转换 ] [ 经典小工具 ] [ 个税计算 ] [ 汉字简繁转换 ] [ 普通单位换算 ] [ 公制单位换算 ]
[ 生辰老黄历 ] [ 国内电话区号 ] [ 国家代码与域名缩写 ] [ 文字加密解密 ] [ 健康查询 ] [ 万年历 ] [ 手机号码查询 ] [ ip搜索 ] [ Google PR查询 ]
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号
ホームページ制作 不動産検索システム 求人情報
防水工事·改修工事 フットサル大会 探偵