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

Oracle×Ö·û´®³¤¶ÈµÄÎÊÌâ

    ½ñÌìÅöµ½Ò»¸öÎÊÌ⣬ͨ¹ýÒ»¸öSQLÓï¾ä²éѯʱ£¬³öÈçÏÂÎÊÌ⣺
       ORA-06502: PL/SQL: numeric or value error: character string buffer too small
       ORA-06512: at "WMSYS.WM_CONCAT_IMPL", line 30
 ÎÊÌâ³öÏÖÔÚͨ¹ýWMSYS.WM_CONCAT_IMPLº¯ÊýÖØÐÂ×é×°×Ö·û´®µÄʱºò£¬×é×°µÄ´®¹ý³¤£¬varchar2ÀàÐ͵ÄÊý¾ÝÀàÐÍ×î´óΪ4000¸ö×Ö½Ú£¬ÔÚPL/SQLÖÐ×î´óΪ32767£¬Ô­Òò¾ÍÔÚÕâWMSYS.WM_CONCAT_IMPL×é×°µÄÕâ¸ö×Ö·û´®³¤¶ÈΪ18031£¬ÔÚschema¼¶ÏÂvarchar2×î´óÊÇ4000£¬³¬¹ý×î´ó³¤¶È£¬±¨´í¡£(¼ÇϸÃÎÊÌ⣬³¤¼ÇÐÔ~)
ÒÔÏÂÄÚÈÝΪתÔØ£¬url£ºhttp://www.blogjava.net/wangbing/archive/2010/03/15/315482.html
¹ØÓÚ varchar2 µÄ×î´ó³¤¶È
varchar2ÓÐÁ½¸ö×î´ó³¤¶È£ºÒ»¸öÊÇÔÚ×Ö¶ÎÀàÐÍ4000£»Ò»¸öÊÇÔÚPL/SQLÖбäÁ¿ÀàÐÍ32767¡£½ñÌì·¸ÁËÒ»¸öС´íÎ󣬾ÍÊǺ¯ÊýµÄvarchar2ÀàÐ͵ķµ»ØÖµ³¤¶ÈÒ²ÊÇ4000£¬¶ø²»ÊÇÎÒÒÔΪµÄ32767¡£
 
ÏëÁËһϣ¬ÕâÊÇÒ»¸ö±È½ÏÈÝÒ׳ö´íµÄµØ·½¡£ÒòΪÔÚº¯ÊýÖÐÎÒ¿ÉÒÔÉùÃ÷³¤¶È³¬¹ý4000µÄ×Ö·û´®±äÁ¿£¬²¢ÇÒ½«Ëü×÷Ϊ·µ»ØÖµ£¬ÕâÀïÊDz»»áÌáʾ±àÒë´íÎóµÄ¡£Õâ¸öº¯Êýƽʱ¶¼¿ÉÒÔÕý³£Ö´ÐУ¬¶øÒ»µ©Õâ¸ö×Ö·û´®³¤¶È³¬¹ý4000£¬º¯ÊýÖ´Ðоͻá³ö´í¡£ËùÒÔÕâ¸öÎÊÌâËäÈ»±È½Ï¼òµ¥£¬ÈÔÈ»¼Ç¼һÏ¡£
 
C:\Documents and Settings\yuechao.tianyc>sqlplus
 
SQL*Plus: Release 10.2.0.1.0 - Production on ÐÇÆÚ¶þ 5Ô 5 17:15:59 2009
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
ÇëÊäÈëÓû§Ãû:  test/test
 
Á¬½Óµ½:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
 
SQL> create or replace function funny return varchar2
  2  is
  3    v_yct varchar2(32767);
  4  begin
  5    v_yct := rpad('a', 4001, 'b');
  6 &


Ïà¹ØÎĵµ£º

oracle ·ÖÎö×÷ÒµÓÐʱºò͵ÀÁ

2010Äê5ÔÂ25ÈÕ ¸»Ê¿¿µ11ÌøÂ¥×ÔɱµÄÕâÌì¡£´«ÎÅoracle 10g r203×Ô¶¯·ÖÎö×÷Òµ²»ÊǺܿ¿Æ×,¾ßÌåΪʲô²»µÃ¶øÖª£¡½ñÌìÀÏ¿âµÄ»úÆ÷Òª±»°á×ߣ¬¿´µ½ÉÏÃæÓиöĿ¼ÊÇDBAµ¼Êý¾Ý¶øÓõģ¬»¹Áô×ÅÀÏ¿âǨµ½Ð¿âµÄDMPÊý¾ÝÎļþ309G¡£ÏëÀÏ¿âÕæÕýÓõ½µÄ±í±È½ÏÉÙ£¬Êý¾ÝÁ¿»áСºÜ¶à¡£ÎªÁËÖªµÀ¾ßÌåÁ¿£¬ËùÒÔ×Ô¼ºÊÔÍæÏÂEXPµ¼Êý¾Ý¡£ÏÈÊÔÁËÏÂÓû§±í590Íò1. ......

ORACLE¿ª·¢¹¤¾ß²ßÂÔ½éÉÜ


ORACLE¿ª·¢¹¤¾ß²ßÂÔ½éÉÜ
ºÜ¶àͬѧÎÊÆðÎÒÃÇOracle ERP¶þ´Î¿ª·¢ÒÔºó»áʹÓÃʲôÑùµÄÓïÑԺͿª·¢¹¤¾ß£¿Ê×ÏÈÎÒÃÇÀ´¿´¿´Oracle¿ª·¢¹¤¾ß²úÆ·µÄ²ßÂÔ
Oracle¿ª·¢¹¤¾ßµÄ²ßÂÔÊÇÌṩÄܹ»¿ª·¢»ùÓÚInternetÄ£ÐÍÏÂÆóÒµÓ¦ÓõÄÈí¼þ¿ª·¢¹¤¾ß£¬Òò´ËOracleÌṩÁËÁ½¸ö²¢ÐеĿª·¢¹¤¾ßÒÔ¼°ÐµĿìËÙWeb¿ª·¢¹¤¾ß£º
Ò»£¬»ùÓÚPL/SQLÓïÑÔ»·¾³µÄ´«Í³¿ ......

OracleÊý¾Ý¿â¹ÜÀí½Å±¾ËµÃ÷

author£ºskate
time£º2010-05-25
OracleÊý¾Ý¿â¹ÜÀí½Å±¾ËµÃ÷
Oracle ÖеÄÊý¾Ý×ÖµäÊÇÊý¾Ý¿âÖеķdz£ÖØÒªµÄÒ»²¿·Ö£¬ÌṩÁËÏà¹ØÊý¾Ý¿âµÄÐÅÏ¢£¬ËüÊÇËùÓÐOracleÓû§£¨´ÓÓ¦ÓõÄ×îÖÕÓû§¡¢Ó¦ÓõÄÉè¼Æ¿ª·¢Õßµ½Êý¾Ý¿â¹ÜÀíÔ±£©µÄ·Ç³£ÖØÒªµÄÐÅÏ¢À´Ô´¡£Êý¾Ý×ÖµäµÄ´´½¨£¬ÊÇÔÚOracleÊý¾Ý¿â´´½¨Íê±Ïºó£¬ÔËÐÐһЩÏà¹ØµÄÊý¾Ý¿â¹ÜÀí½Å±¾À´Íê ......

OracleÈçºÎÖ´ÐÐÅúÁ¿sqlÓï¾ä

Òª´´½¨Á½¸öÎļþ
1: runBatch.bat
2: sql.txt
runBatch.bat ÄÚÈÝÈçÏ£º
sqlplus username/password @sql.txt
pause
sql.txtÄÚÈÝÈçÏ£º
spool sql.log
create table t1(cname char(20));
insert into t1(cname) values('test');
select * from t1;
spool off
exit
Ë«»÷runBatch.bat¾Í¿ÉÒÔÅúÁ¿Ö´ÐÐsql.txtÖÐ ......

Oracle ´æ´¢¹ý³Ì·µ»Ø½á¹û¼¯ÓÃ

Oracle ´æ´¢¹ý³Ì·µ»Ø½á¹û¼¯Óà ref cursor ʵÏÖ¡£ÊÔÑé²½ÖèÈçÏ£º
1. ½¨Á¢ ref cursor ÀàÐͺ͹ý³Ì
CREATE OR REPLACE PACKAGE types
AS
    TYPE ref_cursor IS REF CURSOR;
END;
/
CREATE TABLE STOCK_PRICES(
    RIC VARCHAR(6) PRIMARY KEY,
    PRICE NUMBER(7,2 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ