Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How pack MDF file like VFP pack command
Message
 
To
11/01/2005 15:27:35
General information
Forum:
Microsoft SQL Server
Category:
Database management
Miscellaneous
Thread ID:
00976086
Message ID:
00976230
Views:
11
If that doesn't work you may need to just do a check point in the log file to get the ldf to shrink.

Check out
BACKUP LOG databasename WITH TRUNCATE_LOG

then shrink the database and log files, this is provided you have done a backup of the database prior to executing this command.

>Hi
>
>Execute the following commands in Query Analyzer:
>
>
>DBCC SHRINKFILE(LogFileName,1)
>BACKUP LOG DataFileName WITH TRUNCATE_ONLY
>DBCC SHRINKFILE(LogFileName,1)
>DBCC SHRINKDATABASE(DataFileName,10)
>
>
>The above piece of code assumes that DataFileName is the name of your database's data file, and LogFileName is the name of your database's log file, which usually is the same as data file name + "_log".
>
>Alternatively, this operation can be done in Enterprise manager.
>
>Hope this helps.
>
>
>>Hi All,
>>i wantto shrink MDF file like VFP pack command or compact DB like in Access. How can i do this ?
>>
>>TIA
Shawn Dorion
Geo Sektor Dot Com
Website: http://www.geosektor.com

Web Hosting Plans
Visit : http://WebHosting.Applications4u.com/
Previous
Reply
Map
View

Click here to load this message in the networking platform