日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

oracle 數據庫導入、導出

系統 1952 0

http://flash7783.javaeye.com/blog/648683 ? 數據庫導入/導出知識

?

connect system/密碼@實例名;

--刪除用戶及表空間
drop user pubr cascade;
drop tablespace pubrts including contents;

--創建表空間、用戶及授角色權限

CREATE TABLESPACE pubrts DATAFILE 'F:\oradata\ttfj\pubrts.dat' SIZE 200M REUSE AUTOEXTEND ON NEXT 50M;

create user pubr identified by bitservice default tablespace pubrts;
grant resource,connect to pubr;

--給用戶授對象操作權限

grant create sequence to tt;
grant create any table,alter any table,drop any table to tt;;
grant create any view,drop any view to tt;
grant create any trigger,alter any trigger,drop any trigger to tt;
grant create any procedure,alter any procedure,drop any procedure to tt;
grant create any synonym to tt;
grant create any snapshot,execute any procedure to tt;
grant select any dictionary to tt;
grant select any sequence to tt;
grant select any table,update any table to tt;
grant insert any table,delete any table to tt;

--導入

host imp system/bitservice@ttfj file=E:\萬州數據庫及應用20100603\siweidb.dmp log=E:\萬州數據庫及應用20100603\siweidb.log fromuser=(ap,pubr,tt,archive,pb) touser=(ap,pubr,tt,archive,pb) buffer=655000 ignore=y

--導出

exp system/bitservice file=c:\tt20091002.dmp log=c:\tt20091002.log owner=(ap,pubr,tt,archive,tt_contract,account,pb) buffer=655000 compress=y

--編譯 recompile.sql

set heading off;
spool c:\temp\compile.sql;
select 'ALTER ' || replace(OBJECT_TYPE,' BODY','') || ' ' || object_name || ' COMPILE;'
FROM user_objects where status = 'INVALID' and object_name not like '%==%';
spool off;
set heading on;
set echo on;
@c:\temp\compile.sql;
set echo off;

?

在數據庫恢復時(導入),需要停止web服務,是數據庫處于不被連接的狀態,否則用戶刪除時報錯,不能被刪除。

如果不刪除用戶,只刪除表空間,將導致用戶下的object不能被刪除(object包括function,procedure,synonym,package,Javasource,javaclass等),同樣object不能被導入。

oracle 數據庫導入、導出


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 平武县| 二连浩特市| 绥芬河市| 呼图壁县| 肇源县| 湾仔区| 阳江市| 东方市| 清镇市| 陇南市| 新宁县| 辽中县| 温宿县| 东乡县| 密云县| 洛阳市| 郎溪县| 江孜县| 岐山县| 肥西县| 札达县| 东城区| 郎溪县| 宁国市| 寿宁县| 利川市| 中宁县| 洛浦县| 扶风县| 沙洋县| 龙州县| 修文县| 封丘县| 上饶县| 长春市| 张家口市| 武强县| 屏山县| 定南县| 伊春市| 临澧县|