Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ORACLE ÐÐתÁÐ ²âÊÔͨ¹ý£¨9i£©

--ORACLE ÐÐתÁР ²âÊÔͨ¹ý£¨9i£©
/***************************************************************************************************
ÒÔѧÉú³É¼¨ÎªÀý×Ó£¬±È½ÏÐÎÏóÒ׶®
***********************************************************************************************************/
--1¡¢ÐÐתÁÐ
--> --> Éú³É²âÊÔÊý¾Ý
drop table Class ;
Create table Class(Student varchar2(20),Course varchar2(20),Score number) ;
Insert into Class
(
select 'ÕÅÈý','ÓïÎÄ',78 from dual union all
select 'ÕÅÈý','Êýѧ',87 from dual union all
select 'ÕÅÈý','Ó¢Óï',82 from dual union all
select 'ÕÅÈý','ÎïÀí',90 from dual union all
select 'ÀîËÄ','ÓïÎÄ',65 from dual union all
select 'ÀîËÄ','Êýѧ',77 from dual union all
select 'ÀîËÄ','Ó¢Óï',65 from dual union all
select 'ÀîËÄ','ÎïÀí',85 from dual );
--case ·½Ê½:
select Student,sum(ÓïÎÄ) ÓïÎÄ,sum(Êýѧ) Êýѧ,sum(ÎïÀí) ÎïÀí,sum(Ó¢Óï) Ó¢Óï
 from(
       select  Student,       
    case Course when 'ÓïÎÄ' then Score else 0 end as ÓïÎÄ,
    case Course when 'Êýѧ' then Score else 0 end as Êýѧ,
    case Course when 'ÎïÀí' then Score else 0 end as ÎïÀí,
    case Course when 'Ó¢Óï' then Score else 0 end as Ó¢Óï
from  Class )
group by Student;
--decode ·½Ê½:
select student,sum(decode(Course,'ÓïÎÄ', Score,0)) as ÓïÎÄ,
sum(decode(Course,'Êýѧ', Score,0)) as Êýѧ,
sum(decode(Course,'ÎïÀí', Score,0)) as ÎïÀí,
sum(decode(Course,'Ó¢Óï', Score,0)) as Ó¢Óï
from Class
group by student;
drop table Class ;


Ïà¹ØÎĵµ£º

oracle¸´Ï°£¨Ò»£© Ö®OracleÌåϵ½á¹¹

      ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬Ô­À´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·­Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
      µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......

28.4.1 ÊÖ¹¤Æô¶¯ºÍ¹Ø±ÕOracle·þÎñ

28.4.1  ÊÖ¹¤Æô¶¯ºÍ¹Ø±ÕOracle·þÎñ
OracleÊý¾Ý¿â·þÎñÓÉÁ½²¿·Ö×é³É£ºÊý¾Ý¿â½ø³ÌºÍÍøÂç¼àÌýÆ÷½ø³Ì£¬ËüÃÇ·Ö±ð¿Éͨ¹ýsqlplusºÍlsnrctlÃüÁî¿ØÖÆÆô¶¯¹Ø±Õ¡£
1£®Êý¾Ý¿â½ø³Ì
ʹÓÃDBCA¹¤¾ß´´½¨Êý¾Ý¿âºó£¬Æä½ø³ÌÒѾ­×Ô¶¯Æô¶¯£¬ÕâЩ½ø³Ì¶¼ÊÇÒÔÊý¾Ý¿âÃû³Æ£¨ÔÚ±¾ÀýÖÐΪorcl£©ÃüÃû£¬ÈçÏÂËùʾ¡£
 
$ ps -ef|grep orcl
orac ......

28.4.3 ¼ì²âOracleÊý¾Ý¿â״̬

28.4.3  ¼ì²âOracleÊý¾Ý¿â״̬
OracleÆô¶¯ºó£¬Îª¼ì²âOracle·þÎñµÄÔËÐÐÊÇ·ñÕý³££¬¿ÉÒÔÖ´ÐÐpsÃüÁî¼ì²éÏà¹ØµÄOracle·þÎñ½ø³Ì£¬Ò²¿ÉÒÔͨ¹ýOracleËùÌṩµÄÃüÁî½øÐмì²é¡£¾ßÌå½éÉÜÈçÏÂËùʾ¡£
£¨1£©Ö´ÐÐpsÃüÁî²é¿´Êý¾Ý¿â½ø³ÌÇé¿ö¡£
 
ps -ef | grep oracle
 
£¨2£©ÔÚsqlplusÖÐÖ´ÐÐÃüÁî²é¿´Êý¾Ý¿â״̬¡£
&nbs ......

28.6 Oracle³£¼ûÎÊÌâ´¦Àí

28.6  Oracle³£¼ûÎÊÌâ´¦Àí
±¾½Ú½éÉÜÔÚRed Hat Enterprise Linux 5.2ÉÏ°²×°¼°ÅäÖÃOracleÊý¾Ý¿â·þÎñÆ÷ÖУ¬³£¼ûµÄÎÊÌâ¼°½â¾ö·½·¨£¬°üÀ¨ÈçºÎ»ñµÃÊý¾Ý¿â´´½¨¹ý³ÌÖеÄÏêϸÐÅÏ¢£¬·ÃÎÊOEM³öÏÖ“°²È«Á¬½Óʧ°Ü£¬Ê¹ÓÃÁËÎÞЧµÄ°²È«Ö¤Êé”´íÎóÒÔ¼°Íü¼ÇsysÓû§¿ÚÁîºóµÄ´¦Àí·½·¨µÈ¡£ ......

QTPÁ¬½Óoracle²¢²Ù×÷Êý¾Ý¿âµÄ·½·¨

QTPÁ¬½Óoracle²¢²Ù×÷Êý¾Ý¿âµÄ·½·¨ÕâÀïÒÔoracle  9iΪÀý×Ó£¬ÆäËûµÄÊý¾Ý¿âÁ¬½Ó·½·¨ÊÇÏàͨµÄ¡£
a.Ê×ÏÈÒªÔÚ±¾»ú½¨ÒéODBCÊý¾ÝÔ´£¬Õâ¸öÊôÓÚ»ù±¾²Ù×÷£¬ÕâÀï²»½²£¬Ìø¹ý£»
b.»ñÈ¡oracleµÄÁ¬½Ó´®µÄ·½·¨£¬ÔÚ±¾µØн¨Ò»¸ö.txtÎļþ£¬ÐÞ¸ÄÀ©Õ¹ÃûÃû*.udl£¬Ë«»÷*.udlÎļþ£¬´ò¿ªÊý¾Ý¿âÁ´½ÓÊôÐÔ£¬¶¨Î»µ½“Ìṩ³ÌÐò”Ñ¡ÏÔ¿¨£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ