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

Oracle 9iÖеÄXMLTYPEÓ¦ÓÃѧϰ

oracle´Ó9i¿ªÊ¼Ö§³ÖÒ»ÖÖеÄÊý¾ÝÀàÐÍ---- xmltype£¬ÓÃÓÚ´æ´¢ºÍ¹ÜÀíxmlÊý¾Ý£¬²¢ÌṩÁ˺ܶàµÄfunctions£¬ÓÃÀ´Ö±½Ó¶ÁÈ¡xmlÎĵµºÍ¹ÜÀí½Úµã¡£ÏÂÃ潫½éÉÜxmltypeµÄһЩ»ù±¾Ê¹Óá£
1.½¨Á¢º¬ÓÐxmltypeÊý¾ÝÀàÐ͵ıí
create table abc (id number,xmldoc sys.xmltype);
ÉùÃ÷xmltypeÐÍ×Ö¶ÎÓÃ:sys.xmltype
2.Ïò´øÓÐxmltypeÀàÐ͵ıí²åÈë´øÓÐÊý¾Ý
insert into abc (id,xmldoc) value (abc.nextval , sys.xmlType.createXML(''<name><a id="1" value="some values">abc</a></name>'') );
²åÈëÓà sys.xmlType.createXML(''some xml doc'')
3.Ö±½Ó²éѯxmltype×Ö¶ÎÀïÃæµÄÄÚÈÝ
µÃµ½id=1µÄvalue±äÁ³µÄÖµ
select i.xmldoc.extract(''//name/a[@id=1]/@value'').getStringVal() as ennames, id from abc i
µÃµ½a½ÚµãµÄÖµ
select id, i.xmldoc.extract(''//name/a/text()'').getStringVal() as truename from abc i
µÃµ½½ÚµãidÊôÐÔµÄÖµ
Select hd.Data_t.extract(''/root/name/@id'').getStringVal()    As Name from sehr_house_data hd
4.¸üÐÂxmltypeÀïÃæµÄÊý¾Ý
update abc set xmldoc=updateXML(xmldoc,''//name/a[@id=1]/@value'',''some new value'') where ......
(×¢Ò⣺Èç¹ûÀïÃæûÓÐ<a id="1">Õâ¸ö½Úµã£¬½«²»ÄÜupdate)
5.Ìí¼Ó³¬¹ý4k×Ö½ÚµÄxmlÎĵµµ½xmltypeÐÍ×Ö¶Î
¿ÉÒÔͨ¹ýʹÓÃÁÙʱ±íµÄ°ì·¨ÊµÏÖ£º
ÏȽ¨Á¢Ò»¸öÁÙʱµÄ±í£¬ÆäÖеÄÒ»¸ö×Ö¶ÎÊÇclobÀàÐÍ£»
ÔÙ½«ÒªÐ´Èëxmltype×ֶεÄxml docдÈëÕâ¸öÁÙʱµÄclobÐ͵Ä×Ö¶ÎÖУ»
×îºóinsert into abc (id,xmldoc) values (abc_q.nextval , sys.xmlType.createXML((select content from ÁÙʱ±í where id=......)));
 
Oracle 9iÌṩµÄXMLÄÚÖÃÌØÐÔ£º
Oracle 9iÖ§³ÖXMLTypeÀàÐÍ£¬ËüÊÇÒ»ÖÖOracle 9iϵͳ¶¨ÒåµÄ¶ÔÏóÀàÐÍ¡£XMLTypeÓÐÄÚÖõĺ¯Êý£¬ÓÐÁ¦µÄÌṩÁËÍÆXMLµÄ´´½¨£¬Ë÷¼ì£¬Ë÷ÒýµÈ¹¦ÄÜ¡£
Óû§¿ÉÒÔʹÓÃSQLº¯Êý¶¯Ì¬µÄ²úÉúXMLÎĵµ¡£ÕâЩº¯ÊýÓУºSYS_XMLGENºÍSYS_XMLAGGºÍPL/SQL°üDBMS_XMLGEN¡£
XMLÌØÐÔ
ÃèÊö
XMLType
1¡¢XMLTypeÊÇoracleϵͳ¶¨ÒåµÄÊý¾ÝÀàÐÍ£¬ÏµÍ³Ô¤¶¨ÒåÁËÄÚ²¿º¯ÊýÈ¥·ÃÎÊXMLÊý¾Ý¡£¿ÉÒÔÖ´ÐÐÏÂÃæµÄÈÎÎñ£º
2¡¢´´½¨XMLTypeÁУ¬ÔÚXMLTypeÁÐÉÏÃæʹÓÃÄÚÖõĺ¯Êý¡£
´´½¨PL/SQLº¯ÊýºÍ´æ´¢¹ý³Ì£¬¿ÉÒÔʹÓÃXMLType×÷Ϊ²ÎÊý´«È룬»òÕß×÷Ϊ·µ»Ø²ÎÊý´«³ö¡£
3¡¢ÔÚXMLTypeÁÐÉÏÃæ´æ´¢¡¢Ë÷Òý¡¢´¦ÀíXMLÊý¾Ý¡£
DBMS_XMLGEN
DBMS_XMLGENÊÇÒ»¸öPL/SQL°ü£


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

Oracle 10.2.0.3 Patch°²×°Ö®BUGÏê½â

ORA-00704: bootstrap process failure
ORA-1092 signalled during: alter database open...
½øÐÐÈçϲÙ×÷ºóOK.
SQL>startup upgrade
For Windows
SQL>@d:\oracle\product\10.2.0\db_1/rdbms/admin/catupgrd.sql
For Linux
SQL>@/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catupgrd.sql
´ýcatupgrd ......

oracleϵͳ±í²éѯ

Êý¾Ý×Öµädict×ÜÊÇÊôÓÚOracleÓû§sysµÄ¡£
¡¡¡¡1¡¢Óû§£º
¡¡¡¡¡¡select username from dba_users;
¡¡¡¡¸Ä¿ÚÁî
¡¡¡¡¡¡alter user spgroup identified by spgtest;
¡¡¡¡2¡¢±í¿Õ¼ä£º
¡¡¡¡¡¡select * from dba_data_files;
¡¡¡¡¡¡select * from dba_tablespaces;//±í¿Õ¼ä
¡¡¡¡¡¡select tablespace_name,sum(bytes), sum(b ......

Oracle JOBµÄ½¨Á¢£¬¶¨Ê±Ö´ÐÐÈÎÎñ

begin
  sys.dbms_job.submit(job => :job,
                      what => 'check_err;',
                 ......

ѧϰoracleµÚÒ»ÖÜ×ܽá

    ´ÓÉÏÖÜ¿ªÊ¼£¬ÎÒÏÂÔØÁËС²¼ÀÏʦµÄ½²¿ÎÊÓƵ£¬¿ªÊ¼ÁËѧϰORACLEµÄ¼Æ»®¡£
    ѧϰORACLEµÄÄ¿µÄ£¬Ò»·½ÃæÊÇÌá¸ß×Ô¼ºµÄ¼¼ÊõÄÜÁ¦£¬¹¤×÷ÉϾ­³£¿ÉÒÔÓõõ½£¨ËäÈ»²»ÊÇרÃÅDBAµÄ¹¤×÷£¬µ«ÊǾ­³£ÐèҪʹÓÃÊý¾Ý¿â×÷Ϊ±¨±íͳ¼Æ·ÖÎöµÄ¹¤¾ß£©£»ÁíÒ»·½Ã棬ҲÊÇΪÌø²Û×öºÃ¼¼ÊõÄÜÁ¦µÄ´¢±¸£¬ÏÖÔڵŤ×÷ÒѾ­¿ìÈ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ