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

¶¨ÆÚɾ³ý±¸·ÝµÄSQLÊý¾Ý¿âµÄ½Å±¾

  ±ÈÈçij¸öÊý¾Ý¿â϶ÔSQL SERVERµÄÊý¾Ý¿â½øÐÐÁËÿÌìµÄ±¸·Ý£¬ÏÖÔÚÒª±£Áô7ÌìÒÔÄڵģ¬ÆäËûµÄɾ³ýµô£¬ÓÃASP¿ÉÒÔʵÏÖÁË£¬µ«ÒªÓõ½filesystemobject£¬²»´óˬ
    Ê×ÏÈдһ¸öjsÎļþclearDatabaseBackup£¬ÄÚÈÝÈçÏÂ
function deleteBackupFile(beforedays) {
    var fso = new ActiveXObject("Scripting.FileSystemObject");
    var dir = fso.GetFolder("D:\\Êý¾Ý¿â±¸·Ý");    //¸Ä³ÉÄãµÄÊý¾Ý¿â±¸·ÝĿ¼
    for (var fc = new Enumerator(dir.SubFolders); !fc.atEnd(); fc.moveNext()) {
//¼ÙÉèÊý¾ÝÎļþµÄ±¸·ÝÎļþ¶¼ÊÇÒÔabc_log¿ªÍ·µÄ£¬±ÈÈçabc_log_xxxx
        if (fc.item().name.substr(0,9) == "abc_log") {
            for (var logfiles = new Enumerator(fc.item().Files); !logfiles.atEnd(); logfiles.moveNext()) {
                var fileName = logfiles.item().name;
                var year = "20" + fileName.substr(19, 2);
                var month = fileName.substr(21, 2);
                var day = fileName.substr(23, 2);
                var days = Math.round(((new Date()).getTime() - Date.UTC(year, month - 1, day)) / 1000 / 60 / 60 / 24);
                if (days >= beforedays) logfiles.item().Delete();
            }
        }
    }
}
//±£´æÒ»ÖÜÄÚµÄÊý¾Ý¿â±¸·ÝÎļþ
deleteBackupFile(7);
È»ºóдһ¸öBATÎļþ£¬¼ÓÈëµ½ÈÎÎñ¼Æ»®
cscript clearDatabaseBackup.js


Ïà¹ØÎĵµ£º

Orcale SQLÓÅ»¯

1.ORACLE²ÉÓÃ×Ô϶øÉϵÄ˳Ðò½âÎöWHERE×Ó¾ä,¸ù¾ÝÕâ¸öÔ­Àí,±íÖ®¼äµÄÁ¬½Ó±ØÐëдÔÚÆäËûWHEREÌõ¼þ֮ǰ, ÄÇЩ¿ÉÒÔ¹ýÂ˵ô×î´óÊýÁ¿¼Ç¼µÄÌõ¼þ±ØÐëдÔÚWHERE×Ó¾äµÄĩβ. 
(µÍЧ) 
SELECT … from EMP E WHERE SAL > 50000 AND JOB = ‘MANAGER’ AND 25 < (SELECT COUNT(*) from EMP WHERE MGR=E. ......

¸øPL/SQL´´½¨Õ˺š¢ÃÜÂëºÍ¸¶È¨ÏÞ

¸øPL/SQL´´½¨Õ˺š¢ÃÜÂëºÍ¸¶È¨ÏÞ
CREATE USER zxd  PROFILE "DEFAULT" IDENTIFIED BY zxd DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK
grant dba to "zxd";
F:\oracle\ora92\network\admin  Â·¾¶ÏÂtnsnames.ora
ZXD =
  (DESCRIPTION =
  &nb ......

ÒÔ¿ìÕÕ¸´ÖÆΪÀý SQL SERVER 2005 ͬ²½¸´ÖƼ¼Êõ

SQL SERVER 2005 ͬ²½¸´ÖƼ¼Êõ
ÒÔÏÂʵÏÖ¸´ÖƲ½Ö裨ÒÔ¿ìÕÕ¸´ÖÆΪÀý£©
ÔËÐÐƽ̨SQL SERVER 2005
Ò»¡¢×¼±¸¹¤×÷£º
1£®½¨Á¢Ò»¸ö WINDOWS Óû§£¬ÉèÖÃΪ¹ÜÀíԱȨÏÞ£¬²¢ÉèÖÃÃÜÂ룬×÷Ϊ·¢²¼¿ìÕÕÎļþµÄÓÐЧ·ÃÎÊÓû§¡£
2£®ÔÚSQL SERVERÏÂʵÏÖ·¢²¼·þÎñÆ÷ºÍ¶©ÔÄ·þÎñÆ÷µÄͨÐÅÕý³££¨¼´¿ÉÒÔ»¥·Ã£©¡£´ò¿ª1433¶Ë¿Ú£¬ÔÚ·À»ðǽÖÐÉèÌØÀ ......

ÈçºÎдsqlµÄµÝ¹é²éѯÓï¾ä?

cpcbid    cpcbbh          type  parentid  parentbh            cbze
70      2009120001      11      NULL        NU ......

SQL Óï¾äÓÅ»¯(¸öÈËժ¼)

£¨1£©Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º 
ORACLE µÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡£Èç¹ûÓÐ3¸öÒÔÉϵıíÁ¬½Ó²éѯ, ÄǾÍÐèҪѡÔñ½»²æ±í(interse ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ