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

oracle10g SQL ¸ú×Ù

1.¼¤»îSQL¸ú×Ù
   ´Óoracle10gÒÔºóÌṩÁËеķ½·¨¼¤»îSQLµÄ¸ú×Ù£¬¼´ÊÇʹÓÃdbms_monitor°üÀ´¿ªÆô»ò¹Ø±ÕSQL¸ú×Ù¡£
   ֮ǰ¾É·½·¨ÊÇʹÓà alter session set events ..  »òÕßʹÓÃdbms_system.set_ev·½Ê½
   ʹÓÃdbms_monitor°ü¿ÉÒÔÔڻỰ£¬¿Í»§¶Ë£¬×é¼þÒÔ¼°Êý¾Ý¿âËĸö²ã¼¶¿ªÆôSQLµÄ¸ú×Ù¡£
   Ö»ÓÐÓµÓÐdba½ÇÉ«µÄÓû§²ÅÄÜÔÊÐíÖ´ÐÐdbms_monitor°ü
   4¸ö²ã´Î¼¶±ðµÄ¼¤»îµ÷Ó÷½·¨£º
    »á »° ¼¶:exec dbms_monitor.session_trace_enable(session_id =>1574,
                        serial_num=>36749,waits=>true,binds=>false);
             ×¢Òâ:ʹÓÃselect *  from v$session where sid=sys_context('userenv','sid');
             »ñµÃsession_idºÍserial
             ¹Ø±ÕÓÃ:
         exec dbms_monitor.session_trace_disable(session_id=>1574,serial_num=>36749)
    ¿Í»§¶Ë¼¶:exec dbms_monitor.cliend_id_trace_enable(
                                 client_id=''JXXXT:Administrator',
                                 waits =>true,binds=>false)
             ×¢Òâ:client_id¼´v$session±íÀïÃæµÄclient_identifier×ֶΣ¬Ä¬ÈÏ´Ë×Ö¶ÎΪ¿Õ,
              ͨ¹ýdba_enabled_traces±í²é¿´ÄÇЩ¿Í»§¶ËÆôÓÃÁËSQL¸ú×Ù
        &nb


Ïà¹ØÎĵµ£º

Oracle 10g RAC OCR ºÍ VotingDisk µÄ±¸·ÝÓë»Ö¸´


 
Oracle RAC ÖÐOCR ºÍVoting Disk ±¸·ÝÔÚÎÒµÄblog£º Oracle RAC ³£ÓÃά»¤¹¤¾ßºÍÃüÁî ÖÐÒѾ­ÓÐ˵Ã÷£¬ÏÖÔÚÔٴΰÑËüµ¥¶ÀÄóö×öÒ»¸ö˵Ã÷£¬ ÒòΪOCR ºÍ Voting Disk ¶ÔÓÚRAC ÏµÍ³À´ËµÌ«ÖØÒªÁË¡£
Oracle RAC ³£ÓÃά»¤¹¤¾ßºÍÃüÁî ......

Oracle³£ÓÃÊý¾ÝÀàÐͼò½é

OracleÖÐÌṩһϵÁÐÀàÐÍ£¬Ã¿¸öÀàÐ͵ÄÌصãÈçÏ£º
char£º´æ´¢¹Ì¶¨³¤¶ÈµÄ×Ö·û£¬Èç¹û×Ö·û³¤¶È²»¹»»áÔÚÓұ߲¹¿Õ¸ñ¡£±ÈÈ磺name char£¨10£©£¬µ±¸øname¸³ÖµÎª'zhangsan'ʱ»áÔÚÓұ߲¹³ä2¸ö¿Õ¸ñ¡£charÀàÐ͵ÄÈÝÁ¿Îª1¡«2000B£¬Ã»ÓÐÖ¸¶¨ÔòĬÈϳ¤¶ÈΪ1¡£
varchar2£º´æ´¢³¤¶È¿É±äµÄ×Ö·û£¬ºÍcharÀàÐ͵IJ»Í¬£¬Ëü²»»á×Ô¶¯²¹³ä¿Õ¸ñ£¬ÇÒ¶¨ÒåÊ ......

ÈçºÎÈÃÄãµÄSQLÔËÐеøü¿ì


  ----   ÈËÃÇÔÚʹÓÃSQLʱÍùÍù»áÏÝÈëÒ»¸öÎóÇø£¬¼´Ì«¹Ø×¢ÓÚËùµÃµÄ½á¹ûÊÇ·ñÕýÈ·£¬¶øºöÂÔ  
  Á˲»Í¬µÄʵÏÖ·½·¨Ö®¼ä¿ÉÄÜ´æÔÚµÄÐÔÄܲîÒ죬ÕâÖÖÐÔÄܲîÒìÔÚ´óÐ͵ĻòÊǸ´ÔÓµÄÊý¾Ý¿â  
  »·¾³ÖУ¨ÈçÁª»úÊÂÎñ´¦ÀíOLTP»ò¾ö²ßÖ§³ÖϵͳDSS£©ÖбíÏÖµÃÓÈΪÃ÷ÏÔ¡£±ÊÕßÔÚ¹¤×÷ʵ¼ù  
  Öз¢ ......

SQLÖÐONºÍWHEREÌõ¼þµÄÇø±ð

Êý¾Ý¿âÔÚͨ¹ýÁ¬½ÓÁ½ÕÅ»ò¶àÕűíÀ´·µ»Ø¼Ç¼ʱ£¬¶¼»áÉú³ÉÒ»ÕÅÖмäµÄÁÙʱ±í£¬È»ºóÔÙ½«ÕâÕÅÁÙʱ±í·µ»Ø¸øÓû§¡£
ÔÚʹÓÃleft jionʱ£¬onºÍwhereÌõ¼þµÄÇø±ðÈçÏ£º
1¡¢onÌõ¼þÊÇÔÚÉú³ÉÁÙʱ±íʱʹÓõÄÌõ¼þ£¬Ëü²»¹ÜonÖеÄÌõ¼þÊÇ·ñΪÕ棬¶¼»á·µ»Ø×ó±ß±íÖеļǼ¡£
2¡¢whereÌõ¼þÊÇÔÚÁÙʱ±íÉú³ÉºÃºó£¬ÔÙ¶ÔÁÙʱ±í½øÐйýÂ˵ÄÌõ¼þ¡£ÕâʱÒÑ ......

C#²Ù×÷¸÷ÖÖÖ´ÐÐsqlµÄ·½·¨º¬´æ´¢¹ý³Ì²Ù×÷

using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Xml;
using System.Data;
namespace MyDbTest
{
class Program
{
static void Main(string[] args)
{
SqlConnection thisConnection = new SqlConnection(
@ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ