Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How pack MDF file like VFP pack command
Message
 
À
11/01/2005 15:27:35
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Divers
Thread ID:
00976086
Message ID:
00976230
Vues:
10
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/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform