日期:2014-05-16  浏览次数:20638 次

Oracle11g鐢ㄦ埛鏉冮檺--绯荤粺鏉冮檺
鐢ㄦ埛鏉冮檺
1.鏉冮檺锛氭暟鎹簱涓墽琛屾煇绉嶆搷浣滅殑鏉冨姏锛屾槸棰勫厛瀹氫箟濂界殑锛屾墽琛屾煇绉峉QL璇彞鎴栬闂叾浠栫敤鎴锋ā寮忓璞$殑鑳藉姏銆?
  鍒涘缓涓€涓敤鎴凤紝琛ㄧず璇ョ敤鎴峰叿鏈変簡杩炴帴鍜屾搷浣滄暟鎹簱鐨勮祫鏍硷紝浣嗘槸瑕佸鏁版嵁搴撹繘琛屽疄闄呮搷浣滐紝鍒欒鐢ㄦ埛杩橀渶瑕佸叿鏈夌浉搴旂殑鎿嶄綔鏉冮檺銆?
  鏉冮檺鐨勫垎绫?鎸夌収绯荤粺绠$悊鏂瑰紡鐨勪笉鍚岋紝鏉冮檺鍒嗕负涓ょ被:绯荤粺鏉冮檺鍜屽璞℃潈闄?

绯荤粺鏉冮檺: 鍦ㄧ郴缁熺骇鎺у埗鏁版嵁搴撶殑瀛樺彇鍜屼娇鐢ㄦ満鍒躲€傜郴缁熺骇鎺у埗鍐冲畾鏄惁鍙互杩炴帴鍒版暟鎹簱锛屽湪鏁版嵁搴撲腑鍙互杩涜鍝簺鎿嶄綔绛夈€?
濡傦細鍒涘缓浼氳瘽锛屽垱寤鸿〃锛屽垱寤鸿鍥惧拰鍒涘缓鐢ㄦ埛绛夈€侱BA鍦ㄥ垱寤轰竴涓敤鎴锋椂锛屽彲浠ュ皢鍏朵腑鐨勪竴浜涙潈闄愭巿浜堢敤鎴枫€?
    绯荤粺鏉冮檺鏄拡瀵圭敤鎴锋潵璁剧疆鐨勶紝鐢ㄦ埛蹇呴』琚巿浜堢浉搴旂殑绯荤粺鏉冮檺锛屾墠鍙互杩炴帴鍒版暟鎹簱涓繘琛岀浉搴旂殑鎿嶄綔銆?
    鍦∣racle鏁版嵁搴撲腑锛岀敤鎴穝ystem鍜宻ys 閮芥槸鏁版嵁搴撶鐞嗗憳锛屽叿鏈塂BA鎵€鏈夌郴缁熸潈闄愶紝鍖呮嫭select any dictionary鏉冮檺銆傛墍浠ystem鍜宻ys鍙互鏌ヨ鏁版嵁瀛楀吀涓互DBA_寮€澶寸殑鏁版嵁瀛楀吀銆?/pre>
绯荤粺鏉冮檺閮ㄥ垎濡備笅锛?
	create session 杩炴帴鏁版嵁搴?
	create tablespace 鍒涘缓琛ㄧ┖闂?
	alter tablespace 淇敼琛ㄧ┖闂?
	drop tablespace	鍒犻櫎琛ㄧ┖闂?
	create user	鍒涘缓鐢ㄦ埛
	drop user	鍒犻櫎鐢ㄦ埛
	create table 鍒涘缓琛?
	create any table 鍦ㄤ换浣曠敤鎴锋ā寮忎腑鍒涘缓琛?
	drop any table	鍒犻櫎浠讳綍鐢ㄦ埛妯″紡涓殑琛?

	alter any table 淇敼浠讳綍鐢ㄦ埛妯″紡涓殑琛?
	select any table 鏌ヨ浠讳綍鐢ㄦ埛妯″紡涓殑鍩烘湰琛ㄨ褰?
	insert any table 鍚戜换浣曠敤鎴锋ā寮忎腑鐨勮〃鎻掑叆璁板綍
	update any table 淇敼浠讳綍鐢ㄦ埛妯″紡涓殑琛?
	delete any table 鍒犻櫎浠讳綍鐢ㄦ埛妯″紡涓〃

	create view 鍒涘缓瑙嗗浘
	create any view 鍦ㄤ换浣曠敤鎴锋ā寮忎腑鍒涘缓瑙嗗浘
	drop any view 鍒犻櫎浠讳綍鐢ㄦ埛妯″紡涓殑瑙嗗浘
	
	create role 鍒涘缓瑙掕壊
	alterany role 淇敼浠讳綍瑙掕壊
	grant any role 灏嗕换浣曡鑹叉巿浜堝叾浠栫敤鎴?

	alter database 淇敼鏁版嵁搴撶粨鏋?
	create procedure 鍒涘缓瀛樺偍杩囩▼
	create any procedure 鍦ㄤ换浣曠敤鎴锋ā寮忎腑鍒涘缓瀛樺偍杩囩▼
	alter any procedure  淇敼浠讳綍鐢ㄦ埛妯″紡涓殑瀛樺偍杩囩▼
	drop any procedure 鍒犻櫎浠讳綍鐢ㄦ埛妯″紡涓殑瀛樺偍杩囩▼

	create profile  鍒涘缓閰嶇疆鏂囦欢
	alter profile 淇敼璇ラ厤缃枃浠?
	drop profile 鍒犻櫎閰嶇疆鏂囦欢

b. 鍚戠敤鎴锋巿浜堢郴缁熸潈闄?浣跨敤grant璇彞)
grant system_privilege [,...] to
{user_name [,...]|role_name [,...]|public}
[with admin option];
1> system_privilege琛ㄧず绯荤粺鏉冮檺锛屽create table銆備腑闂寸敤閫楀彿鍒嗗紑
2> user_name 琚巿浜堟潈闄愮殑鐢ㄦ埛锛屽彲浠ユ槸澶氫釜鐢ㄦ埛;
3> role_name 涔熷彲浠ュ皢绯荤粺鏉冮檺鎺堜簣鏌愪簺瑙掕壊
4> public 琛ㄧずOracle绯荤粺鎵€鏈夌敤鎴?
5> with admin option 濡傛灉鎸囧畾锛屽垯琚巿浜堟潈闄愮殑鐢ㄦ埛鍙互灏嗚鏉冮檺鍐嶆巿浜堝叾浠栫敤鎴枫€?

c. 鏌ヨ鐢ㄦ埛鎵€鍏锋湁鐨勭郴缁熸潈闄?
   鍙互閫氳繃瑙嗗浘user_sys_privs鏉ヤ簡瑙c€?
1> username 褰撳墠鐢ㄦ埛鐨勭敤鎴峰悕
2> privilege 褰撳墠涔熼毦鎬箮鎷ユ湁鐨勭郴缁熸潈闄?
3> admin_option 褰撳墠鐢ㄦ埛鏄惁鏈夋潈鍔涘皢璇ユ潈闄愭巿浜堝叾浠栫敤鎴枫€?

grant dba to user_name;