考试辅导

名师推荐

试听名师的课 查看所有名师

三级:把数据导入不同的表空间 发布时间:2010-06-25 17:32 来源:互联网

 很多人在进行数据迁移时,希望把数据导入不同于原系统的表空间,在导入之后却往往发现,数据被导入了原表空间。
  本例举例说明解决这个问题:
  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.

第一考试网友情提示:如果您遇到任何疑问,请登录第一考试网考试辅导频道或添加qq:,第一考试网以“为考友服务”为宗旨,秉承“快乐学习,轻松考试!”的理念,旨在为广大考友打造一个良好、温馨的学习与交流平台,欢迎持续关注。以上是小编为大家推荐的《三级:把数据导入不同的表空间》相关信息。

编辑推荐

计算机等级考试辅导:SQL中JOB的运行状态

计算机等级考试辅导:SQLSERVER2005的引用

三级:把数据导入不同的表空间

2009年三级信息管理技术辅导:战略数据规划

教你三种方法卸载Windows7SP1Beta