Oracleά»¤³£ÓÃSQLÓï¾ä»ã×Ü
Oracleά»¤³£ÓÃSQLÓï¾ä»ã×Ü
ÉÏһƪ / ÏÂһƪ 2008-09-04 11:25:01
²é¿´( 1991 ) / ÆÀÂÛ( 0 ) / ÆÀ·Ö( 0 / 0 )
ÈçºÎÔ¶³ÌÅжÏOracleÊý¾Ý¿âµÄ°²×°Æ½Ì¨
select * from v$version;
²é¿´±í¿Õ¼äµÄʹÓÃÇé¿ö
select sum(bytes)/(1024*1024) as free_space,tablespace_name
from dba_free_space
group by tablespace_name;
SELECT A.TABLESPACE_NAME,A.BYTES TOTAL,B.BYTES USED, C.BYTES FREE,
(B.BYTES*100)/A.BYTES "% USED",(C.BYTES*100)/A.BYTES "% FREE"
from SYS.SM$TS_AVAIL A,SYS.SM$TS_USED B,SYS.SM$TS_FREE C
WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME AND A.TABLESPACE_NAME=C.TABLESPACE_NAME;
1¡¢²é¿´±í¿Õ¼äµÄÃû³Æ¼°´óС
select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
from dba_tablespaces t, dba_data_files d
where t.tablespace_name = d.tablespace_name
group by t.tablespace_name;
2¡¢²é¿´±í¿Õ¼äÎïÀíÎļþµÄÃû³Æ¼°´óС
select tablespace_name, file_id, file_name,
round(bytes/(1024*1024),0) total_space
from dba_data_files
order by tablespace_name;
3¡¢²é¿´»Ø¹ö¶ÎÃû³Æ¼°´óС
select segment_name, tablespace_name, r.status,
(initial_extent/1024) InitialExtent,(next_extent/1024) NextExtent,
max_extents, v.curext CurExtent
from dba_rollback_segs r, v$rollstat v
Where r.segment_id = v.usn(+)
order by segment_name ;
4¡¢²é¿´¿ØÖÆÎļþ
select name from v$controlfile;
5¡¢²é¿´ÈÕÖ¾Îļþ
select member from v$logfile;
6¡¢²é¿´±í¿Õ¼äµÄʹÓÃÇé¿ö
select sum(bytes)/(1024*1024) as free_space,tablespace_name
from dba_free_space
group by tablespace_name;
SELECT A.TABLESPACE_NAME,A.BYTES TOTAL,B.BYTES USED, C.BYTES FREE,
(B.BYTES*100)/A.BYTES "% USED",(C.BYTES*100)/A.BYTES "% FREE"
from SYS.SM$TS_AVAIL A,SYS.SM$TS_USED B,SYS.SM$TS_FREE C
WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME AND A.TABLESPACE_NAME=C.TABLESPACE_NAME;
7¡¢²é¿´Êý¾Ý¿â¿â¶ÔÏó
select owner, object_type, status, count(*) count# from all_objects group by owner, object_type, status;
8¡¢²é¿´Êý¾Ý¿âµÄ°æ±¾¡¡
Select version from Product_component_version
Where SUBSTR(PRODUCT,1,6)='Oracle';
9¡¢²é¿´Êý¾Ý¿âµÄ´´½¨ÈÕÆں͹鵵·½Ê
Ïà¹ØÎĵµ£º
OracleÈÏ֤ר¼Ò——OCP£¬ÊÇÓÉOracle¹«Ë¾ÊÚȨ¹ú¼Ê¿¼ÊÔÈÏÖ¤ÖÐÐĶԿ¼Éú½øÐеÄ×ʸñÈÏÖ¤¡£¿¼Éú°´¿¼ÊÔ±ê×¼ÒªÇó²Î¼Ó¼¸Ãſγ̵Ŀ¼ÊÔ(Ò»°ãΪ3—5ÃÅ)£¬ÔÚͨ¹ýÈ«²¿¿¼ÊԺ󣬱ã¿É»ñµÃOCPµÄר¼ÒÈÏÖ¤¡£
Ä¿Ç°OCPÈÏÖ¤¿¼ÊÔ·ÖΪ£º
Database AdministratorDatabase OperatoDatabase DeveloperJava DeveloperApplication Consul ......
ÔÚ´óÐ͵ÄÆóÒµÓ¦ÓûòÆóÒµ¼¶µÄÊý¾Ý¿âÓ¦ÓÃÖУ¬Òª´¦ÀíµÄÊý¾ÝÁ¿Í¨³£¿ÉÒÔ´ïµ½¼¸Ê®µ½¼¸°ÙGB£¬ÓеÄÉõÖÁ¿ÉÒÔµ½TB¼¶¡£ËäÈ»´æ´¢½éÖʺÍÊý¾Ý´¦Àí¼¼ÊõµÄ·¢Õ¹Ò²ºÜ¿ì£¬µ«ÊÇÈÔÈ»²»ÄÜÂú×ãÓû§µÄÐèÇó£¬ÎªÁËʹÓû§µÄ´óÁ¿µÄÊý¾ÝÔÚ¶Áд²Ù×÷ºÍ²éѯÖÐËٶȸü¿ì£¬OracleÌṩÁ˶ԱíºÍË÷Òý½øÐзÖÇøµÄ¼¼Êõ£¬ÒÔ¸ÄÉÆ´óÐÍÓ¦ÓÃϵͳµÄÐÔÄÜ¡£
ʹÓ÷ÖÇøµÄÓŵ㣠......
Ò»¡¢Ç¶Ì×±íµÄ¶¨Ò壺
ǶÌ×±íÊDZíÖÐÖ®±í¡£Ò»¸öǶÌ×±íÊÇijЩÐеļ¯ºÏ£¬ËüÔÚÖ÷±íÖбíʾΪÆäÖеÄÒ»ÁС£¶ÔÖ÷±íÖеÄÿһÌõ¼Ç¼£¬Ç¶Ì×±í¿ÉÒÔ°üº¬¶à¸öÐС£ÔÚijÖÖÒâÒåÉÏ£¬ËüÊÇÔÚÒ»¸ö±íÖд洢һ¶Ô¶à¹ØϵµÄÒ»ÖÖ·½·¨¡£¿¼²éÒ»¸ö°üº¬²¿ÃÅÐÅÏ¢µÄ±í£¬ÔÚÈκÎʱ¼äÄÚÿ¸ö²¿ÃÅ»áÓкܶàÏîÄ¿ÕýÔÚʵʩ¡£ÔÚÒ»¸öÑϸñµÄ¹ØϵģÐÍÖУ ......
ÔÚOracleÊÇÌṩÁËnext_dayÇóÖ¸¶¨ÈÕÆÚµÄÏÂÒ»¸öÈÕÆÚ.
Óï·¨ : next_day( date, weekday )
date is used to find the next weekday.
weekday is a day of the week (ie: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY)
¿ÉÓÃÓÚ:
Oracle 9i, Oracle 10g, Oracle 11g
For example:
next_day('01- ......
Ò» Oracle¹«Ë¾¼ò½é
OracleÊÇÒóÐæ³öÍÁµÄ¼×¹ÇÎÄ(oracle bone inscriptions)µÄÓ¢ÎÄ·ÒëµÄµÚÒ»¸öµ¥´Ê
Oracle¹«Ë¾ÊÇÈ«Çò×î´óµÄÐÅÏ¢¹ÜÀíÈí¼þ¼°·þÎñ¹©Ó¦ÉÌ£¬³ÉÁ¢ÓÚ1977Ä꣬×ܲ¿Î»ÓÚÃÀ¹ú¼ÓÖÝ Redwood shore
Oracle¹«Ë¾ÒòÆ临ÔӵĹØϵÊý¾Ý¿â²úÆ·¶øÎÅÃû¡£OracleµÄ¹ØϵÊý¾Ý¿âÊÇÊÀ½çµÚÒ»¸öÖ§³ÖSQLÓïÑÔµÄÊý¾Ý¿â
OracleÔÚ³¬¹ý ......