oracle×Ö·û¼¯
×÷Ϊһ¸öORACLE DBA,ÔÚ¹¤×÷Öлᾳ£´¦ÀíÓÉÓÚ×Ö·û¼¯²úÉúµÄһЩÎÊÌâ¡£µ«Êǵ±ÕæÕýÏëдһЩÕâ·½ÃæµÄ¶«Î÷ʱ£¬È´Í»È»ÓÖûÓÐÁËÍ·Ð÷¡£·¢Á˰ëÌì´ô£¬»¹ÊǾö¶¨ÓÃÁ½¸ö×Ö·û¼¯·½ÃæµÄÀý×Ó×÷ΪÇÐÈëµã£¬µ¹²»Ê§ÎªÒ»¸öÍ·Ð÷£¬Ëµ²»¶¨ÔÚʵÑéµÄ¹ý³ÌÖУ¬ÎÊÌâ¾Í»áÒ»¸ö½Ó×ÅÒ»¸öµÄ¸¡ÏÖ³öÀ´¡£
ÏÖÔÚ£¬ÈÃÎÒÃÇÇÐÈëÕýÌâ¡£
ÎÒÓõÄÊý¾Ý¿âÊÇoracle10.2.0.3,Êý¾Ý¿â×Ö·û¼¯ÊÇal32utf8¡£
¿Í»§¶Ë¾ÍÊÇͬһ̨»úÆ÷µÄwindows xp.
ÏÂÃæÊÇÑÝʾµÄÀý×Ó£º
SQL> drop table test purge;
Table dropped.
SQL> create table test(col1 number(1),col2 varchar2(10));
Table created.
--session 1 ÉèÖÿͻ§¶Ë×Ö·û¼¯Îª zhs16gbk£¨ÐÞ¸Ä×¢²á±ínls_langÏîµÄcharacterset Ϊzhs16gbk£© Ïò±íÖвåÈëÁ½¸öÖÐÎÄ×Ö·û¡£
SQL> insert into test values(1,'Öйú'); --1Ϊsession 1µÄ±ê¼Ç
1 row created.
SQL> commit;
Commit complete.
--session 2 ÉèÖÿͻ§¶Ë×Ö·û¼¯ al32utf8£¨ÐÞ¸Ä×¢²á±ínls_langÏîµÄcharacterset Ϊal32utf8£©£¬ÓëÊý¾Ý¿â×Ö·û¼¯Ïàͬ¡£ Ïò±íÖвåÈëÁ½¸öºÍsession 1ÏàͬµÄÖÐÎÄ×Ö·û¡£
SQL> insert into test values(2,'Öйú'); --2Ϊsession 2µÄ±ê¼Ç
1 row created.
SQL> commit;
Commit complete.
--session 1
SQL> select * from test;
COL1 COL2
---------- --------------------
2 £¿??
1 Öйú
--session 2
SQL> select * from test;
COL1 COL2
---------- ----------
2 Öйú
1 ä¸浗
´Ósession 1ºÍsession 2µÄ½á¹ûÖпÉÒÔ¿´µ½£¬ÏàͬµÄ×Ö·û£¨×¢Ò⣬ÎÒÖ¸µÄÊÇÎÒÃÇ¿´µ½µÄ£¬ÏÔʾΪÏàͬµÄ×Ö·û£©£¬ÔÚ²»Í¬µÄ×Ö·û¼¯ÊäÈë»·¾³Ï£¬ÏÔʾ³ÉÁËÂÒÂë¡£
ÔÚzhs16gbk×Ö·û¼¯µÄ¿Í»§¶Ë£¬ÎÒÃÇ¿´µ½ÁËutf8×Ö·û¼¯¿Í»§¶ËÊäÈëµÄÏàͬµÄÖÐÎıä³ÉÁËÂÒÂë-->col1=2µÄcol2×Ö¶Î
ÔÚutf8×Ö·û¼¯¿Í»§¶Ë£¬ÎÒÃÇ¿´µ½zhs16gbk×Ö·û¼¯µÄ¿Í»§¶ËÊäÈëµÄÖÐÎıä³ÉÁËÁíÍâµÄ×Ö·û -->col1=1µÄcol2×Ö¶Î
´ÓÕâ¸öÀý×ÓÀÎÒÃǺÃÏñ¸Ð¾õµ½³öÁËʲôÎÊÌ⣬Ҳ¿ÉÄÜ»áÁªÏëÆðÏÖʵ»·¾³ÖгöÏÖµÄÂÒÂëÎÊÌâ¡£
ÎÊÌâËÆºõÓÐÁË˼·£¬ok£¬ÈÃÎÒÃǼÌÐø°ÑʵÑé×öÏÂÈ¥£º
--session 1 £¨»òÕßsession 2£¬ÔÚÕâÀïÎÞËùν£©
SQL> select col1,dump(col2,1016) from test;
COL1
----------
DUMP(COL2,1016)
--------------------------------------------------------------------------------
2
Typ=1 Len=4 CharacterSet=AL32UTF8: d6,d0,b9,fa
1
Typ=1 Len=6 CharacterSet=AL32UTF8: e4
Ïà¹ØÎĵµ£º
extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î» --segment management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......
-- ²éѯÍâ¼üÔ¼Êø(²éij±íµÄËùÓи¸±í)
select c.constraint_name,cc.column_name,rcc.owner,rcc.table_name,rcc.column_name
from user_constraints c,user_cons_columns cc,user_cons_columns rcc
where c.owner=' ......
ÔÚÒ»±íorginfoÉϽ¨Á¢´¥·¢Æ÷£¬ÆäÖаüÀ¨ÒÔ϶¯×÷£º
Ôöɾ¸Ä´Ë±íµÄ¼Ç¼ʱ£¬ÐèÒª²éѯ´Ë±í£¬ÉõÖÁ¸Äд´Ë±íµÄÆäËû¼Ç¼¡£±¨¸æ“ora-04091:±íÒѾ±»Ð޸쬶ÔÓÚ´¥·¢Æ÷/º¯Êý²»¿É¼û”¡£
Cause: A trigger (or a user defined PL/SQL function that is referenced in this statement) attempted to look at (or modify) a tab ......
Ò»¡¢²ÎÊýÉèÖÃ
--1¡¢ÉèÖÃA£º
db_block_size = 8192
db_domain = ''
db_file_multiblock_read_count = 16
db_name = bidata
db_recovery_file_dest = /export/home/app/oracle/oracle/product/10.2.0/db_1/flash_recovery_area
db_recovery_file_dest_size = 10737418240
dispatchers = '(PROTOCOL=TCP) (SERVICE=b ......
ºÜ¶àÅóÓÑÔÚJava¿ª·¢ÖУ¬Ê¹ÓÃOracleÊý¾Ý¿âµÄʱºò£¬¾³£»áÅöµ½ÓÐORA-01000: maximum open cursors exceeded.µÄ´íÎó¡£
ʵ¼ÊÉÏ£¬Õâ¸ö´íÎóµÄÔÒò£¬Ö÷Òª»¹ÊÇ´úÂëÎÊÌâÒýÆðµÄ¡£
ora-01000: maximum open cursors exceeded.
±íʾÒѾ´ïµ½Ò»¸ö½ø³Ì´ò¿ªµÄ×î´óÓαêÊý¡£
ÕâÑùµÄ´íÎóºÜÈÝÒ׳öÏÖÔÚJava´úÂëÖеÄÖ÷ÒªÔÒòÊÇ£ºJava´úÂëÔÚÖ´ ......