Oracle:²éÕÒ±íµÄÖ÷¼ü£¬Íâ¼ü£¬Î¨Ò»ÐÔÔ¼Êø£¬Ë÷Òý
Êø£¬Ë÷Òý
1¡¢²éÕÒ±íµÄËùÓÐË÷Òý£¨°üÀ¨Ë÷ÒýÃû£¬ÀàÐÍ£¬¹¹³ÉÁУ©£º
select t.*,i.index_type from user_ind_columns t,user_indexes i where t.index_name = i.index_name and t.table_name = i.table_name and t.table_name = Òª²éѯµÄ±í
2¡¢²éÕÒ±íµÄÖ÷¼ü£¨°üÀ¨Ãû³Æ£¬¹¹³ÉÁУ©£º
select cu.* from user_cons_columns cu, user_constraints au where cu.constraint_name = au.constraint_name and au.constraint_type = 'P' and au.table_name = Òª²éѯµÄ±í
3¡¢²éÕÒ±íµÄΨһÐÔÔ¼Êø£¨°üÀ¨Ãû³Æ£¬¹¹³ÉÁУ©£º
select column_name from user_cons_columns cu, user_constraints au where cu.constraint_name = au.constraint_name and au.constraint_type = 'U' and au.table_name = Òª²éѯµÄ±í
4¡¢²éÕÒ±íµÄÍâ¼ü£¨°üÀ¨Ãû³Æ£¬ÒýÓñíµÄ±íÃûºÍ¶ÔÓ¦µÄ¼üÃû£¬ÏÂÃæÊǷֳɶಽ²éѯ£©£º
select * from user_constraints c where c.constraint_type = 'R' and c.table_name = Òª²éѯµÄ±í
²éѯÍâ¼üÔ¼ÊøµÄÁÐÃû£º
select * from user_cons_columns cl where cl.constraint_name = Íâ¼üÃû³Æ
²éѯÒýÓñíµÄ¼üµÄÁÐÃû£º
select * from user_cons_columns cl where cl.constraint_name = Íâ¼üÒýÓñíµÄ¼üÃû
5¡¢²éѯ±íµÄËùÓÐÁм°ÆäÊôÐÔ
select t.*,c.COMMENTS from user_tab_columns t,user_col_comments c where t.table_name = c.table_name and t.column_name = c.column_name and t.table_name = Òª²éѯµÄ±í
Ïà¹ØÎĵµ£º
linuxÏÂoracle°²×°£º
Oracle¹«Ë¾Ðû³ÆÔÚLinuxÏ°²×°Oracle9iÊý¾Ý¿âÖÁÉÙÒªÓÐ512MBµÄÄÚ´æºÍÖÁÉÙ1GB»òÕßÁ½±¶
ÄÚ´æ´óСµÄ½»»»¿Õ¼ä£¬¶ÔÓÚϵͳÄÚ´æ´óÓÚ2GBµÄ·þÎñÆ÷£¬½»»»¿Õ¼ä¿ÉÒÔ½éÓÚ2GB—4GBÖ®¼ä¡£
Èç¹ûÊÇΪÁËÔÚһ̨½öÓÐ256MÄÚ´æµÄÆÕͨPC»úÉÏÊÔÓÃOracle9 ......
´ó¼Ò¶¼ÖªµÀ£¬ÓÃPL/SQLÁ¬½ÓOracle£¬ÊÇÐèÒª°²×°Oracle¿Í»§¶ËÈí¼þµÄ¡£ÓÐûҪÏë¹ý²»°²×°Oracle¿Í»§¶ËÖ±½ÓÁ¬½ÓOracleÄØ£¿
ÆäʵÎÒÒ»Ö±ÏëÕâÑù×ö£¬ÒòΪÕâ¸ö¿Í»§¶ËʵÔÚÌ«ÈÃÈËÌÖÑáÁË£¡£¡£¡²»µ«»á°²×°Ò»¸öJDK£¬¶øÇÒ»¹»á°Ñ×Ô¼º·ÅÔÚ»·¾³±äÁ¿µÄ×îÇ°Ã棬»áÔì³É²»Ð ......
-- Create the user
create user SMCQUERY
identified by SMCQUERY;
-- Grant/Revoke role privileges
grant connect to SMCQUERY;
-- Grant/Revoke system privileges
grant select any table to SMCQUERY;
grant debug any procedure to SMCQUERY;
grant debug connect session to SMCQUERY;
grant cr ......
¶ÔÓÚÎÒÃÇÕâ¸öÏîÄ¿À´Ëµ£¬Êý¾Ý¿âµÄ´æÈ¡µÄÐÔÄܾö¶¨ÁËÊý¾ÝÌṩµÄÐÔÄÜ¡£ÓÅ»¯µÄ´óÖµÄÔÀíÖ»ÓÐÁ½¸ö£ºÒ»ÊÇÊý¾Ý·Ö¿é´æ·Å£¬±ãÓÚÊý¾ÝµÄת´¢ºÍ¹ÜÀí£»¶þÊÇÖм䴦Àí£¬Ìá¸ßÊý¾ÝÌṩµÄËٶȡ£
»ùÓÚÉÏÃæÁ½¸ö¸ù±¾µÄÔÀí£¬½èÖúÓÚÊý¾Ý²Ö¿âµÄ¸ÅÄÁоÙÊý¾Ý¿âµÄÓÅ»¯·½Ê½£º
1£® ·ÖÇø
ÔÚÊý¾Ý²Ö¿âÖУ¬ÊÂʵ±í£¬Ë÷Òý±í£¬Î¬¶È±í·Ö´¦ÓÚÈý¸ö²»Í ......