¡¾×ܽ᡿oracle»Ö¸´Îóɾ³ýÊý¾Ý£¬½â³ýËø¶¨µÄµÈsqlÓï¾ä
1.Ôø¾²»Ð¡Ðİѿª·¢¿âµÄÊý¾Ý¿â±íÈ«²¿É¾³ý£¬µ±Ê±ÏŵÄÒªËÀ¡£½á¹ûÕÒµ½ÏÂÃæµÄÓï¾ä»Ö¸´µ½ÁË1¸öСʱ֮ǰµÄÊý¾Ý£¡ºÜ¼òµ¥¡£
×¢ÒâʹÓùÜÀíÔ±µÇ¼ϵͳ£º
select * from ±íÃû as of timestamp sysdate-1/12 //²éѯÁ½¸öСʱǰµÄij±íÊý¾Ý£¡¼ÈÈ»Á½Ð¡Ê±ÒÔǰµÄÊý¾Ý¶¼µÃµ½ÁË£¬¼ÌÐøÔõô×ö£¬ÖªµÀÁ˰ɡ£¡£
Èç¹ûdropÁË±í£¬Ôõô°ì£¿£¿¼ûÏÂÃæ£º
drop table ±íÃû;
Êý¾Ý¿âÎóɾ³ý±íÖ®ºó»Ö¸´:£¨ ¾ø¶Ôok£¬ÎÒ¾Í×ö¹ýÕâÑùµÄÊÂÇ飬º¹ £©²»¹ýÒª¼ÇµÃɾ³ýÁËÄÄЩ±íÃû¡£
flashback table ±íÃû to before drop;
2.²éѯµÃµ½µ±Ç°Êý¾Ý¿âÖÐËø£¬ÒÔ¼°½âËø£º
²éËø
SELECT /*+ rule */ s.username,
decode(l.type,'TM','TABLE LOCK',
'TX','ROW LOCK',
NULL) LOCK_LEVEL,
o.owner,o.object_name,o.object_type,
s.sid,s.serial#,s.terminal,s.machine,s.program,s.osuser
from v$session s,v$lock l,dba_objects o
WHERE l.sid = s.sid
AND l.id1 = o.object_id(+)
AND s.username is NOT NULL;
½âËø
alter system kill session 'sid,serial';
Èç¹û½â²»ÁË¡£Ö±½Óµ¹osÏÂkill½ø³Ìkill £9 spid
3.¹ØÓÚ²éѯÊý¾Ý¿âÓû§£¬È¨ÏÞµÄÏà¹ØÓï¾ä£º
Sql´úÂë
1.²é¿´ËùÓÐÓû§£º
select * from dba_user;
select * from all_users;
select * from user_users;
2.²é¿´Óû§ÏµÍ³È¨ÏÞ£º
select * from dba_sys_privs;
select * from all_sys_privs;
select * from user_sys_privs;
3.²é¿´Óû§¶ÔÏóȨÏÞ£º
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs;
4.²é¿´ËùÓнÇÉ«£º
select * from dba_roles;
5.²é¿´Óû§ËùÓµÓеĽÇÉ«£º
select * from dba_role_privs;
select * from user_role_privs;
4.¼¸¸ö¾³£Óõ½µÄoracleÊÓͼ£º×¢Òâ±íÃûʹÓôóд....................
Sql´úÂë
1. ²éѯoracleÖÐËùÓÐÓû§ÐÅÏ¢
select * from dba_user;
2. Ö»²éѯÓû§ºÍÃÜÂë
select username,password from dba_users;
3. ²éѯµ±Ç°Óû§ÐÅÏ¢
select * from dba_ustats;
4. ²éѯÓû§¿ÉÒÔ·ÃÎʵÄÊÓͼÎı¾
select * from dba_varrays;
5. ²éѯÊý¾Ý¿âÖÐËùÓÐÊÓͼµÄÎı¾
select * from dba_views;
6.²éѯȫ²¿Ë÷Òý
select * from user_indexes;
²éѯȫ²¿±í¸ñ
select * from user_
Ïà¹ØÎĵµ£º
ÓÐʱºòÍøÂç·¢Éú±ä¶¯£¬±ØÐëÊÖ¶¯ÐÞ¸ÄÒ»ÏÂRAC VIPµØÖ·£¬²»½öÊǵØÖ·£¬Ò²¿ÉÒÔÐÞ¸ÄVIPËùÔÚµÄÍø¿¨£¬ÔÔòÊÇVIPµØÖ·ÒªºÍPUBµØÖ·ÔÚͬһ¸öÍø¶ÎÄÚ£¬·½·¨ÆäʵÊDZȽϼòµ¥µÄ£¬ÓÐÈËÎʵ½£¬ÎÒ¸øÒ»¸öʾÀýÈçÏ£º
1¡¢¹Ø±ÕÊý¾Ý¿â
srvctl stop database -d db
2¡¢¹Ø±ÕNOTEAPPA
srvctl stop nodeapps -n db2
à ......
ͨ¹ýEXCELµ¼ÈëSSASÏîÄ¿
£¨1£©±¾µØÅäÖÃHTTP
Ö÷Òª²½Ö裺
I£©Ð½¨Ä¿Â¼olap£¬¿½±´Îļþ½« %Installation folder%\OLAP\bin\isapi Ŀ¼µÄÄÚÈÝ£¬Ö÷ÒªÊÇmsmdpump.dllºÍmsmdpump.ini£»
II£©½¨Á¢ÐéÄâĿ¼olap, ÅäÖÃmsmdpump.dll£¬Ä¿Â¼°²È«ÐÔÑ¡ÔñÄäÃû·ÃÎʺÍwindows¼¯³É¡£
http://www.microsoft.com/china/technet/prodtechn ......
Ò»°ãµÄ¹«Ë¾Í¨³£»áÔÚËûÃǵÄÐÅϢϵͳ¼Ü¹¹ÖÐÒýÈë¶àÖÖÊý¾Ý¿âƽ̨£¬Í¬Ê±ÒýÈëÈýµ½ËÄÖÖ²»Í¬µÄRDBMS½â¾ö·½°¸µÄÖдóÐ͹«Ë¾Ò²²¢²»ÉÙ¼û£¬µ±È»ÕâЩ¹«Ë¾ÀïÃæµÄDBAÃÇͨ³£Ò²ÐèҪͬʱӵÓйÜÀí¶àÖÖ²»Í¬Æ½Ì¨µÄ¼¼ÄÜÁË¡£
Ö»ÔÚÒ»ÖÖÆ½Ì¨ÉÏÕ¹¿ª¹¤×÷µÄÊý¾Ý¿âר¼ÒÃÇҲͨ³£»áÆÚ´ý×ÅÔÚËûÃǵÄÏÂÒ»·Ý¹¤×÷ÖÐÄÜѧµ½µã²»Ò»ÑùµÄ¶«Î÷£¬ÄÇЩÓÐÓÂÆøµÄÈËÃÇÔòÔ¸Òâ ......
Ò»£®ÊÓͼ(VIEW)
¶¨Ò壺ÊÓͼÊÇÒ»ÕÅÐéÄâµÄ±í£¬ÆäÄÚÈÝÊÇ´ÓÒ»ÕÅ»ò¶àÕűíÖвéѯµÃÀ´µÄ½á¹û¼¯¡£
ÃèÊö£ºÊÓͼÊÇ´æ´¢ÔÚϵͳĿ¼ÖеÄÐÅÏ¢£¬Ëý²¢Ã»ÓÐÕæÕý´æ´¢Êý¾Ý£¬¶øÊÇÒÑ´æ±íµÄͶӰ¡£ÊÓͼµÄÊôÐÔÊǰ´ÕÕÒ»¸ö²éѯµÄ¹æ¶¨´ÓÒ»¸ö»òÕß¶à¸ö±íÖе¼³öµÄ£¬ÊÇÒÑ´æ±íµÄ¹ýÂËÆ÷¡£ËýÊÇÒ»ÕÅ“Ðé±í”£¬´ÓÒ»Õűí»òÕß¶àÕűíÖÐÅÉÉú³öÀ´µÄ£¬Æä ......
ת×Ô£º http://hi.baidu.com/beanchx/blog/item/ed056509d66f65cc3bc763f4.html
p6spyµÄÌæ´úÆ·£ºjdbc logger
2007Äê09ÔÂ13ÈÕ ÏÂÎç 01:07
Ê×ÏȽéÉÜÒ»ÏÂÕâ¸ö¿ªÔ´µÄÏîÄ¿¡£Õâ¸öÊÇÒ»¸ö¶ÔjdbcÖеÄsql½øÐÐloggerµÄÒ»¸ö¹¤¾ß¡£ÈôÔÚÏîÄ¿ÖвÉÓÃÁ˽϶àµÄpreparedStatement£¬ÄÇô´òÓ¡³öÀ´µÄsql»áÓкܶà"?"£¬·Ç³£²»·½±ã¡£ÓÐÒ»¸ö²úƷΪp ......