Oracle °ó¶¨±äÁ¿
1¡¢¶¨ÒåÒ»¸ö°ó¶¨±äÁ¿
VAR[IABLE] [variable [NUMBER|CHAR|CHAR (n)|NCHAR|NCHAR (n) |VARCHAR2 (n)|NVARCHAR2 (n)|CLOB|NCLOB|REFCURSOR]]
¶¨ÒåÒ»¸ö°ó¶¨±äÁ¿£¬¸Ã±äÁ¿¿ÉÒÔÔÚpl/sqlÖÐÒýÓá£
¿ÉÒÔÓÃprintÃüÁîÏÔʾ¸Ã°ó¶¨±äÁ¿µÄÐÅÏ¢¡£
2¡¢oracle ÖУ¬¶ÔÓÚÒ»¸öÌá½»µÄsqlÓï¾ä,´æÔÚÁ½ÖÖ¿ÉÑ¡µÄ½âÎö¹ý³Ì, Ò»ÖÖ½Ð×öÓ²½âÎö,Ò»ÖÖ½Ð×öÈí½âÎö.
Ò»¸öÓ²½âÎöÐèÒª¾½âÎö,ÖÆ¶¨Ö´Ðз¾¶,ÓÅ»¯·ÃÎʼƻ®µÈÐí¶àµÄ²½Öè.Ó²½âÊͲ»½ö½öºÄ·Ñ´óÁ¿µÄcpu£¬¸üÖØÒªµÄÊÇ»áÕ¼¾ÝÖØÒªµÄÃÇãÅ£¨latch£©×ÊÔ´£¬ÑÏÖØµÄÓ°ÏìϵͳµÄ¹æÄ£µÄÀ©´ó£¨¼´ÏÞÖÆÁËϵͳµÄ²¢·¢ÐУ©£¬ ¶øÇÒÒýÆðµÄÎÊÌâ²»ÄÜͨ¹ýÔö¼ÓÄÚ´æÌõºÍcpuµÄÊýÁ¿À´½â¾ö¡£
Ö®ËùÒÔÕâÑùÊÇÒòΪÃÅãÅÊÇΪÁË˳Ðò·ÃÎÊÒÔ¼°ÐÞ¸ÄһЩÄÚ´æÇøÓò¶øÉèÖõģ¬ÕâЩÄÚ´æÇøÓòÊDz»Äܱ»Í¬Ê±Ð޸ġ£µ±Ò»¸ösqlÓï¾äÌá½»ºó£¬oracle»áÊ×Ïȼì²éһϹ²Ïí»º³å³Ø£¨shared pool£©ÀïÓÐûÓÐÓëÖ®ÍêÈ«ÏàͬµÄÓï¾ä£¬Èç¹ûÓеϰֻÐëÖ´ÐÐÈí·ÖÎö¼´¿É£¬·ñÔò¾ÍµÃ½øÐÐÓ²·ÖÎö¡£
¶øÎ¨Ò»Ê¹µÃoracle Äܹ»Öظ´ÀûÓÃÖ´Ðмƻ®µÄ·½·¨¾ÍÊDzÉÓð󶨱äÁ¿¡£°ó¶¨±äÁ¿µÄʵÖʾÍÊÇÓÃÓÚÌæ´úsqlÓï¾äÖеij£Á¿µÄÌæ´ú±äÁ¿¡£°ó¶¨±äÁ¿Äܹ»Ê¹µÃÿ´ÎÌá½»µÄsqlÓï¾ä¶¼ÍêȫһÑù¡£
°ó¶¨±äÁ¿Ö»ÊÇÆðµ½Õ¼Î»µÄ×÷Óã¬Í¬ÃûµÄ°ó¶¨±äÁ¿²¢²»Òâζ×ÅÔÚËüÃÇÊÇͬÑùµÄ£¬ÔÚ´«µÝʱҪ¿¼ÂǵÄÊÇ´«µÝµÄÖµÓë°ó¶¨±äÁ¿³öÏÖ˳ÐòµÄ¶Ô룬¶ø²»Êǰ󶨱äÁ¿µÄÃû³Æ¡£
°ó¶¨±äÁ¿ÊÇÔÚͨ³£Çé¿öÏÂÄÜÌáÉýЧÂÊ£¬·ÇÕý³£µÄÇé¿öÈçÏ£º
ÔÚ×Ö¶Î(°üÀ¨×ֶμ¯)½¨ÓÐË÷Òý£¬ÇÒ×Ö¶Î(¼¯)µÄ¼¯µÄÊÆ·Ç³£´ó£¨Ò²¾ÍÊÇÓиöÖµÔÚ×Ö¶ÎÖгöÏֵıÈÀýÌØ±ðµÄ´ó£©µÄÇé¿öÏ£¬Ê¹Óð󶨱äÁ¿¿ÉÄܻᵼÖ²éѯ¼Æ»®´íÎó£¬Òò¶ø»áʹ²éѯЧÂʷdz£µÍ¡£ÕâÖÖÇé¿ö×îºÃ²»ÒªÊ¹Óð󶨱äÁ¿¡£
µ«ÊDz¢²»ÊÇÈκÎÇé¿ö϶¼ÐèҪʹÓð󶨱äÁ¿£¬ÏÂÃæÊÇÁ½ÖÖÀýÍâÇé¿ö£º
1£®¶ÔÓÚ¸ôÏ൱һ¶Îʱ¼ä²ÅÖ´ÐÐÒ»´ÎµÄSQLÓï¾ä£¬ÕâÊÇÀûÓð󶨱äÁ¿µÄºÃ´¦»á±»²»ÄÜÓÐЧÀûÓÃÓÅ»¯Æ÷¶øµÖÏû
2£®Êý¾Ý²Ö¿âµÄÇé¿öÏ¡£
°ó¶¨±äÁ¿²»Äܵ±×÷ǶÈëµÄ×Ö·û´®À´Ê¹Óã¬Ö»Äܵ±×÷Óï¾äÖеıäÁ¿À´Óᣲ»ÄÜÓð󶨱äÁ¿À´´úÌæ±íÃû¡¢¹ý³ÌÃû¡¢×Ö¶ÎÃûµÈ.
´ÓЧÂÊÀ´¿´£¬ÓÉÓÚoracle10G·ÅÆúÁËRBO£¬È«ÃæÒýÈëCBO£¬Òò´Ë£¬ÔÚ10GÖÐʹÓð󶨱äÁ¿Ð§ÂʵÄÌáÉý±È9iÖиüΪÃ÷ÏÔ¡£
¾ÙÀý£º
ÆÕͨsqlÓï¾ä£º
SELECT fname, lname, pcode from cust WHERE id = 674;
SELECT fname, lname, pcode from cust WHERE id = 234;
SELECT fname, lname, pcode from cust WHERE id = 332;
º¬°ó¶¨±äÁ¿µÄsql Óï¾ä£º
SELECT fname, lname, pcode from cust WHERE id = :cust_no;
Sql*plu
Ïà¹ØÎĵµ£º
ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬ÔÀ´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......
ODP.NET 11gÊÇOracle¹«²¼µÄ¹©.NET³ÌÐò·ÃÎÊOracleÊý¾Ý¿âµÄADO.NET×é¼þ£¬±È΢Èí×Ô´øµÄOracle×é¼þÐÔÄܺ㬸ü¿ÉÒÔ·ÃÎÊUDT(User Defined Type)²¿À࣬Procedure£¬REFÖ®Àà¸ß¼¶OracleÌØÕ÷¡£
¡¡¡¡.NET 1.1µÄ¿Í»§¶Ë¼±ÐèµÄ¹«²¼×ÊÁÏÈç´Î£º
¡¡¡¡¡ôOracle.DataAccess.dll (odt111odp.netinÒ».x)
¡¡¡¡¡ôOraOps11.dll £¨odt111in£© ......
ORACLEµÄÒ»¸öÊý¾ÝÎļþµÄ×î´óÖµÊǶàÉÙÄØ£¿
ÎÒÃÇÖªµÀORACLEµÄ×îСµÄÎïÀíµ¥Î»ÊÇBLOCK£¬Êý¾ÝÎļþµÄ×é³ÉµÄ×îÖÕÐÎʽҲÊÇblock£¬ÄÇôÊý¾ÝÎļþµÄ´óСÏÞÖÆ¾ÍÓ¦¸ÃÊÇblockÊýÁ¿µÄÏÞÖÆ£¬ÄÇô¾¿¾¹blockµÄÊýÁ¿ÓкÎÏÞÖÆ£¬ÕâÀï¾ÍÒªÌáµ½Ò»¸öORACLEÄÚ²¿ÊõÓïDBA(´Ëdba·ÇÊý¾Ý¿â¹ÜÀíÔ±£¬¶øÊÇdata block address)
Extent 0 &n ......
¿´À´ÓеÄÈË»¹ÊǶÔschemaµÄÕæÕýº¬Ò岻̫Àí½â£¬ÏÖÔÚÎÒÔÙ´ÎÕûÀíÁËһϣ¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
ÎÒÃÇÏÈÀ´¿´Ò»ÏÂËûÃǵ͍Ò壺
A schema is a collection of database objects (used by a user.).
Schema objects are the logical structures that directly refer to the database’s data.
A user is a name defined in ......
ǰÑÔ£º
sql_trace ÊÇÎÒÔÚ¹¤×÷Öо³£ÒªÓõ½µÄµ÷ÓŹ¤¾ß£¬Ïà±È½Ïstatspack ÎÒ¸üÔ¸ÒâÓÃÕâ¸ö¹¤¾ß¡£
ÒòΪÊý¾Ý¿âÂýÔÒòµÄ85%ÒÔÉÏÊÇÓÉÓÚsqlÎÊÌâÔì³ÉµÄ£¬statspackûÓÐsqlµÄÖ´Ðмƻ®¡£ÏÔʾûÓÐËüÖ±¹Û£¬·½±ã£¬¶ÔÏëÒªÕë¶ÔÐÔ²»Ç¿£¬
1£¬½éÉÜÊý¾Ý¿âµ÷ÓÅÐèÒª¾³£»áÓõ½µÄ¹¤¾ß ......