備份及恢復EAS測試伺服器資料庫

2021-06-23 02:14:26 字數 3037 閱讀 8072

以下操作在測試伺服器進行:標識黃色為替換點

1、備份正式資料庫:

# su - oracle

$ expdp system/passwd schemas=jingyadirectory=expdp_dump dumpfile=jingya20130918.dmp logfile=expdp20130918.log parallel=4cluster=n exclude=table:\" like \'vt%\'\",statistics

注:備份檔案名及日誌檔名需要變動

2、建立資料夾:

3、更改許可權:

4、進入sysdba

#su – oracle

$sqlplus / as sysdba

5、建立表空間

create smallfile tablespace eas_d_jingya7_standarddatafile

logging

online

permanent

extent management local autoallocate

blocksize 8k

segment space management auto

flashback off;

6、建立臨時表空間之一

create smallfile tablespace eas_d_jingya7_temp2datafile

nologging

online

permanent

extent management local autoallocate

blocksize 8k

segment space management auto

flashback off;

7、建立臨時表空間之二

create smallfile temporary tablespaceeas_t_jingya7_standard tempfile

tablespace group ''

extent management local uniform size 5m;

8、建立使用者

create user jingya7

identified by values 'passwd'

default tablespace eas_d_jingya7_standard

temporary tablespace eas_t_jingya7_standard

profile default

account unlock;

--22 system privileges for jingya7

grant create view to jingya7;

grant delete any table to jingya7;

grant alter any table to jingya7;

grant unlimited tablespace to jingya7;

grant alter any procedure to jingya7;

grant drop any table to jingya7;

grant insert any table to jingya7;

grant select any dictionary to jingya7;

grant create any view to jingya7;

grant create trigger to jingya7;

grant drop any procedure to jingya7;

grant update any table to jingya7;

grant create session to jingya7;

grant create sequence to jingya7;

grant create any index to jingya7;

grant create procedure to jingya7;

grant create table to jingya7;

grant create any procedure to jingya7;

grant drop any view to jingya7;

grant drop any index to jingya7;

grant select any table to jingya7;

grant create any table to jingya7;

--1 object privilege for jingya7

grant read, write on directory sys.dmpdir to jingya7;

9、匯入備份資料:

$impdp system/oracle remap_schema=jingya:jingya7remap_tablespace=eas_d_jingya_standard:eas_d_jingya7_standard,eas_d_jingya_temp2:eas_d_jingya7_temp2,eas_t_jingya_standard:eas_t_jingya7_standarddirectory=expdp_dump dumpfile=jingya20131213.dmp logfile=impdp20131218.log parallel=4

10.刪除資料庫的表空間和使用者

droptablespace eas_d_jingya2_standardincluding contents and datafiles cascade constraints;

droptablespace eas_d_jingya2_temp2including contents and datafiles cascade constraints;

droptablespace eas_t_jingya2_standardincluding contents and datafiles cascade constraints;

dropuser jingya2cascade;

Perforce伺服器建立及備份恢復

1.安裝perforce server 2.進入命令列視窗,依次執行以下命令 cd server files location p4 set p4root server files location p4 set p4port ip port p4d3.直到出現 perforce service s...

linux搭建svn伺服器及備份恢復

檢查是否已安裝 rpm qa subversion安裝svn伺服器 yum install subversion驗證安裝 rpm qa grep subversion 庫建立 mkdir p var svn svnrepos svnadmin create var svn svnrepos svn1...

伺服器資料恢復

伺服器資料儲存安全是保障伺服器正常執行的重要的環節,同時也是企業網路資訊化建設的核心。每一家企業的管理層人員都非常重視儲存在伺服器的 重要資料,包括 各類管理中所產生的機密辦公檔案 經營中所積累的客戶資料 研發中所涉及的重要檔案等等,使用者時時關注伺服器資料儲存裝置運 況。其中作為儲存裝置中的一員,...