¹ØÓÚ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£¬µã»÷¹¤¾ßÀ¸
Ïà¹ØÎĵµ£º
µÚÒ»ÖÖ£º
select * from SOME_TABLE sample(1) where rownum <= 10;
µÚ¶þÖÖ£º
select * from (select * from SOME_TABLE order by dbms_random.value) where rownum<=10;
µÚÈýÖÖ£º
select * from (select * from SOME_TABLE order by sys_guid()) where rownum <= 10; ......
LogMinerÌṩÁËÒ»¸ö´¦ÀíÖØ×öÈÕÖ¾Îļþ²¢½«ÆäÄÚÈÝ·Òë³É´ú±í¶ÔÊý¾Ý¿âµÄÂß¼²Ù×÷µÄSQLÓï¾äµÄ¹ý³Ì¡£LogMinerÔËÐÐÔÚOracle°æ±¾8.1»òÕ߸ü¸ß°æ±¾ÖС£
Ò»£¬ÈçºÎʹÓÃLogminer:
ÏÈÒª°²×°logminerµÄÁ½¸ö°ü£»ÒÔSYSÓû§ÔËÐÐÏÂÃæÁ½¸ö½Å±¾,ÆäÖеÚÒ»¸ö½Å±¾dbmslm.sqlÓÃÀ´´´½¨DBMS_LOGMNR°ü£¬¸Ã°üÓÃÀ´·Ö ......
#! /bin/bash
if [ -f ~/.bashrc ];then
. ~/.bash_profile
fi
export script=/home/oracle/script
export bakdata_destination=/u02/rman_backup/data
export baklog_destination=/u02/rman_backup/log
export datadir=`date +'%Y_%m_%d'`
export days=`date +'%w'`
if ! test -d $script
then
&nb ......
linux Ï°²×°oracle ÊÇÒ»¼þºÜÁîÈËÍ·ÌÛµÄÊÂÇ飬ÎÒ°Ñ×Ô¼ºµÄ°²×°²½ÖèÄóöÀ´¸ø´ó¼Ò·ÖÏíһϡ£
Ò».linux·þÎñ¶ËµÄ°²×°.
1.ÏÂÔØoracle·þÎñ¶ËÈí¼þ,ÏÂÔØÍøÖ·ÈçÏÂ
http://www.oracle.com/technology/software/products/database/index.html
ÎÒÑ¡ÔñµÄ°æ±¾ÊÇ£ºOracle Database 10g Release 2 (10.2.0.1.0) for Linux x86-64
......
ÕâÀïÊ×ÏÈ˵ÏÂoracle·ÖÒ³²»Ïñmysql·ÖÒ³ÄÇô¼òµ¥Ö±½Ólimit ¾Í¿ÉÒÔÁË.
mysql£ºsql ="select * from talbe limit 0,10";
µÚÒ»¸öÊý±íʾϱ꣬¾ÍÊÇ´ÓµÚ¼¸ÌõÊý¾Ý¿ªÊ¼£¬
µÚ¶þ¸öÊý±íʾÿҳÏÔʾ¶àÉÙÌõÊý¾Ý£¬¿ÉÒÔ˵Êǵ±ÄãÈ·¶¨Ã¿Ò³ÏÔʾ¶àÉÙÐÐʱºò£¬Ëü¾ÍÊÇÒ»¸ö¹Ì¶¨µÄÊý¡£
ÕâÀïÐèҪעÒâµÄÊÇ£¬mysqlµÄ·ÃÎÊϱêÊÇ´Ó0¿ªÊ¼µÄ¡£Õ ......