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

Oracleϵͳ±í²éѯ

 Êý¾Ý×Öµädict×ÜÊÇÊôÓÚOracleÓû§sysµÄ¡£  
¡¡¡¡1¡¢Óû§£º  
¡¡¡¡¡¡select username from dba_users;  
¡¡¡¡¸Ä¿ÚÁî  
¡¡¡¡¡¡alter user spgroup identified by spgtest;   
¡¡¡¡2¡¢±í¿Õ¼ä£º  
¡¡¡¡¡¡select * from dba_data_files;  
¡¡¡¡¡¡select * from dba_tablespaces;//±í¿Õ¼ä  
  
¡¡¡¡¡¡select tablespace_name,sum(bytes), sum(blocks)  
¡¡¡¡¡¡¡¡from dba_free_space group by tablespace_name;//¿ÕÏбí¿Õ¼ä  
  
¡¡¡¡¡¡select * from dba_data_files  
¡¡¡¡¡¡¡¡where tablespace_name=’RBS’;//±í¿Õ¼ä¶ÔÓ¦µÄÊý¾ÝÎļþ  
  
¡¡¡¡¡¡select * from dba_segments  
¡¡¡¡¡¡¡¡where tablespace_name=’INDEXS’;  
¡¡¡¡3¡¢Êý¾Ý¿â¶ÔÏ󣺠 
¡¡¡¡¡¡select * from dba_objects;  
¡¡¡¡¡¡CLUSTER¡¢DATABASE LINK¡¢FUNCTION¡¢INDEX¡¢LIBRARY¡¢PACKAGE¡¢PACKAGE BODY¡¢  
¡¡¡¡¡¡PROCEDURE¡¢SEQUENCE¡¢SYNONYM¡¢TABLE¡¢TRIGGER¡¢TYPE¡¢UNDEFINED¡¢VIEW¡£  
¡¡¡¡4¡¢±í£º  
¡¡¡¡¡¡select * from dba_tables;  
¡¡¡¡¡¡analyze my_table compute statistics;->dba_tablesºó6ÁР 
¡¡¡¡¡¡select extent_id,bytes from dba_extents  
¡¡¡¡¡¡where segment_name=’CUSTOMERS’ and segment_type=’TABLE’  
¡¡¡¡¡¡order by extent_id;//±íʹÓõÄextentµÄÐÅÏ¢¡£segment_type=’ROLLBACK’²é¿´»Ø¹ö¶ÎµÄ¿Õ¼ä·ÖÅäÐÅÏ¢  
¡¡¡¡¡¡ÁÐÐÅÏ¢£º  
¡¡¡¡¡¡¡¡select distinct table_name  
¡¡¡¡¡¡¡¡from user_tab_columns  
¡¡¡¡¡¡¡¡where column_name=’SO_TYPE_ID’;  
¡¡¡¡5¡¢Ë÷Òý£º¡¡  
¡¡¡¡¡¡select * from dba_indexes;//Ë÷Òý£¬°üÀ¨Ö÷¼üË÷Òý  
¡¡¡¡¡¡select * from dba_ind_columns;//Ë÷ÒýÁР 
¡¡¡¡¡¡select i.index_name,i.uniqueness,c.column_name  
¡¡¡¡¡¡¡¡from user_indexes i,user_ind_columns c  
¡¡¡¡¡¡¡¡¡¡where i.inde


Ïà¹ØÎĵµ£º

OracleÊý¾Ý¿âµÄ±¸·Ý¼°»Ö¸´²ßÂÔÑо¿

1¡¢¶à¹¤Áª»úÖØ×÷ÈÕÖ¾Îļþ
¡¡¡¡Ã¿¸öÊý¾Ý¿âʵÀý¶¼ÓÐÆä×Ô¼ºµÄÁª»úÖØ×÷ÈÕÖ¾×飬ÔÚ²Ù×÷Êý¾Ý¿âʱ£¬OracleÊ×ÏȽ«Êý¾Ý¿âµÄÈ«²¿¸Ä±ä±£´æÔÚÖØ×÷ÈÕÖ¾»º³åÇøÖУ¬ËæºóÈÕÖ¾¼Ç¼Æ÷½ø³Ì£¨LGWR£©½«Êý¾Ý´Óϵͳ¹²ÓÃÇøSGA£¨System Global Area£©µÄÖØ×÷ÈÕÖ¾»º³åÇøÐ´ÈëÁª»úÖØ×÷ÈÕÖ¾Îļþ£¬ÔÚ´ÅÅ̱ÀÀ£»òʵÀýʧ°Üʱ£¬¿ÉÒÔͨ¹ýÓëÖ®Ïà¹ØµÄÁª»úÖØ×÷ÈÕÖ¾ ......

Oracleѧϰ±Ê¼Çժ¼1

 1.create alter insert update selectµÈ
ÈçºÎ½¨±í
   ѧÉú±ístudent
        create table student( --ѧÉú±í
           xh number(4), --ѧºÅ
           ......

Oracleѧϰ±Ê¼Çժ¼4

 ½¨Á¢±íÈçÏÂ:
ѧÉú»ù±¾ÐÅÏ¢±í
CREATE Student(
[Studentid][Int]IDENTITY(1,1)NOT NULL primary key,--Ö÷¼ü
[StudentName][char]NOT NULL
)
¿Î³ÌÐÅÏ¢±í
CREATE Subject(
[SubjectID][char]NOT NULL primary key,          --Ö÷¼ü
[SubjectName][char]NOT NULL
)
³ ......

Oracleѧϰ±Ê¼Çժ¼7

 ÓÃ;: <1>Ä£¿é»¯
<Àý×Ó> --¹«Ë¾µÄÔ±¹¤µÄ¹ÜÀí
         1.Ôö¼ÓÒ»¸öÔ±¹¤
         2.Ô±¹¤ÀëÖ°
Óô洢¹ý³ÌºÍº¯ÊýÀ´ÊµÏÖ
1.Ôö¼ÓÒ»¸öÔ±¹¤
create sequence seq1 start with 7935;
create or replace function insert ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ