Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracle grant

oracle grant
ÊÚȨÓï¾ä--select * from dba_users; ²éѯÊý¾Ý¿âÖеÄËùÓÐÓû§
--alter user TEST_SELECT account lock; ËøסÓû§
--alter user TEST_SELECT account unlock; ¸øÓû§½âËø
--create user xujin identified by   xujin; ½¨Á¢Óû§
--grant create tablespace to xujin; ÊÚȨ
--grant select on tabel1 to xujin; ÊÚȨ²éѯ
--grant update on table1 to xujin;
--grant execute on procedure1 to xujin ÊÚȨ´æ´¢¹ý³Ì
--grant update on table1 to xujin with grant option; ÊÚȨ¸üÐÂȨÏÞתÒƸøxujinÓû§£¬Ðí½øÓû§¿ÉÒÔ¼ÌÐøÊÚȨ£»
--ÊÕ»ØȨÏÞ
--revoke select on table1 from xujin1; Êջزéѯselect±íµÄȨÏÞ£»
--revoke all on table1 from xujin;
/*grant connect to xujin;
revoke connect from xujin
grant select on xezf.cfg_alarm to xujin;
revoke select on xezf.cfg_alarm from xujin;*/
--select table_name,privilege from dba_tab_privs where grantee='xujin' ²éѯһ¸öÓû§ÓµÓеĶÔÏóȨÏÞ
--select * from dba_sys_privs where grantee='xujin' ²éѯһ¸öÓû§ÓµÓеÄϵͳȨÏÞ
--select * from session_privs --µ±Ç®»á»°ÓÐЧµÄϵͳȨÏÞ
--½ÇÉ«
--create role xujin1;--½¨Á¢xujin1½ÇÉ«
--grant insert on xezf.cfg_alarm to xujin1; ½«²åÈë±íµÄÐÅÏ¢
--revoke insert on xezf.cfg_alarm from xujin1; ÊÕ»Øxujin1½ÇÉ«µÄȨÏÞ
--grant xujin1 to xujin ; ½«½ÇÉ«µÄȨÏÞÊÚȨ¸øxujin;
-- create role xujin2;
--grant xujin1 to xujin2; ½«½ÇÉ«xujin1ÊÚȨ¸øxujin2;
--alter user xujin default xujin1,xujin2; ÐÞ¸ÄÓû§Ä¬ÈϽÇÉ«
-- DROP ROLE xujin1;ɾ³ý½ÇÉ«1£»
--select * from role_sys_privs where role=xujin1;
--²é¿´Ðí½ø1½ÇÉ«ÏÂÓÐʲôϵͳȨÏÞ£»
--select granted_role,admin_option from role_role_privs where role='xujin2';
--²é¿´xujin1½ÇÉ«ÏÂÃæÓÐʲô½ÇɫȨÏÞ
--select * from role_sys_privs where role='xujin2';
--select table_name,privilege from role_tab_privs where role='xujin1';
--select * from dba_role_privs where grantee='xujin' --²é¿´Óû§ÏÂÃæÓжàÉÙ¸ö½ÇÉ«£»


Ïà¹ØÎĵµ£º

ORACLEÈÕÆÚʱ¼äº¯Êý´óÈ«

ORACLEÈÕÆÚʱ¼äº¯Êý´óÈ«
   TO_DATE¸ñʽ(ÒÔʱ¼ä:2007-11-02   13:45:25ΪÀý)
  
        Year:     
        yy two digits Á½Î»Äê         ......

ÈçºÎÐÞ¸Äoracle RAC VIPµØÖ·

      ÓÐʱºòÍøÂç·¢Éú±ä¶¯£¬±ØÐëÊÖ¶¯ÐÞ¸ÄÒ»ÏÂRAC VIPµØÖ·£¬²»½öÊǵØÖ·£¬Ò²¿ÉÒÔÐÞ¸ÄVIPËùÔÚµÄÍø¿¨£¬Ô­ÔòÊÇVIPµØÖ·ÒªºÍPUBµØÖ·ÔÚͬһ¸öÍø¶ÎÄÚ£¬·½·¨ÆäʵÊDZȽϼòµ¥µÄ£¬ÓÐÈËÎʵ½£¬ÎÒ¸øÒ»¸öʾÀýÈçÏ£º
1¡¢¹Ø±ÕÊý¾Ý¿â
srvctl stop database -d db
2¡¢¹Ø±ÕNOTEAPPA
srvctl stop nodeapps -n db2
à ......

SQL SEVERÓëORACLE µÄsqlÓï¾äÇø±ð

Êýѧº¯Êý£º
1.¾ø¶ÔÖµ
S:SELECT abs(-1) value
O:SELECT abs(-1) value from dual
2.È¡Õû(´ó)
S:SELECT ceiling(-1.001) value
O:SELECT ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:SELECT floor(-1.001) value
O:SELECT floor(-1.001) value from dual
4.È¡Õû£¨½ØÈ¡£©
S:SELECT cast(-1.002 as int) value
O ......

Ò»´Îoracle supportµÄΣ»úÏÖ³¡´¦Àí£¨Ö®¶þ£©

ÌìÓв»²â·çÔÆ£¬
IBM µÄÖж˴ÅÅÌÕóÁÐÕâ´ÎÓÖÈÇ»öÁË¡£ÔÚ΢ÂëÉý¼¶µÄʱºò£¬
DS4800 ·¢Éú¹ÊÕÏ¡£µ¼Öµ±Ê±ÔÚÕą̂¿âÉϵļ¸Ì×Éú²ú¿â±¨´íÁË¡£
IBM¹¤³Ìʦ°ÑÕóÁйÊÕϻָ´ºó£¬ÅÄÅÄƨ¹É×ßÈË£¬ÕóÁÐÉϵÄÊý¾ÝÓÖµÃÎÒÃÇÀ´Ïë°ì·¨ÇÀ¾ÈÁË¡£¡£¡£¡£
»¹ºÃÓÐoracle supportµÄÖ§³ÖÎÒÃÇ×îÖÕ»¯½âÁËÕâ´ÎΣ»ú¡£ÏÂÎÄÏêϸ½éÉÜÁËÕû¸ö»Ö¸´µÄ¹ý³Ì¡£
oracle¹¤ ......

oracle nvl decode

SELECT
DECODE(ÁÐ,0,'Q'1,'P',2,'O')¡¡AS ret
from dual
--·ÖÎö: µ± ÁÐ=0ʱ,½«"Q"¸³Öµ
--µ± ÁÐ =1ʱ,½«"P"¸³Öµ
--µ± ÁÐ=2ʱ,½«"O"¸³Öµ
--NVL()º¯Êý:
--NVL(ARG,VALUE)´ï±êÈç¹ûÇ°ÃæµÄARGֵΪNULLÄÇô·µ»ØµÄֵΪºóÃæµÄVALUE¶þÕß½áºÏʹÓÃ:
DECODE(NVL(±äÁ¿ ''),'','-','OK')
//·ÖÎö:
--Èô ±äÁ¿ ÊÇ·ñΪ¿Õ.ÈôΪ¿Õ¸³¸ø¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ