ÏÔʾ±íÐÅÏ¢
1,ÏÔʾÌض¨Óû§µÄ±í
DAT_TABLES ¿ÉÒÔÏÔʾËùÓÐÊý¾Ý¿â±íµÄÏêϸÐÅÏ¢
ALL_TABLES ¿ÉÒÔÏÔʾÓû§¿ÉÒÔ·ÃÎʵÄËùÓбíÐÅÏ¢
USER_TABLES ¿ÉÒÔÏÔʾµ±Ç°Óû§ËùÓбíµÄÐÅÏ¢
SELECT table_name,num_rows,pct_free,blocks,chain_cnt
from dba_tables WHERE owner=’SCOTT’;
Table_nameÓÃÓÚ±êʶ±íÃû,num_rowsÓÃÓÚ±êʶ±íËù°üº¬µÄÐÐÊý.pct_freeÓÃÓÚ±êʶPCTFREEµÄÖµ,blocksÓÃÓÚ±êʶ±íÊý¾ÝÒѾռÓõĿé¸öÊý,chain_cntÓÃÓÚ±êʶÁ´ÐеĸöÊý,ownerÓÃÓÚ±êʶ¶ÔÏóËùÓÐÕß.
2,ÏÔʾÁÐÐÅÏ¢.
DBA_TAB_COLUMNS,¿ÉÒÔÏÔʾÊý¾Ý¿âÈκαíµÄÁÐÐÅÏ¢.
ALL_TAB_COLUMNS,¿ÉÒÔÏÔʾÓû§¿É·ÃÎʵÄÁÐÐÅÏ¢
USER_TAB_COLUMNS,¿ÉÒÔÏÔʾµ±Ç°Óû§ËùÓµÓбíµÄÁÐÐÅÏ¢.
3,ÏÔʾ±íµÄ×¢ÊÍÐÅÏ¢
DBA_TAB_COMMENTS,ÏÔʾÊý¾Ý¿âÈκαí»òÊÓͼµÄ×¢ÊÍ;
ALL_TAB_COMMENTS,ÏÔʾÓû§¿É·ÃÎʱíµÄ×¢ÊÍ
USER_TAB_COMMENTS,ÏÔʾµ±Ç°Óû§ËùÓµÓбíµÄ×¢ÊÍ.
4,ÏÔʾÁеÄ×¢ÊÍÐÅÏ¢
DBA_COL_COMMENTS,
ALL_COL_COMMENTS,
USER_COL_COMMENTS.
5,ÏÔʾUNUSEDÁÐÐÅÏ¢
DBA_UNUSED_COL_TABS,¿ÉÒÔÏÔʾÈκαíµÄUNUSEDÁиöÊý
ALL_UNUSED_COL_TABS,¿ÉÒÔÏÔʾÓû§¿É·ÃÎʱíµÄUNUSEDÁиöÊý
USER_UNUSED_COL_TABS,ÏÔʾµ±Ç°Óû§ËùÓµÓбíµÄUNUSEDÁиöÊý.
6,ÏÔʾÍⲿ±íµÄÐÅÏ¢
DBA_EXTERNAL_TABLES,ÏÔʾÊý¾Ý¿âËùÓÐÍⲿ±íµÄÐÅÏ¢.
ALL_EXTERNAL_TABLES,ÏÔʾÓû§¿É·ÃÎʵÄËùÓÐÍⲿ±íµÄÐÅÏ¢.
USER_EXTERNAL_TABLES,¿ÉÒÔÏÔʾµ±Ç°Óû§ËùÓµÓÐÍⲿ±íµÄÐÅÏ¢
7,ÏÔʾÍⲿ±íµÄλÖÃ
DBA_EXTERNAL_LOCATIONS,ÏÔʾÊý¾Ý¿âËùÓÐÍⲿ±íµÄλÖÃ.
ALL_EXTERNAL_LOCATIONS
USER_EXTERNAL_LOCATIONS
8,ÏÔʾ±í¶ÎÐÅÏ¢
DBA_SEGMENTS,¿ÉÒÔÏÔʾÊý¾Ý¿âËùÓжεÄÏêϸÐÅÏ¢.
USER_SEGMENTS,¿ÉÒÔÏÔʾµ±Ç°Óû§¶ÎµÄÐÅÏ¢
9ÏÔʾÐÐËùÔÚµÄʵ¼ÊλÖÃ
Ö´ ÐÐINSERT²Ù×÷ʱ,oracle»á½«Êý¾Ý²åÈëµ½±í¶ÎµÄÏàÓ¦Êý¾Ý¿éÖÐ,²¢ÇÒoracle»áÉú³ÉΨһµÄROWID¶ÔÓ¦ÓÚ¸ÃÐÐÊý¾Ý.ÒòΪROWIDÊÇÒ³Âë¸ñ ʽ´æ·ÅµÄ,ËùÓÐÓÃÓÚ²»ÄÜÖ±½Ó¶Á¶®ÆäÄÚÈÝ.ͨ¹ýʹÓÃDBMS_ROWID°ü,¿ÉÒÔ½«ROWIDת±ä³ÉÐÐËùÔÚÎļþºÅ,¿éºÅÒÔ¼°ÐкÅ
Ñ¡Ôñ10gÊÇÒòΪ¶ÔÍø¸ñ¼¼Êõ±È½ÏºÃÆ棬ºÃÏñ»¹Ã»µÃµ½¹ã·ºÓ¦Óã¬Ò²¾ÍÎÞËùνÓëÇ°Ãæ°æ±¾ÓкܴóÇø±ðÁË¡£
ÔÚѸÀ×ÉÏÏÂÁ˸öÈí¼þ£¬ÔËÐÐsqlplusw£¬È»ºóÕÕ×ÅÊ飬¿ñÇÃÁËÒ»·£¬ÓÐÔÚÍøÉÏÏÂÁ˸öÊÓƵ½Ì³Ì£¨MLDNħÀֿƼ¼_Oracle¿ÎÌã©£¬½²µÃͦºÃµÄ£¬¾ÍÊÇʱ¼ä³¤Á˵㣬²»Èç¿´ÊéÀ´µÃ¿ì¡£·´ÕýÏÖÔÚÖ»ÊÇÏëÊìϤһÏ»ù±¾Óï¾ä¡£
¿´ÁËÁ½ÌìÊéÁË¡£Á˽âÁËÒ» ......