¹Ø±ÕÊý¾Ý¿â(Ô®ÒýOracleÁª»úÎĵµ)
Close a Database
When you close a database, Oracle writes all database data and recovery data in the SGA to the datafiles and redo log files, respectively. Next, Oracle closes all online datafiles and redo log files. (Any offline datafiles of any offline tablespaces have been closed already. If you subsequently reopen the database, any tablespace that was offline and its datafiles remain offline and closed, respectively.) At this point, the database is closed and inaccessible for normal operations. The control files remain open after a database is closed but still mounted.
Close the Database by Terminating the Instance
In rare emergency situations, you can terminate the instance of an open database to close and completely shut down the database instantaneously. This process is fast, because the operation of writing all data in the buffers of the SGA to the datafiles and redo log files is skipped. The subsequent reopening of the database requires recovery, which Oracle performs automatically.
Note:
If a system or power failure occurs while the database is open, then the instance is, in effect, terminated, and recovery is performed when the database is reopened.
Unmount a Database
After the database is closed, Oracle unmounts the database to disassociate it from the instance. At this point, the instance remains in the memory of your computer.
After a database is unmounted, Oracle closes the control files of the database.
Shut Down an Instance
The final step in database shutdown is shutting down the instance. When you shut down an instance, the SGA is removed from memory and the background processes are terminated.
Abnormal Instance Shutdown
In unusual circumstances, shutdown of an instance might not occur cleanly; all memory structures might not be removed from memory or one of the background processes might not be terminated. When remnants of a previous instance exist, a subsequent instance startup most likely will fail. In such situations, the database a
Ïà¹ØÎĵµ£º
Oracle LongÐÍ
1¡¢LONG Êý¾ÝÀàÐÍÖд洢µÄÊǿɱ䳤×Ö·û´®£¬×î´ó³¤¶ÈÏÞÖÆÊÇ2GB¡£
2¡¢¶ÔÓÚ³¬³öÒ»¶¨³¤¶ÈµÄÎı¾£¬»ù±¾Ö»ÄÜÓÃLONGÀàÐÍÀ´´æ´¢£¬Êý¾Ý×ÖµäÖкܶà¶ÔÏóµÄ¶¨Òå¾ÍÊÇÓÃLONGÀ´´æ´¢µÄ¡£
3¡¢LONGÀàÐÍÖ÷ÒªÓÃÓÚ²»ÐèÒª×÷×Ö·û´®ËÑË÷µÄ³¤´®Êý¾Ý£¬Èç¹ûÒª½øÐÐ×Ö·ûËÑË÷¾ÍÒªÓÃvarchar2ÀàÐÍ¡£
4¡¢ºÜ¶à¹¤¾ß£¬°üÀ¨SQL*Plus£¬´ ......
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: ......
1.»ù±¾½á¹¹
CREATE OR REPLACE PROCEDURE ´æ´¢¹ý³ÌÃû×Ö
(
²ÎÊý1 IN NUMBER,
²ÎÊý2 IN NUMBER
) IS
±äÁ¿1 INTEGER :=0;
±äÁ¿2 DATE;
BEGIN
END ´æ´¢¹ý³ÌÃû×Ö
2.SELECT INTO STATEMENT
½«select²éѯµÄ½á¹û´æÈëµ½±äÁ¿ÖУ¬¿ÉÒÔͬʱ½«¶à¸öÁд洢¶à¸ö±äÁ¿ÖУ¬±ØÐëÓÐÒ»Ì ......
³£ÓõÄÊý¾Ý¿â×Ö¶ÎÀàÐÍÈçÏ£º
×Ö¶ÎÀàÐÍ ÖÐÎÄ˵Ã÷ ÏÞÖÆÌõ¼þ ÆäËü˵Ã÷
CHAR ¹Ì¶¨³¤¶È×Ö·û´® ×î´ó³¤¶È2000 bytes
VARCHAR2 ¿É±ä³¤¶ÈµÄ×Ö·û´® ×î´ó³¤¶È4000 bytes ¿É×öË÷ÒýµÄ×î´ó³¤¶È749
NCHAR ¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö·û´® ×î´ó³¤¶È2000 bytes
NVARCHAR2 ¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¿É±ä³¤¶È×Ö·û´® ×î´ó³¤¶È4000 bytes
DATE È ......
ÒÔÏ»شðÊôÓÚתÔØ£º
¾³£¿´µ½Ò»Ð©ÅóÓÑÎÊORACLE×Ö·û¼¯·½ÃæµÄÎÊÌ⣬ÎÒÏëÒÔµü´úµÄ·½Ê½À´½éÉÜһϡ£
µÚÒ»´Îµü´ú£ºÕÆÎÕ×Ö·û¼¯·½ÃæµÄ»ù±¾¸ÅÄî¡£
ÓÐЩÅóÓÑ¿ÉÄÜ»áÈÏΪÕâÊǶà´ËÒ»¾Ù£¬µ«Êµ¼ÊÉÏÕýÊÇÓÉÓÚ¶ÔÏà¹Ø»ù±¾¸ÅÄî°ÑÎÕ²»Ç壬²Åµ¼ÖÂÁËÖî¶àÎÊÌâºÍÒÉÎÊ¡£
Ê×ÏÈÊÇ×Ö·û¼¯µÄ¸ÅÄî¡£
ÎÒÃÇÖªµÀ£¬µç×Ó¼ÆËã»ú×î³õÊÇÓÃÀ´½øÐпÆѧ¼ÆËãµÄ£¨Ë ......