Oracle´æ´¢¹ý³Ì×ܽá
1¡¢´´½¨´æ´¢¹ý³Ì
create or replace procedure test(var_name_1 in type,var_name_2 out type) as
--ÉùÃ÷±äÁ¿(±äÁ¿Ãû ±äÁ¿ÀàÐÍ)
begin
--´æ´¢¹ý³ÌµÄÖ´ÐÐÌå
end test;
´òÓ¡³öÊäÈëµÄʱ¼äÐÅÏ¢
E.g:
create or replace procedure test(workDate in Date) is
begin
dbms_output.putline('The input date is:'||to_date(workDate,'yyyy-mm-dd'));
end test;
2¡¢±äÁ¿¸³Öµ
±äÁ¿Ãû := Öµ;
E.g£º
create or replace procedure test(workDate in Date) is
x number(4,2);
begin
x := 1;
end test;
3¡¢ÅжÏÓï¾ä:
if ±È½Ïʽ then begin end; end if;
E.g
create or replace procedure test(x in number) is
begin
if x >0 then
begin
x := 0 - x;
end;
end if;
if x = 0 then
begin
x: = 1;
end;
end if;
end test;
4¡¢For Ñ»·
For ... in ... LOOP
--Ö´ÐÐÓï¾ä
end LOOP;
(1)Ñ»·±éÀúÓαê
create or replace procedure test() as
Cursor cursor is select name from student; name varchar(20);
begin
for name in cursor LOOP
begin
dbms_output.putline(name);
end;
end LOOP;
end test;
(2)Ñ»·±éÀúÊý×é
create or replace procedure test(varArray in myPackage.TestArray) as
--(ÊäÈë²ÎÊývarArray ÊÇ×Ô¶¨ÒåµÄÊý×éÀàÐÍ£¬¶¨Ò巽ʽ¼û±êÌâ6)
i number;
begin
i := 1; --´æ´¢¹ý³ÌÊý×éÊÇÆðʼλÖÃÊÇ´Ó1¿ªÊ¼µÄ£¬Óëjava¡¢C¡¢C++µÈÓïÑÔ²»Í¬¡£ÒòΪÔÚOracleÖб¾ÊÇûÓÐÊý×éµÄ¸ÅÄîµÄ£¬Êý×éÆäʵ¾ÍÊÇÒ»ÕÅ
--±í(Table),ÿ¸öÊý×éÔªËØ¾ÍÊDZíÖеÄÒ»¸ö¼Ç¼£¬ËùÒÔ±éÀúÊý×éʱ¾ÍÏ൱ÓÚ´Ó±íÖеĵÚÒ»Ìõ¼Ç¼¿ªÊ¼±éÀú
for i in 1..varArray.count LOOP
dbms_output.putline('The No.'|| i || 'record in varArray is:'||varArray(i));
end LOOP;
end test;
5¡¢While Ñ»·
whi
Ïà¹ØÎĵµ£º
ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©ÄØ£¬ÀýÈ磺
SQL> desc test;
Name Type Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y &nb ......
// Ö´ÐÐÌø¹ý£¬Ìø¹ýµÄ½á¹ûÔÚ
execute dbms_logstdby.skip(stmt => 'DML',schema_name => '%', object_name => '%');
stmtµÄȡֵ¿ÉÒÔÊÇ£º
http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10802/d_lsbydb.htm#997290
// Ìø¹ýµÄÄÚÈݼÇÔØÔÚÏÂÃæ
select * from dba_logstdby_skip
......
Oracle log files : An introduction
The Oracle server maintains the redo Oracle log files to minimize the loss of data in the Database in case of an uncontrolled shutdown.
Online redo Oracle log files are filled with redo records. A redo record, also called a redo entry, is made up of a gr ......
½üÀ´½ÓÁ˸ö¼òµ¥µÄϵͳ×ö£¬Íâ°üµÄ£¬ÓõÄÊý¾Ý¿âÊÇoracle8i,
Ò»¿ªÊ¼ÎÒʹÓà ojdbc6.jarÀ´×öÁ¬½Ó£¬Á¬²»ÉÏ£¬ÕÒÒ»·¬£¬ÔÀ´¹Ù·½oracle8i³öµÄÇý¶¯Ö»ÓÐ class12.jar ºÍclass14.jar ,×îÒªÃüµÄÊDz»Ö§³Öjdk1.4¼°1.4ÒÔÉϵ쬹¤×÷Á¿ÂíÉϾÍÉÏÀ´ÁË¡£²»¸ÊÐİ¡¡£
×îºóÊÔÁËÏ£¬ÄÜÓõÄÖ»ÓÐojadb14.jar £¬Á¬ÉÏÁË£¬²»¹ýͨ¹ýhibernateÉú³ÉµÄsqlÊµÔ ......
1£®top
topÃüÁî¿ÉʵʱµØÏÔʾLinuxϵͳµÄ½ø³Ì¡¢CPU¡¢ÄÚ´æ¡¢¸ºÔصȵÄÐÅÏ¢¡£ËüÊÇÎÒÃÇÁ˽âϵͳÕûÌå״̬×îºÃµÄ¹¤¾ß¡£
topÃüÁîµÄÔËÐÐ״̬ÊÇÒ»¸öʵʱµÄÏÔʾ¹ý³Ì£¬ÎÒÃÇ¿ÉÔÚÕâ¸ö½çÃæ¼à¿ØÏµÍ³ÔËÐÐÇé¿ö¡£ÎÒÃÇ¿Éͨ¹ý¼¸¸ö°´¼üÀ´¿ØÖÆtopÃüÁÈç°´q¿ÉÍ˳ötopÃüÁî״̬£¬°´s¿ÉÊäÈëÐÅÏ¢µÄ¸üÐÂÆµÂʵȡ£ÕâЩÃüÁî¿É°´h°ïÖú¼ü²éѯ¡£
2£®Ps ......