Oracle建立使用者以及備份還原資料庫操作

2021-09-07 12:24:36 字數 1319 閱讀 7027

-- create the user 

create user xx

identified by ""

default tablespace users

temporary tablespace temp

profile default

password expire;

-- grant/revoke role privileges

grant connect to xx;

grant dba to xx;

grant exp_full_database to xx;

-- grant/revoke system privileges

grant alter any index to xx;

grant alter any table to xx;

grant create any index to xx;

grant create any table to xx;

grant create session to xx;

grant drop any index to xx;

grant drop any table to xx;

grant select any table to xx;

grant unlimited tablespace to xx;

---刪除使用者時,提示無法刪除當前使用者鏈結使用者

select 'alter system kill session'''|| to_char(a.sid)||','||to_char(serial#)||'''' from v$session a

where a.username=xx;

--執行查詢結果,然後再刪除使用者

---計畫任務

select job,broken,what,interval,t.* from user_jobs t;

begin

dbms_job.remove(63);

end;

--匯出(排除表t_attachment)

expdp switch40/switch40@orcl dumpfile = switch40_0606_1907.dmp schemas=switch40 exclude=table:\"in ('t_xx')\"

--匯入。從剛剛備份的使用者switch40到新使用者switch52

impdp switch52/switch52@orcl dumpfile = switch40_0606_1907.dmp remap_schema=switch40:switch52

oracle建立使用者以及授權

建立使用者scott密碼pass,預設表空間使用的時臨時表空間temp create user scott identified by pass default tablespace scott temporary tablespace temp 建立表空間scott初始大小是5m,當表空間滿的時候...

Oracle建立使用者以及備份還原資料庫操作

create the user create user xx identified by default tablespace users temporary tablespace temp profile default password expire grant revoke role priv...

oracle表空間以及使用者建立

建立臨時表空間 create temporary tablespace test temp tempfile e oracle product 10.2.0 oradata testserver test temp01.dbf size 32m autoextend on next 32m maxs...