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

Oracle DBAÈÕ³£sqlÁÐ±í¼°³£ÓÃÊÓͼ

²»´íµÄ×ÊÁÏ,ת¹ýÀ´,·½±ãÈÕºó²é¿´Ê¹ÓÃ!!!
--¼à¿ØË÷ÒýÊÇ·ñʹÓÃ
alter index &index_name monitoring usage;
alter index &index_name nomonitoring usage;
select * from v$object_usage where index_name =
&index_name;
--ÇóÊý¾ÝÎļþµÄI/O·Ö²¼
select
df.name,phyrds,phywrts,phyblkrd,phyblkwrt,singleblkrds,readtim,writetim
from v$filestat fs,v$dbfile df
where fs.file#=df.file# order by df.name;
--Çóij¸öÒþ²Ø²ÎÊýµÄÖµ
col ksppinm format a54
col ksppstvl format a54
select ksppinm, ksppstvl
from x$ksppi pi, x$ksppcv cv
where cv.indx=pi.indx and pi.ksppinm like '\_%' escape
'\' and pi.ksppinm like '%meer%';
--ÇóϵͳÖнϴóµÄlatch
select
name,sum(gets),sum(misses),sum(sleeps),sum(wait_time)
from v$latch_children
group by name having sum(gets) > 50 order by 2;
--Çó¹éµµÈÕÖ¾µÄÇл»ÆµÂÊ(Éú²úϵͳ¿ÉÄÜʱ¼ä»áºÜ³¤)
select
start_recid,start_time,end_recid,end_time,minutes from (select test.*,
rownum as rn
from (select b.recid
start_recid,to_char(b.first_time,'yyyy-mm-dd hh24:mi:ss') start_time,
a.recid end_recid,to_char(a.first_time,'yyyy-mm-dd
hh24:mi:ss') end_time,round(((a.first_time-b.first_time)*24)*60,2)
minutes
from v$log_history a,v$log_history b where
a.recid=b.recid+1 and b.first_time > sysdate - 1
order by a.first_time desc) test) y where y.rn < 30
--Ç󻨹ö¶ÎÕýÔÚ´¦ÀíµÄÊÂÎñ
select a.name,b.xacts,c.sid,c.serial#,d.sql_text
from v$rollname a,v$rollstat b,v$session c,v$sqltext
d,v$transaction e
where a.usn=b.usn and b.usn=e.xidusn and
c.taddr=e.addr
and c.sql_address=d.address and
c.sql_hash_value=d.hash_value order by a.name,c.sid,d.piece;
--Çó³öÎÞЧµÄ¶ÔÏó
select 'alter procedure '||object_name||' compile;'
from dba_objects
where status='INVALID' and wner='&' and
object_type in ('PACKAGE','PACKAGE BODY');
/
select owner,object_name,object_type,status from
dba_objects where status='INVALID';
--Çóprocess/sessionµÄ״̬
select p.pid,p.spid,s.program,s.sid,s.serial#
from v$process p,v$session s where s.paddr=p


Ïà¹ØÎĵµ£º

SQL Server 2008ÏÂÔØ&ÆÆ½â

´Ó¹ÙÍøÏÂÔØSQL Server 2008µÄ180ÌìÊÔÓðæÆäʵÓëÕýʽ°æÄÚÈÝÊÇ»ù±¾ÏàͬµÄ£¬Î¨Ò»µÄÇø±ð¾ÍÔÚÓÚ°²×°ÅäÖÃÎļþÖÐËù°üº¬µÄkey¡£¸÷ÖÖ°æ±¾µÄSQL ServerÔÚ½øÐе½ÕâÒ»²½Ö®Ç°¶¼ÊÇÍêȫһÑùµÄ£º
Microsoft® SQL Server® 2008 Enterprise Evaluation£º¿ª·¢ÈËÔ±ÊÔÓÃÌåÑé
Microsoft® SQL Server® 2008 Enterprise Evaluatio ......

SQL ServerÖ÷¼ü×Ô¶¯Ôö³¤µÄÉèÖÃ

ÔÚSQL ServerÖУ¬Èç¹û°Ñ±íµÄÖ÷¼üÉèΪidentityÀàÐÍ£¬Êý¾Ý¿â¾Í»á×Ô¶¯ÎªÖ÷¼ü¸³Öµ¡£ÀýÈ磺
create table customers (
id int identity(1,1) primary key not null,
name varchar(15)
);
insert into customers(name) values("name1"),("name2");
select id from customers;

²éѯ½á¹ûΪ£º
id
---
1
2
ÓÉ´Ë¿ ......

Two papers on Oracle 11g Security

Hey all,
Since there seems to be a fair bit of disinformation, and utter nonsense,
floating around since my talk at the Black Hat Federal security conference
the other day, I have decided to publish the following papers.
http://www.databasesecurity.com/HackingAurora.pdf
http://www.databasesec ......

ORACLEµ¼³öºÍµ¼ÈëʵÓóÌÐò

µ¼³öºÍµ¼ÈëʵÓóÌÐò
 
q      µ¼³öºÍµ¼ÈëʵÓóÌÐòÓÃÓÚʵʩÊý¾Ý¿âµÄÂß¼­±¸·ÝºÍ»Ö¸´
q      µ¼³öʵÓóÌÐò½«Êý¾Ý¿âÖеĶÔÏó¶¨ÒåºÍÊý¾Ý±¸·Ýµ½Ò»¸ö²Ù×÷ϵͳ¶þ½øÖÆÎļþÖÐ
q      µ¼ÈëʵÓóÌÐò¶ÁÈ¡¶þ½øÖƵ¼³öÎļþ²¢½«¶ÔÏóºÍÊý¾ÝÔØÈëÊý¾Ý¿âÖÐ ......

ORACLEѧϰ×ܽá—ROWID(ת)

     ¸ãoracle¶¼»á¾­³£Åöµ½rowid£¬±¾ÎÄÊDZÊÕ߸ù¾ÝÍøÉϸ÷λµÄÎÄÕ£¬¼ÓÉÏ×Ô¼ºÑ§Ï°ÖеÄÌå»á£¬×Ü½á¶ø³É¡£
Ò».rowid¼ò½é
        rowid¾ÍÊÇΨһ±êÖ¾¼Ç¼ÎïÀíλÖõÄÒ»¸öid£¬ÔÚoracle 8°æ±¾ÒÔǰ£¬rowidÓÉfile#+block#+row#×é³É£¬Õ¼ÓÃ6¸öbytesµÄ¿Õ¼ä£¬10 bit µÄ file# ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ