¹ØÓÚoracleµ¼³öexcelºÍexcelµ¼ÈëoracleµÄ¾Ñé×ܽá
Ò»¡¢oracleµ¼³öexcel
·½·¨Ò»£º×î¼òµ¥µÄ·½·¨---Óù¤¾ßplsql dev
Ö´ÐÐFile =>new Report Window ¡£ÔÚsql±êÇ©ÖÐдÈëÐèÒªµÄsql£¬µã»÷Ö´Ðлò°´¿ì½Ý¼üF8£¬»áÏȳԳö²éѯ½á¹û¡£ÔÚÓҲ๤¾ßÀ¸£¬¿ÉÒÔÑ¡Ôñ°´Å¥Áí´æΪhtml¡¢copy as html¡¢export results£¬ÆäÖÐexport results°´Å¥ÖоͿÉÒÔµ¼³öexcelÎļþ¡¢csvÎļþ¡¢tsvÎļþ¡¢xmlÎļþ¡£
·½·¨¶þ£º×îרҵµÄ·½·¨---ÓÃÔʼ¹¤¾ßsqlplus
ÔÎIJμû£ºhttp://www.eygle.com/archives/2005/04/eoasqlplusieaae.html
ÎÒ×öÁËÒ»µãÐ޸ģ¬ÈçÏÂËùʾ£º
1.main.sql
ÓÃÒÔÉèÖû·¾³£¬µ÷ÓþßÌ幦Äܽű¾
2.¹¦Äܽű¾-get_tables.sql
ΪʵÏÖ¾ßÌ幦ÄÜÖ®½Å±¾
ͨ¹ýÕâÑùÁ½¸ö½Å±¾¿ÉÒÔ±ÜÃâspoolÖеÄÈßÓàÐÅÏ¢£¬²Î¿¼:
ÈçºÎÈ¥³ýSQLPLUSÖÐSPOOLµÄÈßÓàÐÅÏ¢
ʾÀýÈçÏÂ:
1.main.sql½Å±¾:
[oracle@jumper utl_file]$ more main.sql
set linesize 200
set term off verify off feedback off pagesize 999
set markup html on entmap ON spool on preformat off
spool d:\tables.xls
@d:\get_tables.sql
spool off
exit
2.get_tables.sql½Å±¾:
[oracle@jumper utl_file]$ more get_tables.sql
select owner,table_name,tablespace_name,blocks,last_analyzed
from all_tables order by 1,2;
3.Ö´Ðв¢»ñµÃÊä³ö:
[oracle@jumper utl_file]$ sqlplus "/ as sysdba" @d:\main.sql
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Apr 25 10:30:11 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
[oracle@jumper utl_file]$ ls -l tables.xls
-rw-r--r-- 1 oracle dba 69539 Apr 25 10:30 tables.xls
[oracle@jumper utl_file]$
´Ë´¦Êä³öΪxlsÎļþ£¬Í¨¹ýÏÂͼÎÒÃÇ¿ÉÒÔ¿´µ½Êä³öЧ¹û:
°Ñmain.sql½Å±¾Öеģ¬spool tables.xls¸ü¸ÄΪspool tables.htm,ÎÒÃÇ¿ÉÒÔ»ñµÃhtm¸ñʽÊä³ö£¬Ð§¹ûÈçÏÂͼ:
·½·¨Èý£º×¾çµÄ·½·¨£¬Ö®ËùÒÔ³ÆΪ±¯¾ç£¬ÊÇÒòΪÕâ¸ö·½·¨ÆäʵºÜ¼òµ¥£¬µ«ÊÇÄã¿ÉÄÜûÓÐ×¢Òâ¡£
´ò¿ªplsql dev¹¤¾ß£¬Ö´ÐÐfile=>new sql window £¬ÊäÈësql£¬µã»÷¹¤¾ßÀ¸
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
°²×°oracleʱ£¬ÓÉÓÚ·´¸´°²×°Ð¶ÔØ£¬Óöµ½·þÎñûÓÐжÔز»ÄܼÌÐø°²×°µÄÎÊÌ⣬´ÓÍøÉÏÕÒµ½ÁË×ÊÁÏ£¬Å¶ªÊ§ÔÚ´ËתÔØһϣ¬ÄÚÈÝÈçÏÂ:
Èç¹ûÄãÒ²ºÍÎÒÒ»Ñù£¬Óù¤¾ß´´½¨ÁËÒ»¸ö·þÎñ£¬Ïëɾ³ýʱȴ·¢ÏÖɾ³ý²»µô¡£»òÕß°²×°ÁËDameWare Mini Remote ÒԺ󣨰üÀ¨×Ô¼º°²×°»òÕß»úÆ÷±»ºÚ£©ÔÚ·þÎñÀïÓÐÒ»¸ö“DameWare Mini Remote Control” ......
Ò». Àí½âʲôÊÇÊý¾Ý¿â»Ö¸´
µ±ÎÒÃÇʹÓÃÒ»¸öÊý¾Ý¿âʱ£¬×ÜÏ£ÍûÊý¾Ý¿âµÄÄÚÈÝÊÇ¿É¿¿µÄ¡¢ÕýÈ·µÄ£¬µ«ÓÉÓÚ¼ÆËã»úϵͳµÄ¹ÊÕÏ£¨Ó²¼þ¹ÊÕÏ¡¢Èí¼þ¹ÊÕÏ¡¢ÍøÂç¹ÊÕÏ¡¢½ø³Ì¹ÊÕϺÍϵͳ¹ÊÕÏ£©Ó°ÏìÊý¾Ý¿âϵͳµÄ²Ù×÷£¬Ó°ÏìÊý¾Ý¿âÖÐÊý¾ÝµÄÕýÈ·ÐÔ£¬ÉõÖÁÆÆ»µÊý¾Ý¿â£¬Ê¹Êý¾Ý¿âÖÐÈ«²¿»ò²¿·ÖÊý¾Ý¶ªÊ§¡£Òò´Ëµ±·¢ÉúÉÏÊö¹ÊÕϺó£¬Ï£ÍûÄÜÖع¹Õâ¸öÍêÕ ......
×î½ü×öÁ˸öÏîÄ¿£¬ÊµÏÖ¶Ô´æÔÚǧÍòÌõ¼Ç¼µÄ¿â±í½øÐвåÈë¡¢²éѯ²Ù×÷¡£ÔÒÔΪ¶ÔÊý¾Ý¿âµÄ²åÈë¡¢²éѯÊǼþºÜÈÝÒ×µÄÊ£¬¿É²»Öªµ±Êý¾Ý´ïµ½°ÙÍòÉõÖÁǧÍòÌõ¼¶±ðµÄʱºò£¬ÕâÒ»ÇÐËƺõ±äµÃÏ൱À§ÄÑ¡£¼¸¾ÕÛÌÚ£¬×ÜËãÍê³ÉÁËÈÎÎñ¡£
1¡¢ ±ÜÃâʹÓÃHibernate¿ò¼Ü
HibernateÓÃÆðÀ´ËäÈ»·½±ã£¬µ«¶ÔÓÚº£Á¿Êý¾ÝµÄ²Ù×÷ÏÔµÃÁ¦²»´ÓÐÄ¡£
¹ØÓÚ²åÈ룺
......
´æ´¢¹ý³Ì´´½¨Óï·¨£º
£¨1£©ÎÞ²Î
create or replace procedure ´æ´¢¹ý³ÌÃû
as
±äÁ¿1 ÀàÐÍ£¨Öµ·¶Î§£©;
±äÁ¿2 ÀàÐÍ£¨Öµ·¶Î§£©;
Begin
........................
Exception
........................
End;
£¨2£©´ø ......