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

oracle±í¿Õ¼ä¹ÜÀí

--1²é¿´±í¿Õ¼äÒѾ­Ê¹ÓõİٷֱÈ
select   a.tablespace_name,a.bytes/1024/1024
"Sum MB",(a.bytes-b.bytes)/1024/1024   "used MB",b.bytes/1024/1024
"free MB",round(((a.bytes-b.bytes)/a.bytes)*100,2) "percent_used"
from
(select tablespace_name,sum(bytes) bytes from dba_data_files group by tablespace_name)   a,
(select tablespace_name,sum(bytes) bytes,max(bytes) largest from dba_free_space group by tablespace_name)   b
where   a.tablespace_name=b.tablespace_name
order   by   ((a.bytes-b.bytes)/a.bytes)   desc
“Sum MB”±íʾ±í¿Õ¼äËùÓеÄÊý¾ÝÎļþ×ܹ²ÔÚ²Ù×÷ϵͳռÓôÅÅÌ¿Õ¼äµÄ´óС
±ÈÈ磺test±í¿Õ¼äÓÐ2¸öÊý¾ÝÎļþ£¬datafile1Ϊ300MB£¬datafile2Ϊ400MB£¬ÄÇôtest±í¿Õ¼äµÄ“Sum MB”¾ÍÊÇ700MB
“userd MB”±íʾ±í¿Õ¼äÒѾ­Ê¹ÓÃÁ˶àÉÙ
“free MB”±íʾ±í¿Õ¼äÊ£Óà¶àÉÙ
“percent_user”±íʾÒѾ­Ê¹ÓõİٷֱÈ
--2±ÈÈç´Ó1Öв鿴µ½MLOG_NORM_SPACE±í¿Õ¼äÒÑʹÓðٷֱȴﵽ90%ÒÔÉÏ£¬¿ÉÒԲ鿴¸Ã±í¿Õ¼ä×ܹ²Óм¸¸öÊý¾ÝÎļþ£¬Ã¿¸öÊý¾ÝÎļþÊÇ·ñ×Ô¶¯À©Õ¹£¬¿ÉÒÔ×Ô¶¯À©Õ¹µÄ×î´óÖµ¡£
select   file_name,tablespace_name,bytes/1024/1024 "bytes MB",maxbytes/1024/1024 "maxbytes MB"   from   dba_data_files
  where tablespace_name='MLOG_NORM_SPACE';
--3±ÈÈçMLOG_NORM_SPACE±í¿Õ¼äÄ¿Ç°µÄ´óСΪ19GB£¬µ«×î´óÿ¸öÊý¾ÝÎļþÖ»ÄÜΪ20GB£¬Êý¾ÝÎļþ¿ìҪдÂú£¬¿ÉÒÔÔö¼Ó±í¿Õ¼äµÄÊý¾ÝÎļþ
ÓòÙ×÷ϵͳUNIX¡¢LinuxÖеÄdf   -gÃüÁî(²é¿´Ï¿ÉÒÔʹÓõĴÅÅÌ¿Õ¼ä´óС)
»ñÈ¡´´½¨±í¿Õ¼äµÄÓï¾ä£º
select   dbms_metadata.get_ddl('TABLESPACE','MLOG_NORM_SPACE')   from   dual;
--4È·ÈÏ´ÅÅÌ¿Õ¼ä×ã¹»£¬Ôö¼ÓÒ»¸öÊý¾ÝÎļþ
alter   tablespace   MLOG_NORM_SPACE
add   datafile   '/oracle/oms/oradata/mlog/Mlog_Norm_data001.dbf'
size   10M   autoextend   on   maxsize   20G
--5ÑéÖ¤ÒѾ­Ôö¼ÓµÄÊý¾ÝÎļþ
select   file_name


Ïà¹ØÎĵµ£º

oracle¸´Ï°£¨Ò»£© Ö®OracleÌåϵ½á¹¹

      ѧϰOracle DBAÒ²°ë¸ö¶àѧÆÚÁË£¬½ñÌìÃÍÈ»²Å·¢ÏÖ£¬Ô­À´ÎÒµÄÊ黹ÊǺÜеģ¬ÉϿβÙ×÷ʱºòÒ²Ö»ÊÇÖªµÀ´ó¸ÅÔõô×ö£¬µ«ÊÇÒªÕæµÄÈ«²¿×Ô¼º×ö£¬¶ø²»È¥·­Ê黹ÊÇÓÐÒ»¶¨µÄÄѶȵģ¬ËùÒÔÄØ£¬½ñÌ쿪ʼ½«DBA´ÓÍ·¸´Ï°Ò»±é£¬Í¬Ê±ÔÙ²Ù×÷Ò»±é¡£
      µÚÒ»Õ£¬Ñ§µÄÊÇOracleµÄÌåϵ½á¹¹£ ......

OracleÈÕÆÚº¯Êý¼¯½õ

OracleÈÕÆÚº¯Êý¼¯½õ(Ò»)
Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_ch ......

ORACLE DATEºÍTIMESTAMPÊý¾ÝÀàÐ͵ıȽÏ

DATEÊý¾ÝÀàÐÍ
¡¡¡¡Õâ¸öÊý¾ÝÀàÐÍÎÒÃÇʵÔÚÊÇÌ«ÊìϤÁË£¬µ±ÎÒÃÇÐèÒª±íʾÈÕÆÚºÍʱ¼äµÄ»°¶¼»áÏëµ½dateÀàÐÍ¡£Ëü¿ÉÒÔ´æ´¢Ô£¬Ä꣬ÈÕ£¬ÊÀ¼Í£¬Ê±£¬·ÖºÍÃë¡£ËüµäÐ͵ØÓÃÀ´±íʾʲ ôʱºòÊÂÇéÒѾ­·¢Éú»ò½«Òª·¢Éú¡£DATEÊý¾ÝÀàÐ͵ÄÎÊÌâÔÚÓÚËü±íʾÁ½¸öʼþ·¢Éúʱ¼ä¼ä¸ôµÄ¶ÈÁ¿Á£¶ÈÊÇÃë¡£Õâ¸öÎÊÌ⽫ÔÚÎÄÕÂÉÔºóÌÖÂÛtimestampµÄʱ ºò±»½â¾ö¡£¿ÉÒ ......

Oracle Rowid ½éÉÜ

Ò». ÀûÓÃrowidÀ´µÃµ½Ïà¹ØÐÅÏ¢
SQL> conn sys/admin as sysdba
ÒÑÁ¬½Ó¡£
SQL> create table bl(id number);
±íÒÑ´´½¨¡£
SQL> insert into bl values(1);
ÒÑ´´½¨ 1 ÐС£
 
SQL> select owner,segment_name,file_id,RELATIVE_FNO,block_id from dba_extents wh
ere owner='SYS' and segment_name='B ......

oracle 11gµÄ±í¿Õ¼ä¼ÓÃÜ

ÒòΪÃ÷°Ú×ŵÄÔµ¹Ê£¬10.2Òý³öµÄTDEЧÄܶÔÁмÓÃÜÒÔºó£¬ÕÐÖÂÏà¸ÉĿ¼ɥʧÁ˶Բ»µÈʽµÄÅжÏÄÜÁ¦¡£
鍫룼
ENCRYPTIONDEMO@fmw//scripts> create table tde_table(id number encrypt no salt,na
me varchar¶þ(30))
¶þ ;
Table created.
Elapsed: 00:00:00.11
ENCRYPTIONDEMO@fmw//scripts> begin
¶þ for i in 1..2 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ