建库倒库

Posted sx2zx

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了建库倒库相关的知识,希望对你有一定的参考价值。

 

创建表空间:
(需要有相对应的路径d:database)
--一体化系统表空间
create tablespace LTLOBDATA01
datafile ‘d:databaseLTLOBDATA01.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:gxexport
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

 








































以上是关于建库倒库的主要内容,如果未能解决你的问题,请参考以下文章

Oracle11gR2--手工建库&dbca建库

sqlserver的建库脚本如何转换成mysql的建库脚本?

mysql建库

记一次linux静默安装oracle加手工建库

外网综合平台建库

maven 自建库