EDC ’08 and Patrick Hynds
March 12, 2008
After a couple of delays, next month the EDC (Egyptian Developer Conference) ’08 will take place in Cairo, nothing has been announced yet about the agenda, place, speakers and topics, all we’ve got is “the mid of April”.
Patrick Hynds (MDC’s most famous speaker) has just confirmed his participation and announced the topics he will be speaking about in the conference.
see you all there!
How to shrink your SQL Server Database
November 6, 2007
What if you have a huge SQL Server Database and you can’t deal with it because of its huge size in Gigabytes or even Terabytes like your website traffic or your archive databases, and you need to get them backed up, or get a copy of them for your development reasons. Whatever it would be, at some point you will need to copy or move this DB somewhere else.
so you would need to shrink both data and log files to make this an easier process, here is an example:
for the data file:
USE UserDB; GO DBCC SHRINKFILE (DataFile1, 7); GO
this shrinks the size of the data file named DataFile1 in the UserDB database to 7MB, it doesn’t mean that it would force it to be 7MB or lose data, it means that it would shrink it to the minimum size it could be.
for the log file:
USE AdventureWorks; GO -- change the database recovery model to SIMPLE. ALTER DATABASE AdventureWorks SET RECOVERY SIMPLE; GO -- Shrink the truncated log file to 1 MB. DBCC SHRINKFILE (AdventureWorks_Log, 1); GO -- Reset the database recovery model. ALTER DATABASE AdventureWorks SET RECOVERY FULL; GO
this shrinks the log file in the AdventureWorks database to 1MB, to allow the DBCC SHRINKFILE command to shrink the file, the file is first truncated by setting the database recovery model to SIMPLE.
Read More:
DBCC SHRINKFILE (Transact-SQL)






