您好,登錄后才能下訂單哦!
這篇文章主要介紹Oracle如何備份還原,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!
創建表分區
create tablespace apps datafile '&1\apps.dbf' size 10m autoextend on next 8m; create tablespace appsys datafile '&1\appsys.dbf' size 10m autoextend on next 8m;
創建分區表空間
create tablespace APPS_00 datafile '&1\APPS_00.dbf' size 10M autoextend on next 8M; create tablespace APPSYS_00 datafile '&1\APPSYS_00.dbf' size 10M autoextend on next 8M;
刪除用戶
drop user apps cascade; drop user appsys cascade;
創建用戶
create user apps identified by cape default tablespace apps; create user appsys identified by cape default tablespace appsys;
授權
grant dba to apps with admin option; grant dba to appsys; grant create any table to apps; grant alter any table to apps; grant drop any table to apps; grant create any index to apps; grant drop any index to apps;
創建目錄
create or replace directory expdp_wms_dir as 'D:\data_bak\'; grant read, write on directory expdp_wms_dir to APPS;
EXP/IMP備份與還原
exp user/pwd@SID file=d:\db_20101010.dmp log=d:\db_20101010.log owner=(apps,appsys) imp user/pwd@SID file=D:\db_20101010.dmp log=D:\db_20101010.log fromuser=apps touser=apps fromuser=appsys touser=appsys ignore=y
EXPDP/IMPDP備份還原
expdp user/pwd@SID dumpfile=DB20141216.dmp logfile=DB20141216.log schemas=(apps,appsys) directory=expdp_dir job_name=expdp_job version=11.1.0.2 impdp user/pwd@SID dumpfile=DB20141216.DMP logfile=DB20141216.log schemas=(apps,appsys) directory=impdp_dir job_name=impdp_job
表空間映射
impdp user/pwd@SID dumpfile=DB20141216.DMP logfile=DB20141216.log remap_schema=QA_SOA:SNPW remap_tablespace=DEV_ODI_USER:JJE_ODI_USER directory=impdp_dir job_name=impdp_job
忘記ORACLE的管理員sys用戶密碼
在服務器本地登錄,無須密碼
sqlplus / as sysdba
登陸之后更改密碼
sql> alter user sys identified by sys;
user test lacks CREATE SESSION privilege; logon denied.
使用DBA登陸,執行下面的授權語句。
grant connect,resource to test;
grant create session to test;
以上是“Oracle如何備份還原”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注億速云行業資訊頻道!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。