oracle 10g em¡¢isqlplus·ÃÎʲ»Á˵ÄÎÊÌâ½â¾ö£¨»ã±à£©
Èç¹ûweb·½Ê½µÄem£¬isqlplus·ÃÎʲ»ÁË¡£
1. ¼ì²éÖ÷»úÃû/IP¡¢¶Ë¿ÚÊÇ·ñÕýÈ·
°²×°Ê±µÄÖ÷»úÃû/IP¡¢¶Ë¿Ú¼Ç¼ÔÚ$ORACLE_HOME/install/portlist.ini ÎļþÖС£
ȱʡÊÇ£º
Ò»°ãÓû§ http://ip:5560/isqlplus
DBAÓû§ http://ip:5560/isqlplus/dba
EM Database Control http://ip:1158/em/
2. ¿´em, isqlplus·þÎñÊÇ·ñÆðÆô¶¯£¬×´Ì¬ÊÇ·ñÕý³£
µ±È»Oracle°²×°Ê±£¬ÒªÑ¡Ôñ°²×°ÁË“Oracle Enterprise ManagerÅäÖÃÊý¾Ý¿â”
ÆäËüÎÊÌ⣺
3. »»ÁËipÐèÒªÖؽ¨em£¬ÒÔÏÂÊÇemµÄÏà¹ØÃüÁî:
´´½¨Ò»¸öEM×ÊÁÏ¿â
emca -repos create
Öؽ¨Ò»¸öEM×ÊÁÏ¿â
emca -repos recreate
ɾ³ýÒ»¸öEM×ÊÁÏ¿â
emca -repos drop
ÅäÖÃÊý¾Ý¿âµÄ Database Control
emca -config dbcontrol db
ɾ³ýÊý¾Ý¿âµÄ Database ControlÅäÖÃ
emca -deconfig dbcontrol db
ÖØÐÂÅäÖÃdb controlµÄ¶Ë¿Ú£¬Ä¬È϶˿ÚÔÚ1158
emca -reconfig ports
emca -reconfig ports -dbcontrol_http_port 1160
emca -reconfig ports -agent_port 3940
ÏÈÉèÖÃORACLE_SID»·¾³±äÁ¿ºó,Æô¶¯EM console·þÎñ
emctl start dbconsole
ÏÈÉèÖÃORACLE_SID»·¾³±äÁ¿ºó,Í£Ö¹EM console·þÎñ
emctl stop dbconsole
ÏÈÉèÖÃORACLE_SID»·¾³±äÁ¿ºó,²é¿´EM console·þÎñµÄ״̬
emctl status dbconsole
ÅäÖÃdbconsoleµÄ²½Öè
emca -repos create
emca -config dbcontrol db
emctl start dbconsole
ÖØÐÂÅäÖÃdbconsoleµÄ²½Öè
emca -repos drop
emca -repos create
emca -config dbcontrol db
emctl start dbconsole
PS1:
Oracle10GµÄEM²ÉÓÃÁËweb·½Ê½£¬²¢ÇÒ·Ö³ÉÁË2¸ö²úÆ·£¬database controlºÍgrid control¡£Grid controlÐèÒªÏÂÔص¥¶ÀµÄ¹âÅÌ°²×°¡£ÔÚÓÃDBCA½¨¿âµÄʱºò£¬¿ÉÒÔÑ¡ÔñÊÇ·ñÆôÓÃdbcontrol£¬ÆôÓõĻ°ÐèÒªÔÚÊý¾Ý¿âÖн¨Á¢Ò»¸ösysmanµÄschema£¬ÓÃÓÚ±£´æEMµÄһЩÊý¾Ý£¬Õâ¸ö¾ÍÊÇEMµÄ×ÊÁÏ¿â(repository)¡£Ê¹ÓÃÃüÁîÐй¤¾ßemca¿ÉÒÔ´´½¨£¬Ð޸ģ¬Öؽ¨»òÕßɾ³ýdbcontrolµÄÅäÖá£
ÓÉÓÚÒªÔÚÊý¾Ý¿âÖн¨EM×ÊÁϿ⣬Êý¾Ý¿âºÍ¼àÌý¶¼±ØÐëÒѾÆô¶¯²¢Õý³£¹¤×÷¡£
emca -repos create ´´½¨Ò»¸öEM×ÊÁÏ¿â
emca -repos recreate Öؽ¨Ò»¸öEM×ÊÁÏ¿â
emca -repos drop ɾ³ýÒ»¸öEM×ÊÁÏ¿â
emca -
Ïà¹ØÎĵµ£º
CASE±í´ïʽ¿ÉÒÔÔÚSQLÖÐʵÏÖif-then-elseÐ͵ÄÂß¼£¬¶ø²»±ØʹÓÃPL/SQL¡£CASEµÄ¹¤×÷·½Ê½ÓëDECODE()ÀàËÆ£¬µ«Ó¦¸ÃʹÓÃCASE,ÒòΪËüÓëANSI¼æÈÝ¡£
CASEÓÐÁ½ÖÖ±í´ïʽ:
1. ¼òµ¥CASE±í´ïʽ,ʹÓñí´ïʽȷ¶¨·µ»ØÖµ.
Óï·¨:
CASE search_expression
WHEN expression1 THEN result1
WHEN expression2 THEN ......
NULLÖ¸µÄÊÇ¿ÕÖµ£¬»òÕß·Ç·¨Öµ¡£
NVL (expr1, expr2)->expr1ΪNULL£¬·µ»Øexpr2£»²»ÎªNULL£¬·µ»Øexpr1¡£×¢ÒâÁ½ÕßµÄÀàÐÍÒªÒ»ÖÂ
NVL2 (expr1, expr2, expr3) ->expr1²»ÎªNULL£¬·µ»Øexpr2£»ÎªNULL£¬·µ»Øexpr3¡£expr2ºÍexpr3ÀàÐͲ»Í¬µÄ»°£¬expr3»áת»»Îªexpr2µÄÀàÐÍ
NULLIF (expr1, expr2) ->ÏàµÈ·µ»ØNULL£¬²»µÈ·µ»Øex ......
ÏÞÖÆË÷ÒýÊÇһЩûÓоÑéµÄ¿ª·¢ÈËÔ±¾³£·¸µÄ´íÎóÖ®Ò»¡£ÔÚSQLÖÐÓкܶàÏÝÚå»áʹһЩË÷ÒýÎÞ·¨Ê¹Óá£ÏÂÃæÌÖÂÛһЩ³£¼ûµÄÎÊÌ⣺
1 ʹÓò»µÈÓÚ²Ù×÷·û(<>¡¢!=)
ÏÂÃæµÄ²éѯ¼´Ê¹ÔÚcust_ratingÁÐÓÐÒ»¸öË÷Òý£¬²éѯÓï¾äÈÔȻִÐÐÒ»´ÎÈ«±íɨÃè¡£
  ......
Ò»¡¢Ð½¨databack.shÎļþ£¬´æ·ÅĿ¼/opt/databack/
#Êý¾Ý¿âÓû§×ÊÁÏ
USERNAME=Êý¾Ý¿âÓû§Ãû(ÐÅÏ¢Òþ²Ø)
PASSWORD=Êý¾Ý¿âÃÜÂë(ÐÅÏ¢Òþ²Ø)
#FTP·þÎñÆ÷ÐÅÏ¢
FTP_SERV=FTP·þÎñÆ÷(ÐÅÏ¢Òþ²Ø)
FTP_USER=FTPÓû§Ãû(ÐÅÏ¢Òþ²Ø)
FTP_PASS=FTPÃÜÂë(ÐÅÏ¢Òþ²Ø)
FTP_DIR=FTPĿ¼(ÐÅÏ¢Òþ²Ø)
#±¸·ÝĿ¼
BACKUP_DIR=/opt/databack
#¸ ......