oracleÓû§È¨Ï޵IJéѯ
oracleÖв鿴Óû§È¨ÏÞ
1.²é¿´ËùÓÐÓû§£º
select * from dba_users;
select * from all_users;
select * from user_users;
2.²é¿´Óû§»ò½ÇɫϵͳȨÏÞ(Ö±½Ó¸³Öµ¸øÓû§»ò½ÇÉ«µÄϵͳȨÏÞ)£º
select * from dba_sys_privs;
select * from user_sys_privs;
3.²é¿´½ÇÉ«(Ö»Äܲ鿴µÇ½Óû§ÓµÓеĽÇÉ«)Ëù°üº¬µÄȨÏÞ
sql>select * from role_sys_privs;
4.²é¿´Óû§¶ÔÏóȨÏÞ£º
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
5.²é¿´ËùÓнÇÉ«£º
select * from dba_roles;
6.²é¿´Óû§»ò½ÇÉ«ËùÓµÓеĽÇÉ«£º
select * from dba_role_privs;
select * from user_role_privs;
7.²é¿´ÄÄЩÓû§ÓÐsysdba»òsysoperϵͳȨÏÞ(²éѯʱÐèÒªÏàӦȨÏÞ)
select * from V$PWFILE_USERS
Ïà¹ØÎĵµ£º
HWMÊÇoracleÖÐblockÓÐûÓÐʹÓõķֽçÏߣ¬Ëü»áËæ×ÅÊý¾ÝµÄinsert¶øÉÏÉý£¬µ«Ëü²¢²»»áËæÊý¾ÝµÄdelete¶øϽµ£¬Òò´ËÈ«±íɨÃèµÄʱ¼ä²¢²»ÒòÊý¾ÝµÄdelete¶ø¼õÉÙ£¬Ïà·´¿ÉÄÜÓÉÓÚ¿éÇå³ý·´¶øÈ«±íɨÃèʱ¼äÔö¼Ó£¬¿ÉÒÔÓÃÏÂÃæ·½·¨µÄÈÎÒ»Ò»ÖÖÀ´½µµÍHWM£º
µÚÒ»ÖÖ£ºshrink
ÊÊÓÃÓÚ10gÒÔºóµÄ°æ±¾£¬Ç°ÌáÊÇÕâ¸ö±í£¬Ë÷Òý£¬ÎﻯÊÓͼ»òÎﻯÊÓͼlogËùÔ ......
Oracle Management ServerÅäÖò½ÖèÈçÏ£º
1¡¢Ê¹ÓÃenterprise manager configuration assistant½¨Á¢µµ°¸×ÊÁÏ¿â
ÆäÖпÉÑ¡Ôñн¨Ò»¸öÊý¾Ý¿âʵÀý»òÕßÔÚÒÑÓÐÊý¾Ý¿âʵÀýÖÐн¨×ÊÁϿ⣨н¨±í¿Õ¼ä£©¡£
2¡¢Æô¶¯management server
3¡¢ÔËÐÐenterprise manage console£¬Ñ¡ÔñµÇ¼µ½management server
µÇ ......
sql½Å±¾£¬Ò²¾ÍÊÇÔÚÎļþÖÐдÓÐsqlÓï¾äµÄÎļþ£¬¿ÉÒÔÔÚsqlplusÖÐÔËÐС£
ÒýÈësql½Å±¾
sqlplus Óû§Ãû/ÃÜÂë @sql½Å±¾.sql
£¨×¢Ò⣺ÔÚÓû§ÃûÃÜÂëÊäÈë½áÊøºóÒ»¶¨Òª¼Ó¿Õ¸ñÈ»ºóÔÙд@sql½Å±¾£©
OracleÖеĿÕÖµ»áµ±×÷ÎÞÇî´ó´¦Àí£¬Æäʵ¿ÕÖµ¸ù±¾¾Í²»»á´æ´¢£¬Ö»ÊÇ¿´×÷ÊÇÎÞÇî´ó¡£
OracleÖпØÖÆ´¦Àíº¯Êý NVL(×Ö¶ÎÃû£¬ ......
author:skate
time:2009/10/23
ÕâÁ½ÌìÒ»ÅóÓÑÎÊÈçºÎ¸ü¸ÄÊý¾Ý¿âÃû£¬ÓÚÊÇ×ö¸ö²âÊÔ£¬¼òµ¥¼Ç¼Ï£¬ÒÔ±ã˵Ã÷ÎÊÌâ
ÈçºÎÐÞ¸ÄÊý¾Ý¿âÃû£¨db_name)¼°ÊµÀýÃû(Instance_name or Service_name)
NidÊÇOracle´Ó9iR2¿ªÊ¼ÌṩµÄ¹¤¾ß£¬¿ÉÒÔÓÃÀ´¸ü¸ÄÊý¾Ý¿âÃû³Æ£¬¶øÎÞÐèͨ¹ý֮ǰÖؽ¨¿ØÖÆÎļþµÈ·±Ëö·½Ê½¡£
nidÊÇ×Ô´øµÄ¹¤¾ß£¬ÔÚoracle_home/b ......
INSTR·½·¨µÄ¸ñʽΪ
INSTR(Ô´×Ö·û´®, Ä¿±ê×Ö·û´®, ÆðʼλÖÃ, Æ¥ÅäÐòºÅ)
ÀýÈ磺INSTR('CORPORATE FLOOR','OR', 3, 2)ÖУ¬Ô´×Ö·û´®Îª'CORPORATE FLOOR', Ä¿±ê×Ö·û´®Îª'OR'£¬ÆðʼλÖÃΪ3£¬È¡µÚ2¸öÆ¥ÅäÏîµÄλÖá£
ĬÈϲéÕÒ˳ÐòΪ´Ó×óµ½ÓÒ¡£µ±ÆðʼλÖÃΪ¸ºÊýµÄʱºò£¬´ÓÓұ߿ªÊ¼²éÕÒ¡£
ËùÒÔSELECT INSTR('CORPORATE FLOOR' ......