易截截图软件、单文件、免安装、纯绿色、仅160KB

Oracle数据库imp和exp的使用【转】


1.导入数据命令:imp userid=fkprod/fkprod full=y file=xxx.dmp
2.导出数据库对象命令:
使用tools--->export user object只能导出数据表脚本不能带出数据,
或者使用exp user/pwd file=/dir/xxx.dmp log=xxx.log full=y commit=y ignore=y
注意:如果你要远程登录到数据库服务器导出,可以在本地SQLPLUS做如下命令:
>1.第一种方法在SQLPULS:
conn user/pwd@schema
$exp user/pwd file=/dir/xxx.dmp log=xxx.log full=y commit=y ignore=y
>2.在windows操作系统的cmd 命令行窗口中,直接使用imp和exp即可.
>3.在linux下, 以oracle用户登录,在终端中直接输入imp和exp就可以.
3.删除用户与其对象:drop user username cascade
4. 给用户分配角色:GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
   DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
      DBA,CONNECT,RESOURCE,CREATE SESSION  TO 用户名
5.创建一个用户:create user "XXXX" identified by "XXXX"  注意:这里的用户名和密码一定要用大写
更多的使用请参考一下几种方式
以下三种方式:
(1)交互式方式
$ exp        //  然后按提示输入所需要的参数
(2)命令行方式
$ exp user/pwd@dbname file=/oracle/test.dmp full=y    //  命令行中输入所需的参数
 
(3)参数文件方式
$ exp parfile=username.par    //  在参数文件中输入所需的参数
参数文件 username.par 内容 userid=username/userpassword buffer=8192000
compress=n grants=y
file=/oracle/test.dmp full=y
 
3.  三种模式
 
(1)表方式,将指定表的数据导出/导入。
导出:
导出一张或几张表:
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1,table2
导出某张表的部分数据
$ exp user/pwd file=/dir/xxx.dmp log=xxx.log tables=table1 query=\”where col1=\’…\’
and col2 \<…\”
导入:
导入一张或几张表
$  imp  user/pwd  file=/dir/xxx.dmp  log=xxx.log  tables=table1,table2  fromuser=dbuser touser=dbuser2 commit=y ignore=y
 
(2)用户方式,将指定用户的所有对象及数据导出/导


相关文档:

Oracle Waits event:DB File Scattered Read

The DB File Scattered Read wait event generally indicates waits related to full table scans or fast
full index scans. As full table scans are pulled into memory, they are scattered throughout the
buffer cache, since it is usually unlikely that they fall into contiguous buffers. A large numb ......

oracle raw devices

1.LVM:
[root@vmfs ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdg
  VG Name               db_v4
  PV Size  ......

oracle raw device create tablespace

  
[root@vmfs sysconfig]# lvdisplay |grep db_d
  LV Name                /dev/db_v4/db_d_22
  LV Name                /dev/db_v4 ......

Oracle温习与入门

SQL Server开发者Oracle快速入门 http://kb.cnblogs.com/a/853694 简单概念的介绍 1. 连接数据库
S:    use mydatabase
O:    connect username/password@DBAlias
       conn username/password@DBAlias 2. 在Oracle中使用Dual, Dual是O ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号