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

MS SQL 2000 °²È«ÉèÖÃ

¡¡¡¡ÈÕÇ°SQL INJECTIONµÄ¹¥»÷²âÊÔÓúÑÝÓúÁÒ£¬ºÜ¶à´óÐ͵ÄÍøÕ¾ºÍÂÛ̳¶¼Ïà¼Ì±»×¢Èë¡£ÕâЩÍøÕ¾Ò»°ãʹÓõĶàΪSQL SERVERÊý¾Ý¿â£¬ÕýÒòΪÈç´Ë£¬ºÜ¶àÈË¿ªÊ¼»³ÒÉSQL SERVERµÄ°²È«ÐÔ¡£ÆäʵSQL SERVER 2000ÒѾ­Í¨¹ýÁËÃÀ¹úÕþ¸®µÄC2¼¶°²È«ÈÏÖ¤-ÕâÊǸÃÐÐÒµËùÄÜÓµÓеÄ×î¸ßÈÏÖ¤¼¶±ð£¬ËùÒÔʹÓÃSQL SERVER»¹ÊÇÏ൱µÄ°²È«µÄ¡£µ±È»ºÍORCAL¡¢DB2µÈ»¹ÊÇÓвî¾à£¬µ«ÊÇSQL SERVERµÄÒ×ÓÃÐԺ͹㷺ÐÔ»¹ÊÇÄܳÉΪÎÒÃǼÌÐøʹÓÃÏÂÈ¥µÄÀíÓÉ¡£ÄÇÔõôÑù²ÅÄÜʹSQL SERVERµÄÉèÖÃÈÃÈËʹÓõķÅÐÄÄØ£¿
¡¡¡¡µÚÒ»²½¿Ï¶¨ÊÇ´òÉÏSQL SERVER×îÐµİ²È«²¹¶¡£¬ÏÖÔÚ²¹¶¡ÒѾ­³öµ½ÁËSP3£¬ÏÂÔصØÖ·£ºhttp://www.microsoft.com/sql/downloads/2000/sp3.asp ¡£Èç¹ûÕâÒ»²½¶¼Ã»ÓÐ×öºÃ£¬ÄÇÎÒÃÇҲûÓмÌÐøÏÂÈ¥µÄ±ØÒªÁË¡£
¡¡¡¡µÚ¶þ²½ÊÇÐÞ¸ÄĬÈϵÄ1433¶Ë¿Ú£¬²¢ÇÒ½«SQL SERVERÒþ²Ø¡£ÕâÑùÄܽûÖ¹¶ÔÊÔͼö¾ÙÍøÂçÉÏÏÖÓÐµÄ SQL Server ¿Í»§¶ËËù·¢³öµÄ¹ã²¥×÷³öÏìÓ¦¡£ÁíÍ⣬»¹ÐèÒªÔÚTCP/IPɸѡÖн«1433¶Ë¿ÚÆÁ±Îµô£¬¾¡¿ÉÄܵÄÒþ²ØÄãµÄSQL SERVERÊý¾Ý¿â¡£ÕâÑù×ÓÒ»µ«Èù¥»÷´´½¨ÁËSQL SERVERµÄÕ˺ţ¬Ò²²»ÄÜÂíÉÏʹÓòéѯ·ÖÎöÆ÷Ô¶³ÌµÇ½À´½øÐÐÏÂÒ»²½µÄ¹¥»÷¡£µ¥´ÓASP£¬PHPµÈÒ³Ãæ¹¹Ôì¶ñÒâÓï¾äµÄ»°£¬»¹ÓÐÐèÒª²é¿´·µ»ØÖµµÄÎÊÌ⣬×Ü±È ²»ÉÏÖ±½Ó²éѯ·ÖÎöÆ÷À´µÃÀûÂä¡£ËùÒÔÎÒÃÇÊ×ÏÈÒª×öµ½¼´Ê¹ÈñðÈË×¢ÈëÁË£¬Ò²²»ÄÜÈù¥»÷ÕßÏÂÒ»²½×öµÃ˳µ±¡£Ð޸ķ½·¨£ºÆóÒµ¹ÜÀíÆ÷ --> ÄãµÄÊý¾Ý¿â×é --> ÊôÐÔ --> ³£¹æ --> ÍøÂçÅäÖà --> TCP/IP --> ÊôÐÔ £¬ÔÚÕâ¶ù½«ÄãµÄĬÈ϶˿ڽøÐÐÐ޸ģ¬ºÍSQL SERVERµÄÒþ²Ø¡£
¡¡¡¡µÚÈý²½ÊǺÜÖØÒªµÄÒ»²½£¬SQL INJECTIONÍùÍùÔÚWEB CODEÖвúÉú¡£¶ø×öΪϵͳ¹ÜÀíÔ±»òÕßÊý¾Ý¿â¹ÜÀíÔ±£¬×ܲ»Äܳ£³£µÄÈ¥¿´Ã¿Ò»¶Î´úÂë¡£¼´Ê¹³£³£¿´´úÂ룬Ҳ²»Äܱ£Ö¤ÎÒÃÇÔÚÉÏÃæµÄÊèºö¡£ÄÇÔõô°ì£¿ÎÒÃǾÍÒª´ÓÊý ¾Ý¿â½ÇÉ«×ÅÊÖ£¬ÈÃÊý¾Ý¿âÓû§µÄȨÏÞ»®·Öµ½×îµÍµã¡£SQL SERVERµÄĬÈÏȨÏÞÈÃÈËÕæµÄºÜÍ·ÌÛ£¬È¨ÏÞ´óµÃ·Ç³£µÄ¸ß£¬È¨ÏÞСµÄÓÖʲô¶¼×ö²»ÁË£¬SYSADMINºÍdb_ownerÕæÊÇÈÃÈËÓÖ°®ÓÖºÞ¡£¹¥»÷ÕßÒ»µ«È· ÈÏÁËÍøÕ¾´æÔÚSQL INJECTION©¶´£¬¿Ï¶¨ÓÐÒ»²½²Ù×÷²½Öè¾ÍÊDzâÊÔÍøÕ¾µÄSQL SERVERʹÓÃÕß¾ßÓжà´óµÄȨÏÞ¡£Ò»°ã¶¼»á½èÖúSELECT IS_SRVROLEMEMBER('sysadmin')£¬»òÕßSELECT IS_MEMBER('db_owner')£¬ÔÙ»òÕßÓÃuser = 0(ÈÃ×Ö·ûºÍÊý×Ö½øÐбȽϣ¬SQL SERVER¾Í»áÌáʾÁË´íÎóÐÅÏ¢£¬´Ó¸ÃÐÅÏ¢Öм´¿ÉÖªµÀһЩÃô¸ÐÐÅÏ¢)µÈÓï¾ä½øÐвâÊÔ¡£·½·¨»¹ÓУ¬ÎÒÒ²²»¸Ò¶à˵ÁË¡£ÆäÒ»ÅÂ´í£¬Æä¶þÅÂÁªÃËÖеÄÈ˱⡣ÔÚµ±Ç°£¬Èç¹ûÍøÕ¾µÄÊý¾Ý¿âʹÓÃÕßÓõÄÊÇSAȨÏÞ£¬ÔÙ¼ÓÉÏÈ·ÈÏÁ


Ïà¹ØÎĵµ£º

±Ø±¸sqlÓï¾ä

 1.¶Á³ö±íÖеÄ×Ö¶ÎÃû
ResultSet  rs = test.selectSql("SELECT * from datainfo");  
java.sql.ResultSetMetaData md=rs.getMetaData();   //¶Á³öÊý¾Ý¿âµÄ×Ö¶ÎÃû
   int nColumn=md.getColumnCount();   //×Ö¶Î×ÜÊý
   for(int i=0;i<nColumn;i++)
& ......

ÈçºÎ²é¿´SQL Server ²¹¶¡µÄ°æ±¾£¿

 Õâ¸öÌâÄ¿ÌýÆðÀ´Ê®·ÖÞÖ¿Ú£¬Ó¢ÎÄÓ¦¸ÃÕâÑùд“How to find the service pack version installed on SQL Server using”£¬Õâ¸öÎÊÌâÎÒÒ»Ö±ÔÚÕÒ£¬SQL ServerһֱûÓÐÏñÆäËûÈí¼þÒ»Ñù¿ÉÒÔÖ±½Ó²é¿´µ½°æ±¾+²¹¶¡ºÅµÄ·½·¨£¬½ñÌìµ½Ò»¸öÀÏÍâµÄÍøÕ¾ÖÕÓÚÕÒµ½ÁË£º
ÓÐÁ½ÖÖ·½·¨£º
µÚÒ»²½£ºÊ¹ÓÃSQLÓï¾ä²éѯ
select @@version ......

SQL SERVERÈÕÆÚʱ¼äº¯Êý

 À´Ô´http://hi.baidu.com/smilevt/blog/item/04bddeef0fe3f42e2cf5348b.htmlÕâÀﻹÓкܶàsql serverµÄÌû×Ó
1. µ±Ç°ÏµÍ³ÈÕÆÚ¡¢Ê±¼ä
select getdate()
2. dateadd ÔÚÏòÖ¸¶¨ÈÕÆÚ¼ÓÉÏÒ»¶Îʱ¼äµÄ»ù´¡ÉÏ£¬·µ»ØÐ嵀 datetime Öµ
ÀýÈ磺ÏòÈÕÆÚ¼ÓÉÏ2Ìì
select dateadd(day,2,'2004-10-15') --·µ»Ø£º2004-10-17 00:00:00. ......

shellÖÐʹÓÃSQLʵÏÖ²éѯ

 ÏÈ°ÑÎı¾½øÐиñʽ´¦Àí£¬È»ºóÒÔ¿Õ¸ñΪ·Ö¸ô·û£¬È¡µÚ¶þ¸ö¿Õ¸ñºóµÄ×Ö´®£¬ÅÅÐò£¬È¥ÖØ£¬ÔÙ½µÐòÅÅÁУ¬È¡Ç°5¸ö
arr=($(cat 0100055F_Detail.txt|sed -e '/:/d'|awk -F ' ' '{print$2}'|sort|uniq -c|sort -nr|head -5|awk '{print $2}'))
len=${#arr[@]}  »ñÈ¡Êý×鳤¶È
for((i=0;i<$len;i++))
do
echo ${arr[$i] ......

dz̸»ùÓÚSQL Server ·ÖÒ³´æ´¢¹ý³ÌµÄÑݽø

 ¼òµ¥Ì¸»ùÓÚSQL SERVER ·ÖÒ³´æ´¢¹ý³ÌµÄÑݽø
×÷ÕߣºÖ£×ô
ÈÕÆÚ£º2006-9-30
Õë¶ÔÊý¾Ý¿âÊý¾ÝÔÚUI½çÃæÉϵķÖÒ³ÊÇÀÏÉú³£Ì¸µÄÎÊÌâÁË£¬ÍøÉϺÜÈÝÒ×ÕÒµ½¸÷Ö֓ͨÓô洢¹ý³Ì”´úÂ룬¶øÇÒÓÐЩ»¹¶¨ÖƲéѯÌõ¼þ£¬¿´ÉÏȥʹÓúܷ½±ã¡£±ÊÕß´òËãͨ¹ý±¾ÎÄÒ²À´¼òµ¥Ì¸Ò»Ï»ùÓÚSQL SERVER 2000µÄ·ÖÒ³´æ´¢¹ý³Ì£¬Í¬Ê±Ì¸Ì¸SQL SER ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ