Oracle²Ù×÷ϵͳÈÏÖ¤
ĬÈÏÇé¿öÏ£¬ÔÚOracleµÄÖ÷»úÉÏ£¨linuxϵͳ£©µÄOracle²Ù×÷ϵͳÓû§Ï£¬ÒÔsysÓû§µÇ½Êý¾Ý¿âʱ¿ÉÒÔ²»ÓÃÊäÈëÃÜÂëÖ±½ÓµÇ¼¡£Êµ¼ÊÉÏ£¬Ö»ÒªÊÇÊôÓÚdba×飨linux£©»òosdba×飨windows£©Ï£¬¶¼¿ÉÒÔ²»ÓÃÃÜÂë½øÐеǼ¡£ÕâÊÇÈÏÖ¤·½Ê½³ÆΪOSÈÏÖ¤¡£
ÕâÖֵǼ·½Ê½µÄ¿ØÖÆ£¬ÊÇͨ¹ý$ORACLE_HOME/network/admin/sqlnet.oraÖеģº
SQLNET.AUTHENTICATION_SERVICES
²ÎÊýÀ´¿ØÖƵġ£ÓÐÈý¸öÖµ¿ÉÈ¡£º
1¡¢NTS¡£Õâ¸ö²ÎÊýÊÇÖ÷»ú²Ù×÷ϵͳÊÇwindowsµÄʱºòרÓõġ£µ±ÔÚwindowsÉÏÉèÖøòÎ
Êýºó£¬¼´¿É½øÐÐOSÈÏÖ¤¡£ÐèҪעÒâµÄÊÇ£¬¸Ã²ÎÊýÊÇwindowsרÓõġ£Èç¹ûoracleÊÇ
×°ÔÚunixÀàϵͳÉÏ£¬OSÈÏÖ¤¶¼»áʧ°ÜµÄ¡£
2¡¢NONE¡£±íʾ²»×ö²Ù×÷ϵͳÈÏÖ¤£¬¼´ÒªÇóÊäÈëÃÜÂë¡£
3¡¢ALL¡£¼´ËùÓÐÈÏÖ¤·½Ê½¶¼¿ÉÒÔ¡£
ËùÒÔÒªÔÚÖ÷»úÉϽøÐÐosÈÏÖ¤Ö±½ÓµÇ¼sys as sysdba£¬Ö»ÒªÉ趨ΪALL»òÕß²»É趨¸Ã²ÎÊý£¨
¼´×¢Ê͵ô¸ÃÐУ©¾ÍÐÐÁË¡£
Èç¹ûÒª½ûÖ¹OSÈÏÖ¤£¬ÔòÖ»ÒªÉèÖÃΪNONE¼´¿É¡£
ÌâÍâ»°£º
¹ØÓÚOSÈÏÖ¤µÄ£¬Æäʵһ¿ªÊ¼Óëremote_login_passwordfile»ìÏýÆðÀ´ÁË¡£
1¡¢OSÈÏÖ¤ÊÇÖ¸Ö÷»úÉÏ°²×°OracleµÄÓû§µÄ¹ÜÀíÔ±µÇ¼ÈÏÖ¤·½Ê½¡£
2¡¢µ±Õâ¸ö¹ÜÀíÔ±³¢ÊÔͨ¹ýÍøÂçÀ´µÇ¼Oracle DBʱ£¬½«»áʧ°Ü¡££¨ÒÔÍøÂ緽ʽµÇ¼Êý¾Ý¿â£¬¼´Ê¹Í¨¹ý½«·Ç³£²»°²È«µÄ²ÎÊýremote_os_authentÉèÖÃΪtrue£¬²Ù×÷ϵͳÈÏÖ¤Ò²²»»áÉúЧ¡££©
ÒªÔÊÐíÔ¶³Ì¹ÜÀíÔ±sysµÇ¼Êý¾Ý¿â£¬ÔòÒªÇóÉèÖÃ
remote_login_passwordfile = exclusive
È»ºó´´½¨passowrd file£º
orapwd file=orapw$ORACLE_SID passwd=passwd entries=10 force=y
ÐèҪעÒâµÄÊÇÕâÀïµÄpassword fileÎļþÃüÃûÐèÒª·ûºÏÌض¨µÄÕâ¸ö¸ñʽ£¬Èç¹ûÃüÃû²»¶Ô£¬ÏµÍ³½«»áÕÒ²»µ½Õâ¸öÃÜÂëÎļþ£¬¶ø²úÉú£º
08:38:36 idle> grant sysdba to sys;
grant sysdba to sys
*
ERROR at line 1:
ORA-01994: GRANT failed: password file missing or disabled
ÉÏÃæÕâ¸ö´íÎó¡£Ò²¾Íµ¼ÖÂÁËsysdba»òÕß¹ÜÀíÔ±Óû§²»ÄÜÔ¶³ÌµÇ¼Êý¾Ý¿â¡£
Òª¼ì²éÊÇ·ñÒѾ½«sysÓû§·ÅÈëÃÜÂëÎļþ£¬¿ÉÒÔ²éѯ£º
08:49:04 idle> select * from v$pwfile_users;
USERNAME SYSDBA SYSOPER
--------------- --------------- -------------------
SYS TRUE &
Ïà¹ØÎĵµ£º
ORACLEÈçºÎÍ£Ö¹Ò»¸öJOB
1 Ïà¹Ø±í¡¢ÊÓͼ
2 ÎÊÌâÃèÊö
Ϊͬʽâ¾öÒ»¸öÒòΪÍøÂçÁ¬½ÓÇé¿ö²»¼Ñʱ£¬Ö´ÐÐÒ»¸ö³¬³¤Ê±¼äµÄSQL²åÈë²Ù×÷¡£
¼ÈÈ»ÍøÂç×´¿ö²»ºÃ£¬¾ÍÑ¡ÔñÁËʹÓÃÒ»´ÎÐÔʹÓÃJOBÀ´Íê³É¸Ã²åÈë²Ù×÷¡£ÔÚJOBÖ´ÐÐÒ»¶Îʱ¼äºó£¬ÎÒ·¢ÏÖ±»²åÈë±íÓÐЩÎÊÌ⣨²ÑÀ¢£¬µ±Ê±Ò²Ã»ÓÐÏȼì²é¼ì²é¾Í×öÁË£©¡£×¼±¸Í£Ö¹JOB£¬ÒòΪÔÚJOBÔËÐÐÇé¿öÏ£¬ÎÒ ......
¹ØÓÚOracleµÄsession
1.ÈçºÎ²é¿´session¼¶µÄµÈ´ýʼþ£¿
µ±ÎÒÃǶÔÊý¾Ý¿âµÄÐÔÄܽøÐе÷Õûʱ£¬Ò»¸ö×îÖØÒªµÄ²Î¿¼Ö¸±ê¾ÍÊÇϵͳµÈ´ýʼþ¡£$system_event,v$session_event,v$session_waitÕâÈý¸öÊÓͼÀï¼Ç¼µÄ¾ÍÊÇϵͳ¼¶ºÍsession¼¶µÄµÈ´ýʼþ£¬Í¨¹ý²éѯÕâЩÊÓͼÄã¿ÉÒÔ·¢ÏÖÊý¾Ý¿âµÄһЩ²Ù×÷µ½µ×ÔÚµÈ ......
ORACLE³£ÓÃÃüÁî
Ò»¡¢ORACLEµÄÆô¶¯ºÍ¹Ø±Õ
1¡¢ÔÚµ¥»ú»·¾³ÏÂ
ÒªÏëÆô¶¯»ò¹Ø±ÕORACLEϵͳ±ØÐëÊ×ÏÈÇл»µ½ORACLEÓû§£¬ÈçÏÂ
su - oracle
a¡¢Æô¶¯ORACLEϵͳ
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>startup
SVRMGR>quit
b¡¢¹Ø±ÕORACLEϵͳ
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR& ......
µÚÒ»´ÎÔÚLinuxÉÏ°²×°OracleµÄʱºòÅöµ½Õâ¸öÎÊÌ⣬ºÇºÇ¡£Ö®Ç°ÔÚLinuxÉÏ°²×°Oracleʱ£¬Ò»°ã¶¼Ê¹ÓÃRedHatϵÁеÄLinux£¬ÔÚ°²×°¹ý³ÌÖУ¬ÐèÒª×ö´óÁ¿µÄ°²×°Ç°Öù¤×÷£¬Èç°²×°RPM°ü£¬´´½¨×éºÍÓû§£¬ÐÞ¸ÄÄں˲ÎÊý£¬Ð޸Ļ·¾³±äÁ¿µÈ¡£Õâ´ÎʹÓõÄÊÇRedFlagµÄAsianux 3£¬¶øÇÒ×Ô´øOracleµÄ°²×°¸¨Öú¹¤¾ßOrana ......
LinuxÏÂOracle×Ô¶¯±¸·Ý½Å±¾
http://freeglad.javaeye.com/blog/586444
½Å±¾Îļþ£º
backup.sh
rq=`date '+%Y%m%d%H%M'`
su - oracle -c "exp zjhk/zjhk_123 owner=zjhk file=/home/oracle/zjhk_$rq.dmp"
cronÊÇÒ»¸ölinuxϵĶ¨Ê±Ö´Ðй¤¾ß£¬¿ÉÒÔÔÚÎÞÐèÈ˹¤¸ÉÔ¤µÄÇé¿öÏÂÔËÐÐ×÷Òµ¡£ÓÉÓÚCron ÊÇLinuxµÄÄÚÖ÷þÎñ£¬µ«Ëü²»×Ô¶ ......