sql serverÇå³ýÈÕÖ¾
1: ɾ³ýLOG (ɾ³ýlogÎļþ£¬¸½¼Óʱ×Ô¶¯Öؽ¨logÎļþ£¬ÒÔ´Ë·½Ê½À´Çå¿ÕÈÕÖ¾)
1) ·ÖÀëÊý¾Ý¿â ÆóÒµ¹ÜÀíÆ÷££¾·þÎñÆ÷££¾Êý¾Ý¿â££¾ÓÒ¼ü££¾·ÖÀëÊý¾Ý¿â
2) ɾ³ýLOGÎļþ
3) ¸½¼ÓÊý¾Ý¿â ÆóÒµ¹ÜÀíÆ÷££¾·þÎñÆ÷££¾Êý¾Ý¿â££¾ÓÒ¼ü££¾¸½¼ÓÊý¾Ý¿â
´Ë·¨Éú³ÉеÄLOG£¬´óСֻÓÐ500¶àK
2:Çå¿ÕÈÕÖ¾ (ÈÕÖ¾ÊÕËõ·½Ê½Çå¿ÕÈÕÖ¾)
1) DUMP TRANSACTION ¿âÃû WITH NO_LOG
2) ÆóÒµ¹ÜÀíÆ÷--ÓÒ¼üÄãҪѹËõµÄÊý¾Ý¿â--ËùÓÐÈÎÎñ--ÊÕËõÊý¾Ý¿â--ÊÕËõÎļþ--Ñ¡ÔñÈÕÖ¾Îļþ--ÔÚÊÕËõ·½Ê½ÀïÑ¡ÔñÊÕËõÖÁXXM,ÕâÀï»á¸ø³öÒ»¸öÔÊÐíÊÕËõµ½µÄ×îСMÊý,Ö±½ÓÊäÈëÕâ¸öÊý,È·¶¨¾Í¿ÉÒÔÁË
3: Èç¹ûÏëÒÔºó²»ÈÃËüÔö³¤
ÆóÒµ¹ÜÀíÆ÷££¾·þÎñÆ÷££¾Êý¾Ý¿â££¾ÊôÐÔ££¾ÊÂÎñÈÕÖ¾££¾½«ÎļþÔö³¤ÏÞÖÆΪ2M
Ïà¹ØÎĵµ£º
string str = System.Configuration.ConfigurationManager.AppSettings["strconn"];
string sqlpwd = "select password from bg_user where username='" + username + "'";
MySqlConnection conn = new MySqlConnection(str);
MySqlCommand cmd=new MySqlCommand(sqlpwd,conn);
MySqlDataAdapter adr = new MySqlDataA ......
SQL server°²×°Ê±±¨¹ÒÆð´íÎó
SQL server°²×°Ê±Ê±£º¡°ÒÔÇ°µÄij¸ö³ÌÐò°²×°ÒÑÔÚ°²×°¼ÆËã»úÉÏ´´½¨¹ÒÆðµÄÎļþ²Ù×÷¡£ÔËÐа²×°³ÌÐò֮ǰ±ØÐëÖØÐÂÆô¶¯¼ÆËã»ú¡±´íÎó¡£ ´ò¿ª×¢²á±í±à¼Æ÷£¨¿ªÊ¼->ÔËÐÐ->regedit£©£¬ÔÚHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session ManagerÖÐÕÒµ½PendingFileRenameOperationsÏîÄ¿£¬²¢É¾ ......
³£ÓÃSQL²éѯ£º
1¡¢²é¿´±í¿Õ¼äµÄÃû³Æ¼°´óС
select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
from dba_tablespaces t, dba_data_files d
where t.tablespace_name = d.tablespace_name
group by t.tablespace_name;
2¡¢²é¿´±í¿Õ¼äÎïÀíÎļþµÄÃû³Æ¼°´óС
select tablespace_name, file_id, ......
Sql ServerÖеÄÈÕÆÚÓëʱ¼äº¯Êý
1. µ±Ç°ÏµÍ³ÈÕÆÚ¡¢Ê±¼ä
select getdate()
2. dateadd ÔÚÏòÖ¸¶¨ÈÕÆÚ¼ÓÉÏÒ»¶Îʱ¼äµÄ»ù´¡ÉÏ£¬·µ»ØÐ嵀 datetime Öµ
ÀýÈ磺ÏòÈÕÆÚ¼ÓÉÏ2Ìì
select dateadd(day,2,'2004-10-15') --·µ»Ø£º2004-10-17 00:00:00.000
3. datediff ·µ»Ø¿çÁ½¸öÖ ......