码迷,mamicode.com
首页 > 其他好文 > 详细

建库倒库

时间:2018-07-04 19:00:17      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:enc   cal   logging   rom   sequence   file   用户名   serial   role   

 

创建表空间:
(需要有相对应的路径d:\database\)
--一体化系统表空间
create tablespace LTLOBDATA01
datafile ‘d:\database\LTLOBDATA01.def‘ size 1G
autoextend on next 100M maxsize unlimited logging
extent management local autoallocate
segment space management auto;


-- 1 create user username
create user bj1220
identified by "1"
default tablespace LTSYSDATA01
temporary tablespace TEMP
profile default
account unlock;

-- 3 grant role tempuser_role to username
--grant tempuser_role to username;
grant comment any table to bj1220;
grant create any sequence to bj1220;
grant create any table to bj1220;
grant create any view to bj1220;
grant alter any procedure to bj1220;
grant create any procedure to bj1220;
grant unlimited tablespace to bj1220;
grant dba to bj1220;
commit


drop user 用户名 cascade;
select * from v$session where username =‘用户名‘

drop user EFM_PORTAL_LH01 cascade;
select * from v$session where username =‘EFM_PORTAL_LH01‘
select saddr,sid,serial#,paddr,username,status from v$session where username is not null and username = ‘EFM_PORTAL_LH01‘
alter system kill session‘74,52833‘

 

export.bat文件

set username=HUILAI2017
set password=HUILAI2017
set filename=huilai.dmp
set servername=192.168.100.97/orcl
set cd=F:\gx\export
exp %username%/%password%@%servername% file=%cd%\%filename% log=%cd%\%username%.log

pause

import.bat文件

set username=EFM_PORTAL_GX
set password=EFM_PORTAL_GX
set filename=efm_portal_650205.dmp
set servername=127.0.0.1/orcl
set cd=F:\gx
imp %username%/%password%@%servername% file=%cd%\%filename% full=y ignore=y buffer=40960000 commit=y

pause

 

建库倒库

标签:enc   cal   logging   rom   sequence   file   用户名   serial   role   

原文地址:https://www.cnblogs.com/sx2zx/p/9264570.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!