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

OracleÌåϵ½á¹¹Ö®£­Âß¼­½á¹¹

Ò»¡¢Oracle Âß¼­½á¹¹¼ò½é
    oracleµÄÂß¼­½á¹¹°üÀ¨±í¿Õ¼ä(tablespace)£¬¶Î(segment),Êý¾Ý¿é(data block)ÒÔ¼°Ä£Ê½¶ÔÏó(schema)¡£
      oracle Êý¾Ý¿âÔÚÂß¼­ÉÏÊÇÓɶà¸ö±í¼ä×é³ÉµÄ£¬±í¿Õ¼äÖд洢µÄ¶ÔÏó½Ð¶Î£¬±ÈÈçÊý¾Ý¶Î£¬Ë÷Òý¶Î£¬ºÍ»ØÍ˶Ρ£¶ÎÓÉÇø×é³É£¬ÇøÊÇ´ÅÅÌ·ÖÅäµÄ×îСµ¥Î»¡£¶ÎµÄÔö´óÊÇͨ¹ýÔö¼ÓÇøµÄ¸öÊýÀ´ÊµÏֵġ£Ã¿¸öÇøµÄ´óСÊÇÊý¾Ý¿é´óСµÄÕûÊý±¶£¬ÇøµÄ´óС¿ÉÒÔ²»Ïàͬ£»Êý¾Ý¿éÊÇÊý¾Ý¿âÖÐ×îСµÄI/Oµ¥Î»£¬Í¬Ê±Ò²ÊÇÄÚ´æÊý¾Ý»º³åÇøµÄµ¥Î»£¬¼°Êý¾ÝÎļþ´æ´¢¿Õ¼äµ¥Î»¡£¿éµÄ´óСÓɲÎÊýDB_BLOCK_SIZEÉèÖã¬ÆäÖµÓ¦ÉèÖÃΪ²Ù×÷ϵͳ¿é ´óСµÄÕûÊý±¶¡£
    ±í¿Õ¼äÔÚÎïÀíÉÏ°üº¬Ò»¸ö»ò¶à¸öÊý¾ÝÎļþ¡£¶øÊý¾ÝÎļþ´óСÊÇ¿é´óСµÄÕûÊý±¶£»
¶þ¡¢±í¿Õ¼ä
    ±í¿Õ¼äÊÇOracleÊý¾Ý¿â×î´óµÄÂß¼­½á¹¹£¬Ò»¸öOracleÊý¾Ý¿âÔÚÂß¼­ÉÏÓɶà¸ö±í¿Õ¼ä×é³É£¬Ò»¸ö±í¿Õ¼äÖ»Á¥ÊôÓÚÒ»¸öÊý¾Ý¿â¡£OracleÖÐÓÐÒ»¸ö³ÆΪ SYSTEMµÄ±í¿Õ¼ä£¬Õâ¸ö±í¿Õ¼äÊÇÔÚ´´½¨»ò°²×°Êý¾Ý¿âʱ×Ô¶¯´´½¨µÄ¡£Ö÷ÒªÓÃÓڴ洢ϵͳµÄÊý¾Ý×ֵ䣬¹ý³Ì£¬º¯Êý£¬´¥·¢Æ÷µÈ£»Ò²¿ÉÒÔ´æ´¢Óû§µÄ±í£¬Ë÷ÒýµÈ¡£
Ç°ÃæÎÒÃÇ˵¹ýÒª²éѯ±í¿Õ¼ä¿ÉÒÔͨ¹ý
SQL>select * from dba_data_files;
Òª²éѯ±í¿Õ¼äµÄ¿ÕÏÐÐÅÏ¢¿ÉÒÔͨ¹ý
SQL>select * from dba_free_space;
±í¿Õ¼äÓÐÔÚÏß(online)»òÀëÏß(offline)֮˵£¬Ò»µ©ÎÒÃǽ«±í¿Õ¼äÉèÖóÉÀëÏßµÄ״̬£¬ÔòËùÓжԸñí¿Õ¼äÄÚ¶ÔÏóµÄÐ޸Ľ«ÎÞ·¨Í¬²½µ½Êý¾ÝÎļþÖС£ÎÒÃÇ¿ÉÒÔ½«³ýSYSTEMºÍRBS±í¿Õ¼äÖ®ÍâµÄÆäËü±í¿Õ¼äÉèÖóÉÀëÏß״̬¡£ÃüÁîÈçÏ£º
SQL>alter tablespace ***  offline;
Èç¹ûÎÒÃÇÏëÏÞÖÆij¸öÓû§Äܹ»Ê¹Óõıí¿Õ¼äµÄ´óС£¬ÔòÎÒÃÇ¿ÉÒÔͨ¹ýÃüÁ
SQL>alter user *** quota ***m on ***
Õâ±íʾÎÒÃÇÒªÏÞÖÆij¸öÖ¸¶¨Óû§µÄ±í¿Õ¼äʹÓÃÏÞ¶îΪ***M£¬onÖ®ºóµÄ²ÎÊý¾ÍÊÇÒªÏÞÖƵıí¿Õ¼ä
ÁÙʱ±í¿Õ¼äÓÃÓÚΪÓû§ÅÅÐòµÄORDER BYÓï¾äʹÓà ¡£´´½¨Êý¾Ý¿âʱ¿ÉÒÔÖ¸¶¨Êý¾Ý¿âµÄĬÈÏÁÙʱ±í¿Õ¼ä¡£ÔÚ´´½¨Óû§µÄʱºò¿ÉÒÔÖ¸¶¨Óû§µÄĬÈÏÁÙʱ±í¿Õ¼ä¡£ÀýÈçϾä¾ÍÖ¸¶¨tempΪÓû§µÄÁÙʱ±í¿Õ¼ä¡£
SQL>CREATE USER *** IDENTIFIED BY **** TEMPORARY TABLESPACE temp;
Èý¡¢¶Î
OracleÖеĶοÉÒÔ·Ö³É4ÖÖÀàÐÍ£ºÊý¾Ý¶Î¡¢Ë÷Òý¶Î¡¢»Ø¹ö¶Î¡¢ÁÙʱ¶Î¡£
Êý¾Ý¶ÎÓÃÀ´´æ´¢Óû§µÄÊý¾Ý£¬Ã¿¸ö±í¶¼ÓÐÒ»¸ö¶ÔÓ¦µÄ»Ø¹ö¶Î£¬ÆäÃû³ÆºÍÊý¾Ý±íµÄÃû×ÖÏàͬ¡£ÎÒÃÇ¿ÉÒÔÓÃÏÂÁеÄSQLÓï¾äÀ´²éѯÓû§µÄÊý¾Ý¶ÎÐÅÏ¢£º
SQL>select  * from user_exten


Ïà¹ØÎĵµ£º

oracle ÔÚ·Ö×éÄÚÅÅÐòµÄ·½·¨

oracle·ÖÎöº¯ÊýÊ®·ÖÇ¿´ó£¬ÎÒÃÇÖ»ÒªÕÆÎÕÕâЩ·½·¨£¬¸üÖ±½ÓµÄ˵·¨¾ÍÊÇÖªµÀÕâЩ·ÖÎöº¯ÊýµÄ×÷ÓþÍÄÜÍê³ÉºÜ¶à¹¤×÷¡£
ϱßÌù³öÕâЩº¯Êý£¬¼°¼òµ¥Ó¦Óá£
ÆäÖÐÎÒÏë¶Ôlag£¨£©ºÍlead£¨£©º¯Êý×øÏÂ˵Ã÷£ºlag£¨£©±¾ÉíÊÇÑÓºóµÄÒâ˼Ҳ¾ÍÊÇÑÓºó³öÏÖijÁеÄÊý£¬¶ølead£¨£©ÓÐÒýÁì¡¢ÁìÏȵÄÒâ˼Ҳ¾ÍÊÇÌáÇ°¼¸ÐÐÏÔʾijÁÐÊý¾Ý
RANK()
dense_rank() ......

ORACLE Á¬½Ó ·½Ê½


ORACLE
±íÁ¬½Ó·½Ê½·ÖÎö¼°³£¼ûÓ÷¨

ÕªÒª
:
Õë¶ÔÔÚÊý¾Ý²Ö¿â»·¾³ÏÂ
,
ÓÉÓÚ³¬´óÊý¾ÝÁ¿µÄ´¦Àí¶ø²úÉúµÄЧÂÊÎÊÌ⣬±¾ÎÄÉîÈë·Ö
ÎöÁË
ORACLE
±íµÄ¼¸ÖÖÁ¬½Ó·½Ê½¡¢Ìص㡢ÊÊÓ÷¶Î§
,
ÒÔ¼°¶ÔÓÚ
ÈçºÎʹÓúÍÓÅ»¯×öÁËÏêϸµÄ̽ÌÖ¡£
¹Ø¼ü×Ö£º Êý¾Ý²Ö¿â
ORACLE
±íÁ¬½Ó
Ò» ÒýÑÔ
Êý¾Ý²Ö¿â¼¼ÊõÊÇÄ¿
Ç°ÒÑÖªµÄ±È½Ï³ÉÊì ......

oracle Êý¾Ý¿âºÍʵÀýÖ®¼äµÄÇø±ð

ORACLEʵÀý = ½ø³Ì + ½ø³ÌËùʹÓõÄÄÚ´æ(SGA)
ʵÀýÊÇÒ»¸öÁÙʱÐԵĶ«Î÷£¬ÄãÒ²¿ÉÒÔÈÏΪËü´ú±íÁËÊý¾Ý¿âijһʱ¿ÌµÄ״̬£¡
Êý¾Ý¿â = ÖØ×öÎļþ + ¿ØÖÆÎļþ + Êý¾ÝÎļþ + ÁÙʱÎļþ
Êý¾Ý¿âÊÇÓÀ¾ÃµÄ£¬ÊÇÒ»¸öÎļþµÄ¼¯ºÏ¡£
ORACLEʵÀýºÍÊý¾Ý¿âÖ®¼äµÄ¹Øϵ
1.
ÁÙʱÐÔºÍÓÀ¾ÃÐÔ
2.
ʵÀý¿ÉÒÔÔÚûÓÐÊý¾ÝÎļþµÄÇé¿öϵ¥¶ÀÆô¶¯ ......

Oracle¿Í»§¶ËÅäÖñʼÇ

1.½«¿Í»§¶Ë³ÌÐò½âѹµ½µçÄÔÖÐ
2.ÅäÖû·¾³±äÁ¿£º
ORACLE_HOME=F:\instantclient_10_2\client
Path¼ÓÉÏ%ORACLE_HOME%\bin£»
NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
3.ÐÞ¸Ä
%ORACLE_HOME%\network\adminϵÄtnsnames.oraÎļþ
dev =            &nbs ......

Oracle³£ÓÃÊý¾ÝÀàÐͼò½é

OracleÖÐÌṩһϵÁÐÀàÐÍ£¬Ã¿¸öÀàÐ͵ÄÌصãÈçÏ£º
char£º´æ´¢¹Ì¶¨³¤¶ÈµÄ×Ö·û£¬Èç¹û×Ö·û³¤¶È²»¹»»áÔÚÓұ߲¹¿Õ¸ñ¡£±ÈÈ磺name char£¨10£©£¬µ±¸øname¸³ÖµÎª'zhangsan'ʱ»áÔÚÓұ߲¹³ä2¸ö¿Õ¸ñ¡£charÀàÐ͵ÄÈÝÁ¿Îª1¡«2000B£¬Ã»ÓÐÖ¸¶¨ÔòĬÈϳ¤¶ÈΪ1¡£
varchar2£º´æ´¢³¤¶È¿É±äµÄ×Ö·û£¬ºÍcharÀàÐ͵IJ»Í¬£¬Ëü²»»á×Ô¶¯²¹³ä¿Õ¸ñ£¬ÇÒ¶¨ÒåÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ