Oracle 10g ÒªµãÕûÀí Ö® ¹ÜÀí°²È«ÐÔ
¹ÜÀí°²È«ÐÔ
1 Oracle±êʾ·û
¢Ù²»ÊDZ£Áô×Ö
¢Ú1~30¸ö×Ö·û
¢ÛÖ»ÄÜÊÇ×ÖĸºÍ#¡¢$¡¢_
¢Ü²»Äܰüº¬µ¥ÒýºÅºÍË«ÒýºÅ
2 Óû§
ÔÚOracleÖУ¬Êý¾Ý¿âÓû§ºÍģʽÊǰ²È«µÄ×î»ù±¾µ¥Ôª¡£
£¨1£©Óû§ºÍģʽ
Êý¾Ý¿âģʽ¶¨ÒåΪÊý¾Ý¿â¶ÔÏóµÄ¼¯ºÏ£¬¶øÄ£Ê½µÄÃû³Æ¾ÍÊÇÓµÓлò¿ØÖÆÕâЩÊý¾Ý¿â¶ÔÏ󼯺ϵÄÓû§Ãû³Æ¡£
£¨2£©½¨Á¢Óû§
ÒÔÊý¾Ý¿â¹ÜÀíÔ±ÕË»§µÇ¼¡£
Create user Óû§Ãû indentified by ÃÜÂë¡£
ÊÚȨ£ºgrant ȨÏÞÃû to Óû§Ãû£»
Create session£ºÏµÍ³È¨ÏÞ£¬¿ÉÒÔΪÓû§ÌṩÁ¬½ÓÊý¾Ý¿âµÄÄÜÁ¦¡£
£¨3£©ÐÞ¸ÄÓû§
¢ÙÖØÖÃÃÜÂë
ÈκÎÓû§¶¼ÓÐÄÜÁ¦ÐÞ¸Ä×Ô¼ºµÄÃÜÂ룬Êý¾Ý¿â¹ÜÀíÔ±ÓÐÄÜÁ¦ÖØÖÃÆäËûÕË»§µÄÃÜÂë¡£
Alter user Óû§Ãû identified by ÐÂÃÜÂ룻
¢ÚËø¶¨/½âËøÕË»§
Alter user Óû§Ãû account [lock|unlock]
¢ÛÐ޸ıí¿Õ¼ä
Alter user Óû§Ãû default tablespace ±í¿Õ¼ä temporary tablespace ÁÙʱ±í¿Õ¼ä
¢ÜÐ޸ıí¿Õ¼äÅä¶î
Alter user Óû§Ãû default tablespace ±í¿Õ¼ä quota Åä¶î on ±í¿Õ¼ä
£¨4£©É¾³ýÓû§
Drop user Óû§Ãû [cascade]£»
Èç¹û²»¼ÓºóÃæµÄ²ÎÊý£¬ÄÇôÈç¹ûÓû§ÓµÓжÔÏó£¬ÄÇôɾ³ý½«Ê§°Ü¡£
Èç¹ûʹÓúóÃæµÄ²ÎÊý£¬ÄÇô½«É¾³ý¸ÃÓû§ÒÔ¼°¸ÃÓû§µÄËùÓÐÓû§¶ÔÏ󣬻¹É¾³ýÆäËûÓû§Ä£Ê½ÖжÔÒÑɾ³ý¶ÔÏó±í½øÐÐÒýÓõÄÔ¼Êø¡£
3 ϵͳȨÏÞ
£¨1£©ÔÚOracleÊý¾Ý¿âÖУ¬ÓÐ2ÀàȨÏÞ£¬¼´¶ÔÏóȨÏÞºÍϵͳȨÏÞ¡£
¶ÔÏóȨÏÞÊÇÓÉÓû§¸³ÓèµÄ·ÃÎÊ»ò²Ù×÷Êý¾Ý¿â¶ÔÏóµÄȨÏÞ¡£
ϵͳȨÏÞÊÇÓÃÀ´Ðí¿É¶Ô¸÷ÖÖÌØÐԵķÃÎÊ¡£
ΪÁ˲鿴Óû§µÄOracleÊý¾Ý¿âÖпÉÒÔʹÓõĶÀÌØÏµÍ³È¨ÏÞ¼¯ºÏ£¬¿ÉÒԲ鿴dba_sys_privsÊÓͼ¡£
£¨2£©³£ÓÃϵͳȨÏÞ
Á¬½Óµ½Êý¾Ý¿âÉÏ£º create session
´´½¨±í£º create table
ÔÚÈκÎģʽÖд´½¨±í£ºcreate any table
ɾ³ý±í£º drop table
ɾ³ýÈκÎģʽÖÐµÄ±í£ºdrop any table
´´½¨Óû§£º create user
Ïà¹ØÎĵµ£º
ÎÒ½ñÌìѧϰÁËOracle Êý¾Ý¿âµÄÅäÖü°¹ÜÀí£º
1 Oracle Êý¾Ý¿âÌåϵ½á¹¹¼ò½é
1.1 ƽ³£Ëù˵µÄ Oracle »ò Oracle Êý¾Ý¿âÖ¸µÄÊÇ Oracle Êý¾Ý¿â¹ÜÀíϵͳ. Oracle Êý¾Ý¿â¹ÜÀíϵͳÊǹÜÀíÊý¾Ý¿â·ÃÎʵļÆËã»úÈí¼ ......
Ó¦ÓÃϵͳ²»ÄÜÔËÐУ¬¸æ¾¯ÈÕÖ¾±¨¸æÁÙʱ±í¿Õ¼ä²»ÄÜÀ©Õ¹£¬¹À¼ÆÊÇÒµÎñsql´æÔÚ´óÁ¿ÅÅÐò£¬Ö»ÄÜÔö¼ÓÁÙʱ±í¿Õ¼ä»º½âÕâ¸öÎÊÌâ¡£
ÁíÍ⻹¿ÉÄÜÒªÇåÀíÁÙʱ¶ÎÖØÕûÁÙʱ±í¿Õ¼äÊͷſռ䣺
²é¿´Ò»ÏÂÈÏËÔÚÓÃÁÙʱ¶Î£º
SQL> SELECT /*+ rule */ se.username,se.sid,se.serial#,se.sql_address,se.machine,se.program,
su.tablespace,su.se ......
ÔÚJ2EEÓ¦ÓóÌÐò¿ª·¢ÖУ¬Ó¦ÓóÌÐòÓëÊý¾Ý¿âÁ¬½ÓµÄ½¨Á¢ÊÇÎÒÃǾ³£Óöµ½µÄÎÊÌâÖ®Ò»¡£ÔÚÕâÀïÎÒÖ÷Ҫ̸̸ÔÚ±¾µØÓ¦ÓóÌÐòÖÐͨ¹ýOCI·½Ê½¡¢thin·½Ê½ºÍJdbcOdbcÇÅ·½Ê½Á¬½ÓOracleÊý¾Ý¿â£¬ÔÚiPlanet Application Server 6.5ºÍSun ONE Application Server 7ÖжÔOracleÊý¾Ý¿âÁ¬½Ó³ØµÄÅäÖÃÒÔ¼°Ó¦ÓÃÖÐÈçºÎ´ÓÁ¬½Ó³ØÖлñµÃÁ¬½Ó¡£
Ò»¡¢±¾µØÍ¨¹ýJ ......
1Á¬½ÓÊý¾Ý¿âʵÀý
£¨1£©Óû§½ø³Ì£ºÈí¼þ£¬SQL*Plus£¬Ê¹ÓÃOracle Net Services£¨ÍøÂç·þÎñ£©ÓëÊý¾Ý¿âͨѶ
£¨2£©Oracle¼àÌýÆ÷£ºlistener.ora£¬¶¨ÒåÁËÊý¾Ý¿âʵÀýÃû£¬Â·¾¶£¬¿ÉÒÔʹÓõÄÐÒ飬¶Ë¿Ú
£¨3£©OracleÍøÂç¿Í»§£ºtnsnames.ora£¬¶¨ÒåÁËͨѶÐÒ飬¶Ë¿Ú£¬·þÎñÆ÷µØÖ·
2 ·þÎñÆ÷½ø³Ì
¸ºÔðÓû§½ø³ÌºÍOracleʵÀý ......
¹ÜÀí±í
±íÊÇÕæÕý´æ´¢ÐÅÏ¢µÄ¶ÔÏó¡£
1 Êý¾ÝÀàÐÍ
£¨1£©ÊýÖµÀàÐÍ£ºÓÃÓÚ´æ´¢ÕûÊý¡¢¸¡µãÊý¡¢ÊµÊý¡£
number£¨¾«¶È£¬·¶Î§£©¾«¶ÈÊÇÖ¸Êý×Ö¸öÊý×ܺͣ¬·¶Î§ÊÇָСÊýµãÓұߵÄλÊý¡£
£¨2£©×Ö·ûÀàÐÍ£ºÉùÃ÷°üº¬ÁË×Öĸ¡¢Êý×ÖÊý¾ÝµÄÁС£
char£º´æ´¢¹Ì¶¨³¤¶È×Ö·û´®
&n ......