java执行exp导出命令_java 导入导出的 命令

$exp lddba/ld_321@192.168.1.3/testora file=E:\db_bak\ld20170219_1testora.dmp log=E:\db_bak\ld20170219_1testora.log full=y;

$imp lddba/ld_321@127.0.0.1/ldora file=E:\ld20170225_1test.dmp log=E:\ld20170225_1testimp.log fromuser=lddba touser=lddba statistics=none;

/***********************************************************************

Oracle11g 空表处理

*************************************************************/

statistics=none是为了不导入统计信息,如果表很大,导入统计信息会花很长时间;

rows:表示导出数据行full( 全库导出): 导出除ORDSYS,MDSYS,CTXSYS,ORDPLUGINS,LBACSYS 这些系统用户之外的所有用户的数据.下面这个应该是imp时的参数,exp没有ignore=y 表示忽略创建错误,继续后面的操作

show parameter deferred_segment_creation

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

deferred_segment_creation boolean TRUE

SQL> alter system set deferred_segment_creation=false;

系统已更改。

SQL> show parameter deferred_segment_creation

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

deferred_segment_creation boolean FALSE

处理后需要重启 才能生效

select 'alter table '|| table_name|| ' allocate extent ; ' from user_tables where NUM_rows =0;

/********************************************************************/

----创建数据库

----创建数据库表空间

----赋值对应的权限

-- Create the user

create user SCMDBA

identified by "scm_321" --密码

default tablespace USERS

temporary tablespace TEMP

profile DEFAULT

password expire;

-- Grant/Revoke object privileges

grant select on DUAL to SCMDBA;

grant select on PENDING_TRANS$ to SCMDBA;

-- Grant/Revoke role privileges

grant connect to SCMDBA;

grant dba to SCMDBA with admin option;

grant exp_full_database to SCMDBA;

grant imp_full_database to SCMDBA;

grant resource to SCMDBA;

-- Grant/Revoke system privileges

grant administer any sql tuning set to SCMDBA with admin option;

grant alter user to SCMDBA;

grant create any view to SCMDBA;

grant create session to SCMDBA;

grant create user to SCMDBA;

grant drop any view to SCMDBA;

grant drop user to SCMDBA;

grant unlimited tablespace to SCMDBA with admin option;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值