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

Shrink SQL Server 2008 Database + Log File Script

Use DatabaseName
--DB shrink
--»ñÈ¡database ¿ÕÓà¿Õ¼ä£¬¡¡¾ö¶¨ÊÇ·ñ×÷shrinkDB
exec [DBNAME].dbo.sp_spaceused
DBCC ShrinkDB(DBNAME)
--Log file shrink
Use DatabaseName
GO
Alter Database DatabaseName Set Recovery Simple
GO
Alter Database DatabaseName Set Recovery Full
GO
DBCC SHRINKFILE ('LogFileName', 1)
GO
DBCC SHRINKFILE ('LogFileName', 1)
GO
DBCC SHRINKFILE ('LogFileName', 1)
GO
DBCC SHRINKFILE ('LogFileName', 1)
GO
DBCC SHRINKFILE ('LogFileName', 1)
GO
DBCC SHRINKFILE ('LogFileName', 1)
GO


Ïà¹ØÎĵµ£º

Ñ­Ðò½¥½ø½²½âSQL²éѯÓï¾ä¸ß¼¶Ó¦Óü¼ÇÉ

Ò»¡¢ ¼òµ¥²éѯ
¼òµ¥µÄTransact-SQL²éѯֻ°üÀ¨Ñ¡ÔñÁÐ±í¡¢from×Ó¾äºÍWHERE×Ӿ䡣ËüÃÇ·Ö±ð˵Ã÷Ëù²éѯÁС¢²éѯµÄ
±í»òÊÓͼ¡¢ÒÔ¼°ËÑË÷Ìõ¼þµÈ¡£
ÀýÈ磬ÏÂÃæµÄÓï¾ä²éѯtesttable±íÖÐÐÕÃûΪ“ÕÅÈý”µÄnickname×ֶκÍemail×ֶΡ£
SELECT nickname,email
from testtable
WHERE name='ÕÅÈý'
 
(Ò») Ñ¡Ôñ ......

¡¾SQL SERVERÖÐһЩÌرðµØ·½µÄÌرð½â·¨2¡¿


/*----------------------------------------------------------------
-- Author  :feixianxxx(poofly)
-- Date    :2010-04-20 20:10:41
-- Version:
--      Microsoft SQL Server 2008 (SP1) -  ......

SQL Server 2005°²×°Ê§°ÜµÄ´¦Àí·½·¨

ÔÚ°²×°SQL Server 2005¿ª·¢°æʱ³öÏÖÎÊÌâ¡£°²×°»·¾³Îªwindows xp sp3£¬°²×°Óû§Ê¹Ó󬼶¹ÜÀíÔ±£¨Administrator£©¡£³öÏֵĴíÎóÊÇ
ÔÚ°²×°“Integration Services”²½Öèʱ³öÏÖ°²×°´íÎó£¬Ìáʾ“´íÎó: -2146233087”¡£
´íÎó¼Ç¼
±êÌâ:
Microsoft SQL Server 2005 °²×°³ÌÐò
ÎÞ·¨ÔÚ COM+ Ŀ¼Öа²×°ºÍÅäÖ ......

.NETѧϰÊÖ¼ÇÖ®£ºlinq to SQL(Ò»)


Ò»¸ö¼òµ¥µÄÀý×Ó£º
ÏȽ¨Ò»¸öC#Àࣺ
ÒýÓÃSystem.Data.Linq.dll³ÌÐò¼¯£¬
using System.Data.Linq.MappingºÍ
using System.Data.Linq Á½¸ö¿Õ¼ä¡£
[Table]
public class Inventory
{
   [Column]
   public string Make;
   [Column]
   public string Color;
 &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ