Sqlserver×Ô¶¯±¸·Ý
Ò»¡£SqlServer×Ô¶¯×÷Òµ±¸·Ý
1¡¢´ò¿ªSQL Server Management Studio
2¡¢Æô¶¯SQL Server´úÀí
3¡¢µã»÷×÷Òµ->н¨×÷Òµ
4¡¢"³£¹æ"ÖÐÊäÈë×÷ÒµµÄÃû³Æ
5¡¢Ð½¨²½Ö裬ÀàÐÍÑ¡T-SQL£¬ÔÚÏÂÃæµÄÃüÁîÖÐÊäÈëÏÂÃæÓï¾ä
DECLARE @strPath NVARCHAR(200)
set @strPath = convert(NVARCHAR(19),getdate(),120)
set @strPath=replace(@strPath,'-','')
set @strPath=replace(@strPath,' ','')
set @strPath=replace(@strPath,':','')
set @strPath=substring(@strPath,0,13)
set @strPath = 'D:\DataBack\' + DBName'+@strPath + '.bak'
BACKUP DATABASE [DBName] TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
£¨D:\DataBack\¸ÄΪ×Ô¼ºµÄ±¸·Ý·¾¶£¬DBNameÐÞ¸ÄΪÏ뱸·ÝµÄÊý¾Ý¿âµÄÃû³Æ£©
6¡¢Ìí¼Ó¼Æ»®£¬ÉèÖÃƵÂÊ£¬Ê±¼äµÈ¡£
È·¶¨£¬Íê³É¡£
Ïà¹ØÎĵµ£º
bcpÃüÁîÊÇSQL ServerÌṩµÄÒ»¸ö¿ì½ÝµÄÊý¾Ýµ¼Èëµ¼³ö¹¤¾ß¡£Ê¹ÓÃËü²»ÐèÒªÆô¶¯ÈκÎͼÐιÜÀí¹¤¾ß¾ÍÄÜÒÔ¸ßЧµÄ·½Ê½µ¼Èëµ¼³öÊý¾Ý¡£bcpÊÇSQL ServerÖиºÔðµ¼Èëµ¼³öÊý¾ÝµÄÒ»¸öÃüÁîÐй¤¾ß£¬ËüÊÇ»ùÓÚDB-LibraryµÄ£¬²¢ÇÒÄÜÒÔ²¢Ðеķ½Ê½¸ßЧµØµ¼Èëµ¼³ö´óÅúÁ¿µÄÊý¾Ý¡£bcp¿ÉÒÔ½«Êý¾Ý¿âµÄ±í»òÊÓͼֱ½Óµ¼³ö£¬Ò²ÄÜͨ¹ýSELECT fromÓï¾ä¶Ô±í»òÊÓ ......
ÔÚƽʱµÄ¹¤×÷¹ý³ÌÖУ¬×÷ΪDBA½ÇÉ«¹ÜÀíÊý¾Ý¿â£¬Í·ÄÔÖеÄÓ¡ÏóÍùÍùÊÇÊý¾Ý¿âʵÀýÃû³Æ£¬¶ø²»»áÈ¥¹ØÐÄServerµÄIP£¬¶ø×÷ΪDeveloperµÄ½ÇÉ«£¬ËûÃÇÍùÍùÏëÖªµÀÖªµÀServer IpºÍ¶Ë¿ÚºÅ¡£ËùÒÔ£¬DBA»á¾³£±»Îʼ°µ½£ºXXXʵÀýµÄIPºÍ¶Ë¿ÚºÅÊÇʲô£¿
Õâ¸öÎÊÌ⣬µ±È»ÎÒÃÇ¿ÉÒÔLoginµ½OS²é¿´IP¡¢Ê¹ÓÃÅäÖƹÜÀí¹¤¾ß»ñÈ¡µ½¶Ë¿ÚºÅ¡£µ«ÊÇ£¬Õâ¸ö·½·¨·Ç ......
΢ÈíµÄSQL SERVERÌṩÁËÁ½ÖÖË÷Òý£º¾Û¼¯Ë÷Òý(clustered index£¬Ò²³Æ¾ÛÀàË÷Òý¡¢´Ø¼¯Ë÷Òý)ºÍ·Ç¾Û¼¯Ë÷Òý(nonclustered index£¬Ò²³Æ·Ç¾ÛÀàË÷Òý¡¢·Ç´Ø¼¯Ë÷Òý)……
(Ò»)ÉîÈëdz³öÀí½âË÷Òý½á¹¹
ʵ¼ÊÉÏ£¬Äú¿ÉÒÔ°ÑË÷ÒýÀí½âΪһÖÖÌØÊâµÄĿ¼¡£Î¢ÈíµÄSQL SERVERÌṩÁËÁ½ÖÖË÷Òý£º¾Û¼¯Ë÷Òý(clustered index£¬Ò²³Æ¾ÛÀàË÷Òý¡¢´ ......
Õâ¸öÊÇÎÒ¼ÓÈëµÄQQȺÀïÃæÒ»¸öÍøÓÑÎʵÄÎÊÌâ¡£Ëû˵һ¸ö±í×öÒ»¸öINSERT¶¼»á³¬Ê±¡£ÕýÀ§»óÄØ£¬ÏòȺÀïÃæµÄÈËÇóÖú¡£ÎҸպöÔÕâ·½ÃæÖªµÀµã£¬¾Í»Ø´ðÁË˵ҪÓÅ»¯¾Û¼¯Ë÷Òý¡£Ëû²»Ã÷°×¾ßÌå¸ÃÔõô×ö£¬ËƺõÒ²²»ÖªµÀʲôÊǾۼ¯Ë÷Òý¡£ÎÒ¶ÔËû˵Äã¿ÉÒÔ¿´¿´Äã²åÈë¼Ç¼ʱµÄ´ÅÅÌIOÊÇ·ñ±È½Ï¶à£¬Ëû˵ËûµÄ´ÅÅÌÒѾ»»³ÉÁËRAID£¬²»ºÃ²é¿´´ÅÅÌIO¡£OK, ÎÒ¼Ì ......
µ±ÔÚC#ÓïÑÔÖУ¬Á¬½ÓsqlÊý¾Ý¿âµÄʱºò£¬³£Óõ½sqlconnection½¨Á¢ÓëÊý¾Ý¿âµÄÁ¬½Ó¡£ Óï·¨ÈçÏ£º
String sqlcon = "***";//ÕâÀïÊÇÒ»¸ö×Ö·û´®£¬¾ßÌå¸úÊý¾Ý¿âµÄÑéÖ¤·½Ê½Óйء£
//sql server Éí·ÝÑéÖ¤ Á¬½Ó×Ö·û´®
private string ConnstrSqlServer = "server=·þÎñÆ÷Ãû³ ......