--創建表空間並賦用戶權限
create tablespace CIQ_BUDGET datafile 'D:\oracle\product\10.2.0\oradata\orcl\ciq_budget.dbf' size 100M;
create user ciq identified by ciq default tablespace CIQ_BUDGET;
grant connect,resource,dba to ciq;
--總局
CREATE USER ciqbudget_zj IDENTIFIED BY ciqbudget_zj DEFAULT TABLESPACE CIQ_BUDGET ACCOUNT UNLOCK;
grant connect,resource to ciqbudget_zj;
--技術中心
CREATE USER ciqbudget_js IDENTIFIED BY ciqbudget_js DEFAULT TABLESPACE CIQ_BUDGET ACCOUNT UNLOCK;
grant connect,resource to ciqbudget_js;
CREATE USER bjciqportal IDENTIFIED BY bjciqportal DEFAULT TABLESPACE CIQ_BUDGET ACCOUNT UNLOCK;
grant connect,resource to bjciqportal;
--導入總局用戶數據
imp ciq/ciq@ORCL file=d:ciq_budget_8_11_2013-12-11-23-00-00.dmp fromuser=CIQ_BUDGET touser=ciqbudget_zj ignore=y log=ciqbudget_zj.log
--導入技術中心用戶數據
imp ciq/ciq@ORCL file=d:ciq_budget_2013-01-15.DMP fromuser=CIQ_BUDGET touser=ciqbudget_js ignore=y log=ciqbudget_js.log
imp ciq/ciq@ORCL file=d:*********.DMP fromuser=CIQ_BUDGET touser=bjciqportal ignore=y log=ciqbudget_js.log
--刪除表空間
DROP TABLESPACE CIQ_BUDGET_ZJ INCLUDING CONTENTS;
--刪除用戶
DROP USER ciq_budget CASCADE;
--調整表空間大小
alter database datafile 'D:\oracle\product\10.2.0\oradata\orcl\ciq_budget.dbf' resize 200M;
CREATE USER CIQ_BUDGET IDENTIFIED BY CIQ_BUDGET DEFAULT TABLESPACE CIQ_BUDGET ACCOUNT UNLOCK;
grant connect,resource to CIQ_BUDGET;
imp ciq/ciq@ORCL file=d:ciq_budget_2013-01-15.DMP fromuser=CIQ_BUDGET touser=CIQ_BUDGET ignore=y log=CIQ_BUDGET.log
導出
exp CIQ_FOODSTUFF/[email protected] file=d:CIQ_FOODSTUFF_20140402.dmp
create tablespace CIQ_BUDGET datafile 'D:\oracle\product\10.2.0\oradata\orcl\ciq_budget.dbf' size 100M;
create user ciq identified by ciq default tablespace CIQ_BUDGET;
grant connect,resource,dba to ciq;
--總局
CREATE USER ciqbudget_zj IDENTIFIED BY ciqbudget_zj DEFAULT TABLESPACE CIQ_BUDGET ACCOUNT UNLOCK;
grant connect,resource to ciqbudget_zj;
--技術中心
CREATE USER ciqbudget_js IDENTIFIED BY ciqbudget_js DEFAULT TABLESPACE CIQ_BUDGET ACCOUNT UNLOCK;
grant connect,resource to ciqbudget_js;
CREATE USER bjciqportal IDENTIFIED BY bjciqportal DEFAULT TABLESPACE CIQ_BUDGET ACCOUNT UNLOCK;
grant connect,resource to bjciqportal;
--導入總局用戶數據
imp ciq/ciq@ORCL file=d:ciq_budget_8_11_2013-12-11-23-00-00.dmp fromuser=CIQ_BUDGET touser=ciqbudget_zj ignore=y log=ciqbudget_zj.log
--導入技術中心用戶數據
imp ciq/ciq@ORCL file=d:ciq_budget_2013-01-15.DMP fromuser=CIQ_BUDGET touser=ciqbudget_js ignore=y log=ciqbudget_js.log
imp ciq/ciq@ORCL file=d:*********.DMP fromuser=CIQ_BUDGET touser=bjciqportal ignore=y log=ciqbudget_js.log
--刪除表空間
DROP TABLESPACE CIQ_BUDGET_ZJ INCLUDING CONTENTS;
--刪除用戶
DROP USER ciq_budget CASCADE;
--調整表空間大小
alter database datafile 'D:\oracle\product\10.2.0\oradata\orcl\ciq_budget.dbf' resize 200M;
CREATE USER CIQ_BUDGET IDENTIFIED BY CIQ_BUDGET DEFAULT TABLESPACE CIQ_BUDGET ACCOUNT UNLOCK;
grant connect,resource to CIQ_BUDGET;
imp ciq/ciq@ORCL file=d:ciq_budget_2013-01-15.DMP fromuser=CIQ_BUDGET touser=CIQ_BUDGET ignore=y log=CIQ_BUDGET.log
導出
exp CIQ_FOODSTUFF/[email protected] file=d:CIQ_FOODSTUFF_20140402.dmp