WindowsÏÂORACLE 10g°²×°Óë²Ù×÷ͼ½â
¸Õ¸Õ½Ó´¥ORACLEµÄÈËÀ´Ëµ,´ÓÄÇÀïѧ,ÈçºÎѧ,ÓÐÄÇЩ¹¤¾ß¿ÉÒÔʹÓÃ,Ó¦¸ÃÖ´ÐÐʲô²Ù×÷,Ò»¶¨»Ø¸Ðµ½ÎÞÖú¡£ËùÒÔÔÚѧϰʹÓÃORACLE֮ǰ£¬Ê×ÏÈÀ´°²×°Ò»ÏÂORACLE 10g£¬ÔÚÀ´ÕÆÎÕÆä»ù±¾¹¤¾ß¡£Ë×»°ËµµÄºÃ£º¹¤ÓûÉÆÆäÊ£¬±ØÏÈÀûÆäÆ÷¡£ÎÒÃÇ¿ªÊ¼°É£¡
¡¡¡¡Ê×ÏȽ«ORACLE 10gµÄ°²×°¹âÅÌ·ÅÈë¹âÇý£¬Èç¹û×Ô¶¯ÔËÐУ¬Ò»°ã»á³öÏÖÈçͼ1°²×°½çÃ棺
ͼ1
¡¡¡¡µ¥»÷“¿ªÊ¼°²×°”£¬¾Í¿ÉÒÔ°²×°ORACLE 10g£¬Ò»°ã»á¼ì²éϵͳÅäÖÃÊÇ·ñ·ûºÏÒªÇó£¬È»ºó³öÏÖ“Oracle DataBase 10g°²×°”¶Ô»°¿ò£¬Èçͼ2Ëùʾ£º
ͼ2
¡¡¡¡ÔÚ°²×°Oracle DataBase 10gʱ¿ÉÒÔÑ¡Ôñ“»ù±¾°²×°”ºÍ“¸ß¼¶°²×°”Á½ÖÖ·½·¨¡£Ñ¡Ôñ“»ù±¾°²×°”ʱ£¬“OracleÖ÷Ŀ¼λÖÔÓÃÓÚÖ¸¶¨Oracle DataBase 10gÈí¼þµÄ´æ·ÅλÖ㻓°²×°ÀàÐÍ”ÓÃÓÚÖ¸¶¨Oracle²úÆ·µÄ°²×°ÀàÐÍ(ÆóÒµ°æ¡¢±ê×¼°æºÍ¸öÈË°æ)¡£Èç¹ûÑ¡Ôñ“´´½¨Æô¶¯Êý¾Ý¿â”£¬ÄǾÍÒªÖ¸¶¨È«¾ÖÊý¾Ý¿âÃû³ÆºÍÊý¾Ý¿âÓû§µÄ¿ÚÁî¡£
¡¡¡¡Ñ¡Ôñ“¸ß¼¶°²×°”£¬µ¥»÷“ÏÂÒ»²½”£¬»á³öÏÖ“Ö¸¶¨Îļþ¶Ô»°¿ò”£¬ÔÚԴ·¾¶ÏÔʾµÄÊÇ°²×°²úÆ·ËùÔڵĴÅÅÌ·¾¶£»Ä¿±êÃû³ÆÓÃÓÚ×ʶ¨OracleÖ÷Ŀ¼Ëù¶ÔÓ¦µÄ»·¾³±äÁ¿£¬Ä¿±ê·¾¶ÓÃÓÚÖ¸¶¨°²×°OracleÈí¼þµÄÄ¿±ê°²×°Â·¾¶¡£ÉèÖÃÄ¿±êÃû³ÆΪ£ºOraDb10g_home1£¬Ä¿±ê·¾¶Îª£ºD:oracleproduct10.1.0db1¡£Èçͼ3£º
ͼ3
¡¡¡¡µ¥»÷“ÏÂÒ»²½”£¬»á¼ÓÔØOracle²úÆ·ÁÐ±í£¬È»ºó³öÏÖ“Ñ¡Ôñ°²×°ÀàÐÍ”¶Ô»°¿ò£»Èçͼ4£º
ͼ4
¡¡¡¡Ñ¡Ôñ°²×°ÀàÐÍʱһ°ãÑ¡Ôñ“ÆóÒµ°æ”£¬µ¥»÷“ÏÂÒ»²½”£¬»á³öÏÖ“Ñ¡ÔñÊý¾Ý¿âÅäÖÔ¶Ô»°¿ò£¬Èçͼ5 £º
ͼ5
¡¡¡¡ÔÚ“Ñ¡ÔñÊý¾Ý¿âÅäÖÔ¶Ô»°¿òÖпÉÒÔÑ¡ÔñÊÇ·ñÒª´´½¨Æô¶¯Êý¾Ý¿â£¬Èç¹ûÒª´´½¨Êý¾Ý¿â»¹ÒªÑ¡Ôñ½¨Á¢Êý¾Ý¿âµÄÀàÐÍ¡£Ñ¡Ôñ“²»´´½¨Æô¶¯Êý¾Ý¿â”µ¥»÷“ÏÂÒ»²½”£¬»á³öÏÖ“¸ÅÒª”¶Ô»°¿ò£¬Èçͼ6Ëùʾ£º
ͼ6
¡¡¡¡µ¥»÷“°²×°”£¬¾Í»á¿ªÊ¼°²×°Oracle DataBase 10g²úÆ·ÁË¡£Èçͼ7Ϊ°²×°¹ý³Ì£º
ͼ7
¡¡¡¡Í¼8Ϊ°²×°Íê³É
ͼ8
¡¡¡¡ÔÚ°²×°Íê³ÉOracle Database 10gºó£¬¾ÍÒª½¨Á¢Êý¾Ý¿â¡£
¡¡¡¡ Êý¾Ý¿âÅäÖÃÖúÊÖ(Database Configuration Assistant)ÓÃÓÚ´´½¨Êý¾Ý¿â¡¢ÅäÖÃÊý¾Ý¿âÑ¡Ïɾ³ýÊý¾Ý¿âºÍ¹ÜÀíÄ£°å¡£ÔÚ°²×°Oracle database 10gµÄʱºòÈç¹ûûÓн¨Á¢Êý¾Ý¿â£¬ÔÚ°²×°Íê³ÉÖ®ºó¾Í¿ÉÒÔʹÓÃÊý¾Ý¿âÅäÖÃÖúÊÖ(DBCA)½¨Á¢Êý¾Ý¿â¡£
¡¡¡¡½¨Á¢Êý¾Ý¿âµÄ·½·¨ÓÐÁ½Ö
Ïà¹ØÎĵµ£º
Êý¾Ý¿âÁ¬½ÓÊÇÒ»ÖֹؼüµÄÓÐÏ޵ݺ¹óµÄ×ÊÔ´£¬ÕâÒ»µãÔÚ¶àÓû§µÄÍøÒ³Ó¦ÓóÌÐòÖÐÌåÏÖµÃÓÈΪͻ³ö¡£¶ÔÊý¾Ý¿âÁ¬½ÓµÄ¹ÜÀíÄÜÏÔÖøÓ°Ïìµ½Õû¸öÓ¦ÓóÌÐòµÄÉìËõÐԺͽ¡×³ÐÔ£¬Ó°Ïìµ½³ÌÐòµÄÐÔÄÜÖ¸±ê¡£Êý¾Ý¿âÁ¬½Ó³ØÕýÊÇÕë¶ÔÕâ¸öÎÊÌâÌá³öÀ´µÄ¡£
Êý¾Ý¿âÁ¬½Ó³Ø¸ºÔð·ÖÅä¡¢¹ÜÀíºÍÊÍ·ÅÊý¾Ý¿âÁ¬½Ó£¬ËüÔÊÐíÓ¦ÓóÌÐòÖظ´Ê¹ÓÃÒ»¸öÏÖÓеÄÊý¾Ý¿ ......
Ò».°´Ó¢ÎÄ×ÖĸÅÅÐò:
select * from table order by nlssort(name,'NLS_SORT=schinese_pinyin_M');
¶þ. дһ¸öSQLÓï¾ä£¬²éѯѡÐÞÁË5Ãſγ̵ÄѧÉúѧºÅºÍÐÕÃû£¨9·ÖÖÓ£©
´ð£ºSQLÓï¾äÈçÏ£º
select stu.sno, stu.sname
from student stu
where (select count(*) from s ......
OracleµÄ·ÖÒ³²éѯÓï¾ä»ù±¾ÉÏ¿ÉÒÔ°´ÕÕ±¾Îĸø³öµÄ¸ñʽÀ´½øÐÐÌ×Óá£
·ÖÒ³²éѯ¸ñʽ£º
SELECT * from
(
SELECT A.*, ROWNUM RN
from (SELECT * from TABLE_NAME) A
WHERE ROWNUM <= 40
)
WHERE RN >= 21
ÆäÖÐ×îÄÚ²ãµÄ²éѯSELECT * from TABLE_NAME±íʾ²»½øÐзҳµÄÔʼ²éѯÓï¾ä¡£ROWNUM <= 40ºÍRN ......
Ò»¸ödbÀà ÀàËÆÓÚjdbcµÄÇý¶¯ºÍÁ´½ÓÅäÖÃ
package com.assi;
import org.apache.log4j.jdbc.JDBCAppender;
public class DB extends JDBCAppender {
public DB(){
this.setDriver("oracle.jdbc.driver.OracleDriver");
& ......
¿ÉÒÔÓÃSpotlightÈí¼þ¶ÔÊý¾Ý¿âµÄÔËÐÐ״̬½øÐмà¿Ø¡£
µ±³öÏÖsessionËøʱ£¬ÎÒÃÇÒª¼°Ê±½øÐд¦Àí.
1. ²é¿´ÄÄЩsessionËø:
SQLÓï¾ä£ºselect 'alter system kill session '''||sid||','||serial#||''';' from v$session where sid in (select sid from v$lock where block = 1);
SQL> select 'alter system kill sessio ......