Oracle ASM Ïê½â
ASM:Automatic Storage Management, ÊÇOracle Ö÷ÍÆµÄÒ»ÖÖÃæÏòOracleµÄ´æ´¢½â¾ö·½°¸£¬ ASM ºÍ RDBMS ·Ç³£ÏàËÆ£¬ASM Ò²ÊÇÓÉʵÀýºÍÎļþ×é³É£¬ Ò²¿ÉÒÔͨ¹ýsqlplus ¹¤¾ßÀ´Î¬»¤¡£
1. ASM ʵÀýÓÉSGA ºÍºǫ́½ø³Ì×é³É¡£
1.1 SGA ×é³É:
ASM ʵÀýµÄSGA°üÀ¨Buffer Cache£¬ Share Pool£¬ Large PoolµÈ¡£ ÐèҪעÒâµÄÊÇShare Pool£¬ ÒòΪExtent Map Òª·ÅÔÚÕⲿ·ÖµÄÄÚ´æÖУ¬ÐèÒª¸ü¾ßÊý¾ÝÁ¿À´¹À¼ÆExtent Map µÄ´óС×öÏàÓ¦µÄµ÷Õû¡£
Extent Map µÄ´óС¿ÉÒÔ¸ù¾ÝËùÓÐÎļþ´óСµÄºÍÀ´¹ÀË㣬ʹÓÃÏÂÃæµÄÓï¾äÀ´¼ÆËãËùÓÐÎļþºÍ£º
Select sum(bytes)/(1024*1024*1024) from v$datafile;
Select sum(bytes)/(1024*1024*1024) from v$logfile a, v$log b where a.Group#=b.Group#;
Select sum(bytes)/(1024*1024*1024) from v$tempfile where status='online';
Õâ3¸ösum µÄ×ܺͶÔÓ¦×ÅÊý¾Ý¿â´æ·ÅASMÖÐËùÓÐÎļþ´óС×ܺͣ¬ ¶ÔÓÚʹÓÃExternal Redundancy µÄ´ÅÅÌ×飬 ÿ100G ÐèÒª1MB µÄExtent Map£¬ ¸ù¾ÝÕâ¸ö±ÈÀý¼ÆËãExtent Map ËùÐèÒªµÄ¿Õ¼ä£¬ÔÚ¼ÓÉ϶îÍâµÄ2MB¾Í¿ÉÒÔÁË¡£ ÔÚʵ¼Ê¹¤×÷ÖÐÒ»°ã²»ÐèÒª¿¼ÂÇASM SGAµÄÅäÖ㬠ʹÓÃOracle ÌṩµÄȱʡֵ¾Í¿ÉÒÔÁË¡£
1.2 ºǫ́½ø³Ì
ASM ʵÀý±ÈRDBMS ʵÀý¶à2¸ö½ø³Ì£º RBAL ºÍ ABRn¡£
RBAL£º Õâ¸ö½ø³ÌÒ²½ÐRebalancer½ø³Ì£¬ ¸ºÔð¹æ»®ASM ´ÅÅÌ×éµÄReblance»î¶¯¡£
ABRn£ºÊÇRBAL½ø³ÌµÄ×Ó½ø³Ì£¬Õâ¸ö½ø³ÌÔÚÊýÁ¿ÉÏ¿ÉÒÔÓжà¸ö£¬ n´Ó1~9£¬ Õâ×é½ø³Ì¸ºÔðÕæÕý
Ïà¹ØÎĵµ£º
Oracle SQL PLUS »ù±¾²Ù×÷1
怬
c:\>sqlplus "sys/test1234 as sysdba" ÒÔsysdbaÉí·ÝµÇ¼
c:\>sqlplus/nolog ÒÔnologÉí·ÝµÇ¼
sql> connect sys/test1234 as sysdba
Connected.
Æô¶¯
SQL> startup &nb ......
-- get all dictionary for oracle db
select * from dict;
--select * from dictionary;
-- get all columns for dictionarys
select * from dict_columns;
-- get the default name-space for current user
select username,default_tablespace from user_users;
-- get roles for current user
select * from us ......
select p.spid,
a.serial#,
c.object_name,
b.session_id,
b.oracle_username,
b.os_user_name
from v$proces ......
ÔÚOracle8i»òÒÔÉϰ汾ÖУ¬¿ÉÒÔ´´½¨ÒÔÏÂÁ½ÖÖÁÙʱ±í£º
1¡£»á»°ÌØÓеÄÁÙʱ±í
CREATE GLOBAL TEMPORARY <TABLE_NAME> (<column specification>)
ON COMMIT PRESERVE ROWS£»
2¡£ÊÂÎñÌØÓеÄÁÙʱ±í
CREATE GLOBAL TEMPORARY <TABLE_N ......
±í¡¡¡¡¡¡¡¡tree
¡¡¡¡×ֶΡ¡¡¡¡¡master
¡¡¡¡¡¡¡¡¡¡¡¡¡¡sub
¡¡¡¡¡¡¡¡¡¡¡¡¡¡sales
¡¡¡¡insert into tree values
¡¡¡¡('Ö÷1',¡¡¡¡ 'Ö÷2',¡¡ 15);¡¡
¡¡¡¡insert into tree values¡¡¡¡¡¡
¡¡¡¡('Ö÷1',¡¡¡¡ 'Ö÷3',¡¡ 20);¡¡¡¡¡¡¡¡¡¡
¡¡¡¡insert into tree values
¡¡¡¡('Ö÷2',¡¡¡¡ 'Ö÷4',¡¡¡¡5);¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡ ......