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

Oracle´æ´¢¹ý³Ì½Ì³Ì


Ò»¸ö¼òµ¥µÄoracle·ÖÒ³´æ´¢¹ý³ÌµÄʵÏֺ͵÷Óá£ÔÚ¿´ÁËÖÚ¶àµÄ·ÖÒ³´æ´¢¹ý³ÌÒÔºó·¢ÏÖ¶¼ÊÇÕë¶ÔsqlserverµÄ£¬¶øûÓÐoracleµÄ£¬Òò´ËÏëдһ¸ö¹ØÓÚoracleµÄ´æ´¢¹ý³Ì£¬ÒòΪÎÒÓõ½µÄÊý¾Ý¿âÊÇoracle¡£
Oracle·ÖÒ³´æ´¢¹ý³ÌµÄ˼·ÓÚsqlserverµÄ˼·ÊÇÒ»ÑùµÄ£¬µ«ÊÇÎÒÕâÀï×öÁ˵ã¸Ä¶¯£¬ÔÚÒòΪOracleµÄÓï·¨ºÍ¹æÔòµÄ²»Í¬ËùÒÔ£¬Oracle·ÖÒ³´æ´¢¹ý³Ì¿´ÉÏÈ¥Óе㲻һÑù¡£¼ûЦ£¬¼ûЦ£¡
ÔÚOracleµÄ´æ´¢¹ý³ÌÖзµ»Ø¼Ç¼¼¯£¬ÐèÒªÓõ½Óαê±äÁ¿£¬Oracle²»ÄÜÏñsqlserverÄÇÑù¿ÉÒÔÖ±½Ó·µ»ØÒ»¸ö¼Ç¼¼¯¡£
ÓÉÓÚÉèÏëÔÚ.netÖаѸ´ÔÓµÄsqlÓï¾äÉú³É£¬ËùÒÔÔÚ´æ´¢¹ý³ÌÖÐûÓÐÈ¥¿¼ÂÇÉú³ÉsqlÓï¾äµÄÎÊÌâ¡£
ÒÔÏÂÊÇÔÚOracleÖÐʵÏֵķÖÒ³´æ´¢¹ý³Ì¡£
 create or replace package DotNet is
-- Author : good_hy
-- Created : 2004-12-13 13:30:30
-- Purpose :

TYPE type_cur IS REF CURSOR; --¶¨ÒåÓαê±äÁ¿ÓÃÓÚ·µ»Ø¼Ç¼¼¯
PROCEDURE DotNetPagination(
Pindex in number, --·ÖÒ³Ë÷Òý
Psql in varchar2, --²úÉúdatasetµÄsqlÓï¾ä
Psize in number, --Ò³Ãæ´óС
Pcount out number, --·µ»Ø·ÖÒ³×ÜÊý
v_cur out type_cur --·µ»Øµ±Ç°Ò³Êý¾Ý¼Ç¼
);

procedure DotNetPageRecordsCount(
Psqlcount in varchar2, --²úÉúdatasetµÄsqlÓï¾ä
Prcount out number --·µ»Ø¼Ç¼×ÜÊý
);

end DotNot;
create or replace package body DotNet is
--***************************************************************************************
PROCEDURE DotNetPagination(
Pindex in number,
Psql in varchar2,
Psize in number,
Pcount out number,
v_cur out type_cur
)
AS
v_sql VARCHAR2(1000);
v_count number;
v_Plow number;
v_Phei number;
Begin
------------------------------------------------------------È¡·ÖÒ³×ÜÊý
v_sql := 'select count(*) from (' || Psql || ')';
execute immediate v_sql into v_count;
Pcount := ceil(v_count/Psize);
------------------------------------------------------------ÏÔʾÈÎÒâÒ³ÄÚÈÝ
v_Phei := Pindex * Psize + Psize;
v_Plow := v_Phei - Psize + 1;
--Psql := 'select rownum rn,t.* from c


Ïà¹ØÎĵµ£º

oracle forallÓï¾ä

 FORALLÓï¾äµÄÒ»¸ö¹Ø¼üÐԸĽø£¬Ëü¿É´ó´ó¼ò»¯´úÂ룬²¢ÇÒ¶ÔÓÚÄÇЩҪÔÚPL/SQL³ÌÐòÖиüкܶàÐÐÊý¾ÝµÄ³ÌÐòÀ´Ëµ£¬Ëü¿ÉÏÔÖøÌá¸ßÆäÐÔÄÜ¡£
1:
ÓÃFORALLÀ´ÔöÇ¿DMLµÄ´¦ÀíÄÜÁ¦
OracleΪOracle8iÖеÄPL/SQLÒýÈëÁËÁ½¸öеÄÊý¾Ý²Ù×ÝÓïÑÔ£¨DML£©Óï¾ä£ºBULK COLLECTºÍFORALL¡£ÕâÁ½¸öÓï¾äÔÚPL/SQLÄÚ²¿½øÐÐÒ»ÖÖÊý×é´¦Àí
£»BULK COLLE ......

Oracle AWR ½éÉÜ

Oracle Database 10g ÌṩÁËÒ»¸öÏÔÖø¸Ä½øµÄ¹¤¾ß£º×Ô¶¯¹¤×÷¸ºÔØÐÅÏ¢¿â (AWR:Automatic Workload Repository)¡£Oracle ½¨ÒéÓû§ÓÃÕâ¸öÈ¡´ú Statspack¡£AWR ʵÖÊÉÏÊÇÒ»¸ö Oracle µÄÄÚÖù¤¾ß£¬Ëü²É¼¯ÓëÐÔÄÜÏà¹ØµÄͳ¼ÆÊý¾Ý£¬²¢´ÓÄÇЩͳ¼ÆÊý¾ÝÖе¼³öÐÔÄÜÁ¿¶È£¬ÒÔ¸ú×ÙDZÔÚµÄÎÊÌâ¡£Óë Statspack ²»Í¬£¬¿ìÕÕÓÉÒ»¸ö³ÆΪ MMON µÄеĺó ......

ÈçºÎÕýȷɾ³ýORACLE¹éµµÈÕÖ¾Îļþ

 ÎÒÃǶ¼¶¼ÖªµÀÔÚcontrolfileÖмǼ×Åÿһ¸öarchivelogµÄÏà¹ØÐÅÏ¢£¬µ±È»ÃÇÔÚOSÏ°ÑÕâЩÎïÀíÎļþdeleteµôºó£¬ÔÚÎÒÃǵÄ
controlfileÖÐÈÔÈ»¼Ç¼×ÅÕâЩarchivelogµÄÐÅÏ¢£¬ÔÚoracleµÄOEM¹ÜÀíÆ÷ÖÐÓпÉÊÓ»¯µÄÈÕÖ¾Õ¹ÏÖ³ö£¬µ±ÎÒÃÇÊÖ¹¤Çå³ýarchiveĿ¼ÏµÄÎļþºó£¬ÕâЩ¼Ç¼²¢Ã»Óб»ÎÒÃÇ´ÓcontrolfileÖÐÇå³ýµô£¬Ò²¾ÍÊÇoracle²¢²» ......

OracleÊý¾Ý¿â½µµÍHWMµÄ¼¸ÖÖ·½·¨

HWMÊÇoracleÖÐblockÓÐûÓÐʹÓõķֽçÏߣ¬Ëü»áËæ×ÅÊý¾ÝµÄinsert¶øÉÏÉý£¬µ«Ëü²¢²»»áËæÊý¾ÝµÄdelete¶øϽµ£¬Òò´ËÈ«±íɨÃèµÄʱ¼ä²¢²»ÒòÊý¾ÝµÄdelete¶ø¼õÉÙ£¬Ïà·´¿ÉÄÜÓÉÓÚ¿éÇå³ý·´¶øÈ«±íɨÃèʱ¼äÔö¼Ó£¬¿ÉÒÔÓÃÏÂÃæ·½·¨µÄÈÎÒ»Ò»ÖÖÀ´½µµÍHWM£º
µÚÒ»ÖÖ£ºshrink
ÊÊÓÃÓÚ10gÒÔºóµÄ°æ±¾£¬Ç°ÌáÊÇÕâ¸ö±í£¬Ë÷Òý£¬ÎﻯÊÓͼ»òÎﻯÊÓͼlogËùÔ ......

oracle±í¿Õ¼ä²Ù×÷

-½¨Á¢±í¿Õ¼ä(oracleÖеÄtablespace(±í¿Õ¼ä)¾ÍÏ൱ÓÚsqlserverµÄdatabase)
CREATE TABLESPACE data01
DATAFILE 'D:\oracle\ora92\oradata\db\DATA01.dbf' SIZE 200M
UNIFORM SIZE 128k;
#Ö¸¶¨Çø³ß´çΪ128k,Èç²»Ö¸¶¨£¬Çø³ß´çĬÈÏΪ64k
--½¨Á¢ÁÙʱ±í¿Õ¼ä
CREATE TEMPORARY TABLESPACE temp_data
TEMPFILE 'D:\TEMP_DA ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ