System role in oracle demo

Cũng như export thì mọi user có role connect và resource đều có quyền import dữ liệu vào CSDL, cụ thể là schema của mình. Nếu một file export đc tạo bởi 1 user normal thì mọi user khác đều có thể import dữ liệu vào schema của mình nếu có file đó trong tay. Tuy nhiên nếu một file export bởi một dba thì chỉ có một dba khác mới có quyền import vào CSDL, hay nói các khác thì phải có quyền IMP_FULL_DATABASE để import từ file tạo bởi 1 dba.

ppt20 trang | Chia sẻ: lylyngoc | Lượt xem: 2581 | Lượt tải: 1download
Bạn đang xem nội dung tài liệu System role in oracle demo, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
SYSTEM ROLE IN ORACLE DEMO www.themegallery.com Nội dung demo EXECUTE_CATALOG_ROLE 1 EXP_FULL_DATABASE 2 IMP_FULL_DATABSE 3 GATHER_SYSTEM_STATISTICS 4 Chuẩn bị create user test0 identified by p123; create user test1 identified by p123; create user test2 identified by p123; create user test3 identified by p123; create user test4 identified by p123; www.themegallery.com Chuẩn bị grant connect, resource to test0; grant connect, resource, execute_catalog_role to test1; grant connect, resource, exp_full_database to test2; grant connect, resource, imp_full_database to test3; grant connect, resource, gather_system_statistics to test4; www.themegallery.com EXECUTE_CATALOG_ROLE Package: DBMS_LOCK Produres and functions: procedure allocate_unique(…); function request(…); function convert(…); function release(…); procedure sleep( seconds in number); www.themegallery.com EXECUTE_CATALOG_ROLE www.themegallery.com connect test0/p123; exec DBMS_LOCK.sleep(50); EXECUTE_CATALOG_ROLE connect test1/p123; exec DBMS_LOCK.sleep(50); www.themegallery.com EXP_FULL_DATABASE connect test0/p123; create table A( id varchar2(10) ); insert into A values ('abc'); connect test2/p123; create table B( id varchar2(10) ); www.themegallery.com EXP_FULL_DATABASE www.themegallery.com EXP_FULL_DATABASE www.themegallery.com EXP_FULL_DATABASE www.themegallery.com EXP_FULL_DATABASE www.themegallery.com EXP_FULL_DATABASE www.themegallery.com IMP_FULLDATA_BASE Cũng như export thì mọi user có role connect và resource đều có quyền import dữ liệu vào CSDL, cụ thể là schema của mình. Nếu một file export đc tạo bởi 1 user normal thì mọi user khác đều có thể import dữ liệu vào schema của mình nếu có file đó trong tay. Tuy nhiên nếu một file export bởi một dba thì chỉ có một dba khác mới có quyền import vào CSDL, hay nói các khác thì phải có quyền IMP_FULL_DATABASE để import từ file tạo bởi 1 dba. www.themegallery.com IMP_FULL_DATABASE www.themegallery.com IMP_FULL_DATABASE www.themegallery.com IMP_FULL_DATABASE www.themegallery.com IMP_FULL_DATABASE www.themegallery.com GATHER_SYSTEM_STATISTICS Connect test0/p123; Select * from SYS.AUX_STATS$; --Delete from SYS.AUX_STATS$ where PVAL2 = 'COMPLETED‘; --Update SYS.AUX_STATS$ set PVAL2= '‘ where PVAL2 = 'COMPLETED‘; www.themegallery.com GATHER_SYSTEM_STATISTICS Connect test4/p123; Select * from SYS.AUX_STATS$; Update SYS.AUX_STATS$ set PVAL2= ‘’ where PVAL2 = 'COMPLETED‘; Select * from SYS.AUX_STATS$; Update SYS.AUX_STATS$ set PVAL2= ‘COMPLETED’ where PNAME = ‘STATUS‘; Select * from SYS.AUX_STATS$; www.themegallery.com Click to edit subtitle style

Các file đính kèm theo tài liệu này:

  • pptoracle_role_demo_7953.ppt