С²¼ÀÏʦoracleÊÓƵ½²×ù±Ê¼Ç£¨¶þ£©
Oracle Process Structure
Oracle takes advantage of various types of processes:
¡¡—User process: Started at the time a database user requests connection to the Oracle server
—Server process: Connects to the Oracle instance and is started when a user establishes a session
—Background processes: Started when an Oracle instance is started
User Process: A progrm that requests interaction with the Oracle server, Must first establish a connection, Does not interact directly with the Oracle server.
Server Process: A program that directly interacts with the Oracle Server
—Fulfills calls generated and returns results
—Can be deficated or shared server
IPC: Inter Process Communication, °üÀ¨¹²ÏíÄÚ´æ¡¢¶ÓÁС¢ÐźÅÁ¿µÈ¼¸ÖÖÐÎʽ¡£
Background Process
Maintains and enforces relationships between physical and memory structures:
—Mandatory background processes
DBWn PMON CKPT LGWR SMON
—Optional background processes
ARCn LMDn QMNn CJQ0 LMON RECO Dnnn LMS Snnn
LCKn Pnnn
DBWn(Database Writer), DBWn writes when:
—Checkpoint occurs
—Dirty buffers reach threshold
—There are no free buffers
—Timeout occurs
—RAC ping request is made
—Tablespace OFFLINE
—Tablespace READ ONLY
—Table DROP or TRUNCATE
—Tablespace BEGIN BACKUP
Log Witer(LGWN), LGWR writes:
—At commit
—When one-third full
—When there is 1MB of redo
--Every three seconds
--Before DBWn writes
System Monitor(SMON)
Responsibilities
—Instance recovery
—Rolls forward changes in noline redo log files
—Opens database fo
Ïà¹ØÎĵµ£º
ÎÒÔÚhttp://zhidao.baidu.com/question/123262452.html?fr=msg¡¡ÌáµÄÎÊÌ⣬ÕûÀíµ½ÕâÀï¡¡·Ç³£¸Ðл zjwssg
µÄ»Ø´ð
ÅÅÐòÄÚ´æÉæ¼°µ½PGA¡£
ʲôʱºòʹÓÃ×Ô¶¯PGAÄÚ´æ¹ÜÀí£¿Ê²Ã´Ê±ºòʹÓÃÊÖ¶¯PGAÄÚ´æ¹ÜÀí£¿
°×ÌìϵͳÕý³£ÔËÐÐʱÊʺÏʹÓÃ×Ô¶¯PGAÄÚ´æ¹ÜÀí£¬ÈÃOracle¸ù¾Ýµ±Ç°¸ºÔØ×Ô¶¯¹ÜÀí¡¢·ÖÅäPGAÄÚ´æ¡£
Ò¹ÀïÓû§Êý ......
Ç°¶Îʱ¼ä£¬Ð¹«Ë¾µÄÃæÊÔ¹ÙÎÊÁËÒ»¸öÎÊÌ⣬ÁÙʱ±íµÄ×÷Óã¬ÒÔÇ°ÎÒÃÇÓûº´æÖмäÊý¾Ýʱºò£¬¶¼ÊÇ×Ô¼º½¨Ò»¸öÁÙʱ±í¡£Æäʵoracle±¾ÉíÔÚÕâ·½Ãæ¾ÍÒѾ¿¼ÂǺÜÈ«ÁË£¬³ý·ÇÓÐЩ¸ß¼¶Ó¦Óã¬ÎÒÔÙ¿¼ÂÇ×Ô¼º´´½¨ÁÙʱ±í¡£ÓÉÓÚ±¾È˶ÔÁÙʱ±íµÄÁ˽ⲻÊǺܶ࣬ÓÚÊÇ»ØÀ´ËѼ¯ÏÂÕâ·½ÃæµÄ×ÊÁÏ£¬ÃÖ²¹ÏÂÕâ¿éµÄ²»×ã¡£
1¡¢Ç°ÑÔ
......
ÔÚÊý¾Ý²Ö¿â»·¾³ÖУ¬ÎÒÃÇͨ³£ÀûÓÃÎﻯÊÓͼǿ´óµÄ²éѯÖØд¹¦ÄÜÀ´ÌáÉýͳ¼Æ²éѯµÄÐÔÄÜ£¬µ«ÊÇÎﻯÊÓͼµÄ²éѯÖØд¹¦ÄÜÓÐʱºòÎÞ·¨ÖÇÄܵØÅжϲéѯÖÐһЩÏà¹ØÁªµÄÌõ¼þ£¬ÒÔÖÁÓÚÓ°ÏìÐÔÄÜ¡£±ÈÈçÎÒÃÇÓÐÒ»ÕÅÏúÊÛ±ísales£¬ÓÃÓÚ´æ´¢¶©µ¥µÄÏêϸÐÅÏ¢£¬°üº¬½»Ò×ÈÕÆÚ¡¢¹Ë¿Í±àºÅºÍÏúÊÛÁ¿¡£ÎÒÃÇ´´½¨Ò»ÕÅÎﻯÊÓͼ£¬°´Ô´洢ÀÛ¼ÆÏúÁ¿ÐÅÏ¢£¬¼ ......
ÈçºÎ¶¨ÒåÓαêÀàÐÍ
TYPE ref_type_name IS REF CURSOR [RETURN return_type];
ÉùÃ÷Óαê±äÁ¿
cursor_name ref_type_name;
´Ó¼¼Êõµ×²ã¿´£¬Á½ÕßÊÇÏàͬµÄ¡£ÆÕͨplsql cursorÔÚ¶¨ÒåʱÊÇ“¾²Ì¬”µÄ¡£¶øRef cursors¿ÉÒÔ¶¯Ì¬´ò¿ª¡£
ÀýÈçÏÂÃæÀý×Ó£º
Declare
type rc is ref cursor;
cursor c is select * from dual ......