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

ORACLE±í¿Õ¼ä¼°Æäά»¤

»ù±¾¸ÅÄî
ORACLEÊý¾Ý¿â±»»®·Ö³É³Æ×÷Ϊ±í¿Õ¼äµÄÂß¼­ÇøÓò——ÐγÉORACLEÊý¾Ý¿âµÄÂß¼­½á¹¹¡£Ò»
¸öORACLEÊý¾Ý¿âÄܹ»ÓÐÒ»¸ö»ò¶à¸ö±í¿Õ¼ä,¶øÒ»¸ö±í¿Õ¼äÔò¶ÔÓ¦×ÅÒ»¸ö»ò¶à¸öÎïÀíµÄÊý¾Ý¿â
Îļþ¡£±í¿Õ¼äÊÇORACLEÊý¾Ý¿â»Ö¸´µÄ×îСµ¥Î»,ÈÝÄÉ×ÅÐí¶àÊý¾Ý¿âʵÌå,Èç±í¡¢ÊÓͼ¡¢Ë÷Òý
¡¢¾Û´Ø¡¢»ØÍ˶κÍÁÙʱ¶ÎµÈ¡£
ÿ¸öORACLEÊý¾Ý¿â¾ùÓÐSYSTEM±í¿Õ¼ä,ÕâÊÇÊý¾Ý¿â´´½¨Ê±×Ô¶¯´´½¨µÄ¡£SYSTEM±í¿Õ¼ä
±ØÐë×ÜÒª±£³ÖÁª»ú,ÒòΪÆä°üº¬×ÅÊý¾Ý¿âÔËÐÐËùÒªÇóµÄ»ù±¾ÐÅÏ¢(¹ØÓÚÕû¸öÊý¾Ý¿âµÄÊý¾Ý×Ö
µä¡¢Áª»úÇóÖú»úÖÆ¡¢ËùÓлØÍ˶Ρ¢ÁÙʱ¶ÎºÍ×ԾٶΡ¢ËùÓеÄÓû§Êý¾Ý¿âʵÌå¡¢ÆäËüORACLE
Èí¼þ²úÆ·ÒªÇóµÄ±í)¡£
Ò»¸öСÐÍÓ¦ÓõÄORACLEÊý¾Ý¿âͨ³£½ö°üÀ¨SYSTEM±í¿Õ¼ä,È»¶øÒ»¸öÉÔ´óÐÍÓ¦ÓõÄORACL
EÊý¾Ý¿â²ÉÓöà¸ö±í¿Õ¼ä»á¶ÔÊý¾Ý¿âµÄʹÓôøÀ´¸ü´óµÄ·½±ã¡£
×÷ÓÃ
±í¿Õ¼äµÄ×÷ÓÃÄÜ°ïÖúDBAÓû§Íê³ÉÒÔϹ¤×÷:
1.¾ö¶¨Êý¾Ý¿âʵÌåµÄ¿Õ¼ä·ÖÅä;
2.ÉèÖÃÊý¾Ý¿âÓû§µÄ¿Õ¼ä·Ý¶î;
3.¿ØÖÆÊý¾Ý¿â²¿·ÖÊý¾ÝµÄ¿ÉÓÃÐÔ;
4.·Ö²¼Êý¾ÝÓÚ²»Í¬µÄÉ豸֮¼äÒÔ¸ÄÉÆÐÔÄÜ;
5.±¸·ÝºÍ»Ö¸´Êý¾Ý¡£
Óû§´´½¨ÆäÊý¾Ý¿âʵÌåʱÆä±ØÐëÓÚ¸ø¶¨µÄ±í¿Õ¼äÖоßÓÐÏàÓ¦µÄȨÁ¦,ËùÒÔ¶ÔÒ»¸öÓû§À´
˵,ÆäÒª²Ù×ÝÒ»¸öORACLEÊý¾Ý¿âÖеÄÊý¾Ý,Ó¦¸Ã:
1.±»ÊÚÓè¹ØÓÚÒ»¸ö»ò¶à¸ö±í¿Õ¼äÖеÄRESOURCEÌØȨ;
2.±»Ö¸¶¨È±Ê¡±í¿Õ¼ä;
3.±»·ÖÅäÖ¸¶¨±í¿Õ¼äµÄ´æ´¢¿Õ¼äʹÓ÷ݶî;
4.±»Ö¸¶¨È±Ê¡ÁÙʱ¶Î±í¿Õ¼ä¡£
ά»¤
±í¿Õ¼äµÄά»¤ÊÇÓÉORACLEÊý¾Ý¿âϵͳ¹ÜÀíÔ±DBAͨ¹ýSQL*PLUSÓï¾äʵÏÖµÄ,ÆäÖбí¿Õ¼ä
´´½¨ÓëÐÞ¸ÄÖеÄÎļþÃûÊDz»ÄÜ´ø·¾¶µÄ,Òò´ËDBA±ØÐëÔÚORACLE/DBSĿ¼ÖвÙ×÷¡£
1.бí¿Õ¼äµÄ´´½¨
Óï·¨¸ñʽ:CREATE TABLESPACE ±í¿Õ¼äÃû
DATAFILE Îļþ±êʶ·û[,Îļþ±êʶ·û]...
[DEFAULT STORAGE(´æ´¢ÅäÖòÎÊý)]
[ONLINE\OFFLINE];
ÆäÖÐ:Îļþ±êʶ·û=’ÎļþÃû’[SIZEÕûÊý[K\M][REUSE]
2.Ð޸ıí¿Õ¼äÅäÖÃ
Óï·¨¸ñʽ:ALTER TABLESPCE ±í¿Õ¼äÃû
(ADD DATAFILE Îļþ±êʶ·û[,Îļþ±êʶ·û]...
\RENAME DATAFILE ’ÎļþÃû’[,’ÎļþÃû’]...
TO ’ÎļþÃû’[,’ÎļþÃû’]...
\DEFAULT STORAGE(´æ´¢ÅäÖòÎÊý)
\ONLINE\OFFLINE[NORMAL\IMMEDIATE]
\(BEGIN\END)BACKUP);
3.È¡Ïû±í¿Õ¼ä
Óï·¨¸ñʽ:DROP TABLESPACE±í¿Õ¼äÃû[INCLUDING CONTENTS];
4.¼ì²é±í¿Õ¼äʹÓÃÇé¿ö
(1)¼ì²éµ±Ç°Óû§¿Õ¼ä·ÖÅäÇé¿ö
SELECT tablespace_name,SUM(extents),SUM(blocks),SUM(bytes)
from user_segments
GROUP BY tablespace_


Ïà¹ØÎĵµ£º

ÔÚORACLEºÍsql serverÖмòµ¥±¸·ÝtableµÄ·½·¨

Èç¹ûtemp_t1²»´æÔÚ£¬
oracle:
create table temp_t1
as
select * from t1
sql server:
select * into temp_t1 from t1
Èç¹ûtemp_t1´æÔÚ£¬
oracle:
insert into table temp_t1
select * from t1
sql server:
insert into table temp_t1
select * from t1 ......

Oracle Exception

 1) »ù±¾½á¹¹
  BEGIN
    ... --Óï¾ä
  EXCEPTION -- ÀýÍâ´¦Àí
    WHEN ...
    ...
    WHEN OTHERS
      ...
  END;
  2) ³£ÓÃÔ¤¶¨ÒåÀýÍâ
  EXCEPTION
    WHEN CU ......

Oracle¼ì²é¶ÔÏó[µÚ°ËÕ±ʼÇ]

 
Oracle ¼ì²é¶ÔÏó
8.3. Oracle¶ÔÏóµÄ״̬
¹²·ÖÁù¸ö²¿·Ö£¬·Ö±ðΪ£º¼ì²éOracle¿ØÖÆÎļþ״̬£»¼ì²éOracleÔÚÏßÈÕ־״̬£»¼ì²éOracle±í¿Õ¼äµÄ״̬£»¼ì²éOracleËùÓÐÊý¾ÝÎļþ״̬£»¼ì²éOracleËùÓÐ±í¡¢Ë÷Òý¡¢´æ´¢¹ý³Ì¡¢´¥·¢Æ÷¡¢°üµÈ¶ÔÏóµÄ״̬£»¼ì²éOracleËùÓлعö¶ÎµÄ״̬¡£
8.3.1. Oracle¿ØÖÆÎļþ״̬
¼ì²é¿ØÖÆÎļþ×´Ì ......

OracleÖ®¹ÜÀí½ÇÉ«


 
Ô¤¶¨Òå½ÇÉ«ÊÇoracleÌṩµÄ½ÇÉ«,ÕâЩ½ÇÉ«ÊÇÔÚ½¨Á¢Êý¾Ý¿â,°²×°Êý¾Ý×ÖµäÊÓͼºÎPL/SQL°üʱ½¨Á¢µÄ,²¢ÇÒÿÖÖ½ÇÉ«¶¼ÓÃÓÚÖ´ÐÐһЩÌض¨¹ÜÀíÈÎÎñ.
1,CONNECT½ÇÉ«
CONNECT½ÇɫʱÔÚ½¨Á¢Êý¾Ý¿âʱ,oracleÖ´Ðнű¾SQL.BSQ×Ô¶¯½¨Á¢µÄ½ÇÉ«,¸Ã½ÇÉ«¾ßÓÐÓ¦Óÿª·¢ÈËÔ±ËùÐèµÄ¶àÊýȨÏÞ.CONNECT½ÇÉ«¾ßÓеÄËùÓÐϵͳȨÏÞÈçÏÂ:
ALTER SESS ......

Oracle Êý¾Ý¿âÔÚarchivelogģʽÏÂÎļþ¶ªÊ§µÄ»Ö¸´

step1
ÔÚÁª»úʱ×ö±¸·Ý(»ùÓÚ»Ö¸´Ä¿Â¼µÄ±¸·Ý£¬×öÁË¿ØÖÆÎļþµÄ×Ô¶¯±¸·Ý)£¬°üÀ¨ËùÓÐÊý¾ÝÎļþ¼°¹éµµµÄÈÕÖ¾Îļþ£º
rman>run{
backup format 'c:\bak\test_full_%u' database;
sql 'alter system archive log current';
backup format 'c:\bak\test_log_%u' archivelog all delete input;
}
step2
sql>insert into l ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ