Oracle中不同用户间数据的导入导出Oracle认证考试

文章作者 100test 发表时间 2009:08:21 19:19:07
来源 100Test.Com百考试题网


"tb42" class="mar10">   实验环境:RedHat 4上装oracle 9
  实验目的:将用户jiajia的数据导入到用户tianyu
  实验步骤如下
  1、使用系统用户登陆为用户jiajia创建一个默认表空间名为jiajia
  [oracle@shanghai ~]$ sqlplus system/manager@mydb
  SQL*Plus: Release 9.2.0.4.0 - Production on 星期一 8月 10 20:10:42 2009
  Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
  Connected to:
  Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
  With the Partitioning and Oracle Data Mining options
  JServer Release 9.2.0.4.0 - Production
  SQL>. create tablespace jiajia datafile /opt/oracle/oradata/mydb/jiajia.dbf size 20M uniform size 64k.
  Tablespace created.
  2、创建用户jiajia并指定默认表空间为jiajia,临时表空间为temp
  SQL>. create user jiajia identified by jiajia default tablespace jiajia temporary tablespace temp.
  User created.
  3、授予连接,恢复,导入,导出数据库权限给jiajia
  SQL>. grant connect,resource,imp_full_database,exp_full_database to jiajia.
  Grant succeeded.
  SQL>. quit
  4、使用jiajia连接数据库mydb并创建用于测试的表studytable
  [oracle@shanghai ~]$ sqlplus jiajia/jiajia@mydb
  SQL*Plus: Release 9.2.0.4.0 - Production on 星期一 8月 10 20:17:13 2009
  Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
  Connected to:
  Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
  With the Partitioning and Oracle Data Mining options
  JServer Release 9.2.0.4.0 - Production
  SQL>. create table studytable
  2 (
  3 xh varchar(10) NOT NULL,
  4 xm varchar(10) NOT NULL,
  5 nl int,
  6 xb char(4) NOT NULL
  7 )
  8 .
  Table created.
  4、插入4条内容到该表中
  SQL>. insert into studytable values (1001,aaaa,20,男).
  1 row created.
  SQL>. insert into studytable values (1002,bbbb,21,女).
  1 row created.
  SQL>. insert into studytable values (1003,cccc,22,男).
  1 row created.
  SQL>. insert into studytable values (1004,dddd,24,女).
  1 row created.
  SQL>. commit.
  Commit complete.
  5、查看新建的表中内容
  SQL>. 0select * from studytable.
  XH XM NL XB
  ---------- ---------- ---------- ----
  1001 aaaa 20 男
  1002 bbbb 21 女
  1003 cccc 22 男
  1004 dddd 24 女
   6、再次使用系统用户登陆为用户tianyu创建一个默认表空间名为tianyu
  [oracle@shanghai ~]$ sqlplus system/manager@mydb
  SQL*Plus: Release 9.2.0.4.0 - Production on 星期一 8月 10 20:25:00 2009
  Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
  Connected to:
  Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
  With the Partitioning and Oracle Data Mining options
  JServer Release 9.2.0.4.0 - Production
  SQL>. create tablespace tianyu datafile /opt/oracle/oradata/mydb/tianyu.dbf size 20M uniform size 64k.
  Tablespace created.
  7、创建用户用户tianyu并指定默认表空间为tianyu,临时表空间为temp
  SQL>. create user tianyu identified by tianyu default tablespace tianyu temporary tablespace temp.
  User created.

相关文章


SunSolaris运行Oracle数据库所需的内核参数Oracle认证考试
Oracle9i中自动撤销管理的优点分析Oracle认证考试
调查显示MySQL进一步蚕食Oracle市场Oracle认证考试
如何快速解决Oracle数据库中的常见问题Oracle认证考试
Oracle中不同用户间数据的导入导出Oracle认证考试
详细讲解Oracle中isnumeric的三种实现Oracle认证考试
对一些代码加密后再放到Oracle数据库中Oracle认证考试
通过Oracle发送Email的实现方法Oracle认证考试
Oracle恢复管理器应用浅析Oracle认证考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛