×ðÁú¿­Ê±¹ÙÍøµÇ¼

ʵ¼ùÖ¸ÄÏ£ºÔÚOracleÖÐʵÏÖ±í¼¶Ö»¶ÁȨÏÞ

ÔÚOracleÖÐʵÏÖ±í¼¶Ö»¶ÁȨÏÞÊÇÊý¾Ý¿âÖÎÀíÖг£¼ûÇÒÖ÷ÒªµÄ²Ù×÷¡£Í¨¹ýÉèÖÃÖ»¶ÁȨÏÞ £¬¿ÉÒÔÈ·±£²¿·ÖÓû§Ö»ÄÜÅÌÎʱíµÄÊý¾Ý £¬¶ø²»¿É¾ÙÐÐÐ޸IJÙ×÷ £¬´Ó¶øÓÐÓñ£»¤Êý¾ÝµÄÍêÕûÐÔºÍÇå¾²ÐÔ¡£ÏÂÃ潫ÏêϸÏÈÈÝÔÚOracleÖÐÔõÑùʵÏÖ±í¼¶Ö»¶ÁȨÏÞ £¬ÒÔ¼°ÏêϸµÄ´úÂëʾÀý¡£

°ì·¨Ò»£º½¨Éè±í

Ê×ÏÈ £¬ÔÚOracleÖн¨ÉèÒ»¸öʾÀý±í £¬ÓÃÓÚÑÝʾÔõÑùÉèÖÃ±í¼¶Ö»¶ÁȨÏÞ¡£¼ÙÉèÎÒÃǽ¨ÉèÁËÒ»¸öÃûΪ¡°example_table¡±µÄ±í £¬°üÀ¨Á½¸ö×ֶΣºidºÍname¡£

CREATE TABLE example_table (
    id INT PRIMARY KEY,
    name VARCHAR2(50)
);

INSERT INTO example_table (id, name) VALUES (1, 'Alice');
INSERT INTO example_table (id, name) VALUES (2, 'Bob');

µÇ¼ºó¸´ÖÆ

°ì·¨¶þ£º½¨ÉèÖ»¶Á½ÇÉ«

½ÓÏÂÀ´ £¬ÎÒÃÇÐèÒª½¨ÉèÒ»¸öÖ»¶Á½ÇÉ« £¬ÓÃÓÚ¸¶ÓëÓû§Ö»¶ÁȨÏÞ¡£Ö´ÐÐÒÔÏÂSQLÓï¾ä£º

CREATE ROLE read_only_role;

µÇ¼ºó¸´ÖÆ

°ì·¨Èý£º¸¶Óë±í¼¶Ö»¶ÁȨÏÞ

½«Ö»¶ÁȨÏÞ¸¶Óë¸Õ½¨ÉèµÄÖ»¶Á½ÇÉ« £¬ÒÔÏÞÖƶԡ°example_table¡±±íµÄÐ޸IJÙ×÷¡£

GRANT SELECT ON example_table TO read_only_role;

µÇ¼ºó¸´ÖÆ

°ì·¨ËÄ£º½¨ÉèÖ»¶ÁÓû§

½¨ÉèÒ»¸öÖ»¶ÁÓû§ £¬²¢½«Ö®Ç°½¨ÉèµÄÖ»¶Á½ÇÉ«¸¶Óë¸ÃÓû§¡£

CREATE USER read_only_user IDENTIFIED BY password;
GRANT read_only_role TO read_only_user;

µÇ¼ºó¸´ÖÆ

°ì·¨Î壺Ñé֤ȨÏÞÉèÖÃ

×îºó £¬Ê¹ÓÃÖ»¶ÁÓû§µÇ¼OracleÊý¾Ý¿â £¬²¢ÊµÑé¶Ô¡°example_table¡±±í¾ÙÐÐÐ޸IJÙ×÷ £¬Èç²åÈë¡¢¸üлòɾ³ýÊý¾Ý¡£¿ÉÒÔ¿´µ½Ö»¶ÁÓû§ÎÞ·¨Ö´ÐÐÕâЩ²Ù×÷ £¬Ö»ÄܾÙÐÐÅÌÎʲÙ×÷¡£

×ܽá

ͨ¹ýÒÔÉÏ°ì·¨ £¬ÎÒÃÇÀÖ³ÉʵÏÖÁËÔÚOracleÖÐÉèÖÃ±í¼¶Ö»¶ÁȨÏ޵IJÙ×÷¡£Í¨¹ý½¨ÉèÖ»¶Á½ÇÉ« £¬½«Ö»¶ÁȨÏÞ¸¶ÓëÌض¨±í £¬ÔÙ½«Ö»¶Á½ÇÉ«¸¶ÓëÓû§ £¬¾Í¿ÉÒÔÓÐÓÃÏÞÖÆÓû§¶Ô±íµÄ²Ù×÷ £¬°ü¹ÜÊý¾ÝµÄÇå¾²ÐÔºÍÍêÕûÐÔ¡£ÔÚÏÖʵӦÓÃÖÐ £¬Æ¾Ö¤ÏêϸÐèÇó¿ÉÒÔÎÞаµ÷½âȨÏÞÉèÖà £¬È·±£Êý¾ÝµÄÇå¾²¡£

Ï£ÍûÒÔÉÏʵ¼ùÖ¸ÄϺʹúÂëʾÀýÄܹ»×ÊÖúÄú¸üºÃµØÃ÷È·ÔÚOracleÖÐʵÏÖ±í¼¶Ö»¶ÁȨÏÞµÄÒªÁì £¬²¢Äܹ»ÀÖ³ÉÓ¦ÓÃÓÚÄúµÄÊý¾Ý¿âÖÎÀíÊÂÇéÖС£×£Äú˳Ë죡

ÒÔÉϾÍÊÇʵ¼ùÖ¸ÄÏ£ºÔÚOracleÖÐʵÏÖ±í¼¶Ö»¶ÁȨÏÞµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ