Oracle sysdate ʱ¼äÂýÁË£¡
×î½ü·¢ÏÖÒ»¸öÎÊÌ⣬һ¸ö9iÅÜÔÚredhat5µÄ£¬¾ÓÈ» select sysdate from dual ³öÀ´µÄʱ¼äºÍʵ¼Êʱ¼ä²îÁ˼¸·ÖÖÓ£¬ÒòΪ»ùÓÚÕâ¸öoracleµÄϵͳʱ¼äÕýÈ·ÐÔ»¹ÊÇÓеãÒªÇóµÄ¡£ËùÒÔÖ»ÄÜ #date -s 2010-2-10 8:55:00 ÁË£¬ÔÙ#clock -w дÈëCOMS ×¢ÒâÐÞ¸Äʱ¼äµÃÔÚrootÏ¡£
ÔÚϵͳÆô¶¯Ê±£¬Linux²Ù×÷ϵͳ½«Ê±¼ä´ÓCMOSÖжÁµ½ÏµÍ³Ê±¼ä±äÁ¿ÖУ¬ÒÔºóÐÞ¸Äʱ¼äͨ¹ýÐÞ¸Äϵͳʱ¼äʵÏÖ¡£ÎªÁ˱£³Öϵͳʱ¼äÓëCMOSʱ¼äµÄÒ»ÖÂ
ÐÔ£¬Linuxÿ¸ôÒ»¶Îʱ¼ä»á½«ÏµÍ³Ê±¼äдÈëCMOS¡£
¹ýÁËÒ»¸öÐÇÆÚ·¢ÏÖʱ¼äÓÖÂýÁË1·Ö¶à¡£×ܲ»ÄÜÈýÍ·Á½ÌìµÄÈ¥ÐÞ¸Äʱ¼ä°É£¬ÓÚÊǾÍÏëµ½ÁË£¬¼Æ»®ÈÎÎñºÍʱ¼äͬ²½¡£
30 * * * * /usr/sbin/ntpdate ntp.sjtu.edu.cn >> /root/ntpdate.log
Õâ¸öÀý×ÓÊÇ30·Öͬ²½Ò»´Îʱ¼ä̫Ƶ·±ÁË¡£
ÏÈÔÚrootÏ crontab -e À´±à¼ÐÂÔöÒ»¸ö ¼Æ»®ÈÎÎñ
±à¼µ÷ÓõÄÊÇvi¡£
ÎÒÃǾÍÐÂÔöÒ»ÐÐ
30 3 * * 0 /usr/sbin/ntpdate ntp.sjtu.edu.cn >> /root/ntpdate.log
£¨5¸öʱ¼ä²ÎÊýΪ£©
0¡«59 ±íʾ·Ö
1¡«23 ±íʾСʱ
1¡«31 ±íʾÈÕ
1¡«12 ±íʾÔ·Ý
0¡«6 ±íʾÐÇÆÚ£¨ÆäÖÐ0±íʾÐÇÆÚÈÕ£©
# ntpdate 210.72.145.44
# ntpdate 133.100.9.2
210.72.145.44ÊÇÖйú¹ú¼ÒÊÚʱÖÐÐĵĹٷ½·þÎñÆ÷
133.100.9.2 À´×Ô£ºÈÕ±¾
ÅäºÏɨ»Æ½Øͼ¾ÍËãÁË
Ïà¹ØÎĵµ£º
--ÈÕÆÚת»»ºÁÃë
SELECT TO_NUMBER(TO_DATE('2005-03-29 12:30:45', 'YYYY-MM-DD HH24:MI:SS') -
TO_DATE('1970-01-01 8:0:0', 'YYYY-MM-DD HH24:MI:SS')) * 24 * 60 * 60 * 1000
from DUAL;
--ºÁÃëת»»ÈÕÆÚ
SELECT TO_CHAR(1112070645000 / (1000 * 60 * 60 * 24) +
TO_ ......
Create directoryÈÃÎÒÃÇ¿ÉÒÔÔÚOracleÊý¾Ý¿âÖÐÁé»îµÄ¶ÔÎļþ½øÐжÁд²Ù×÷£¬¼«´óµÄÌá¸ßÁËOracleµÄÒ×ÓÃÐԺͿÉÀ©Õ¹ÐÔ¡£
ÆäÓ﷨Ϊ:
CREATE [OR REPLACE] DIRECTORY directory AS 'pathname';
±¾°¸Àý¾ßÌå´´½¨ÈçÏÂ:
create or replace directory exp_dir as '/tmp';
Ŀ¼´´½¨ÒԺ󣬾ͿÉÒ԰ѶÁдȨÏÞÊÚÓèÌض¨Óû§ ......
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
cn.Open "Provider=OraOLEDB.Oracle.1;Persist Security Info= ......
²»´íµÄ×ÊÁÏ,ת¹ýÀ´,·½±ãÈÕºó²é¿´Ê¹ÓÃ!!!
--¼à¿ØË÷ÒýÊÇ·ñʹÓÃ
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,sin ......
SQLµÄÓÅ»¯Ó¦¸Ã´Ó5¸ö·½Ãæ½øÐе÷Õû£º
1.È¥µô²»±ØÒªµÄ´óÐͱíµÄÈ«±íɨÃè
2.»º´æСÐͱíµÄÈ«±íɨÃè
3.¼ìÑéÓÅ»¯Ë÷ÒýµÄʹÓÃ
4.¼ìÑéÓÅ»¯µÄÁ¬½Ó¼¼Êõ
5.¾¡¿ÉÄܼõÉÙÖ´Ðмƻ®µÄCost
SQLÓï¾ä£º
ÊǶÔÊý¾Ý¿â(Êý¾Ý)½øÐвÙ×÷µÄΩһ;¾¶£»
ÏûºÄÁË70%~90%µÄÊý¾Ý¿â×ÊÔ´£»¶ÀÁ¢ÓÚ³ÌÐòÉè¼ÆÂß¼£¬Ïà¶ÔÓÚ¶Ô³ÌÐòÔ´´úÂëµÄÓÅ»¯£¬¶ÔSQLÓï¾äµÄÓÅ»¯Ô ......