How to clear MS SQL Server Database log file on GoDaddy
GoDaddy does not allow webmaster to clear the MS SQL Server database log file. And the Database file size is limited to 200 MB. I used to call GoDaddy to truncate the log file. However, it is really time consuming.
Using following workflow I can successfully truncate my SQL Server log file.
1. Create a new MS SQL Server DB name it as NDTemplate.
2. Backup this database as an empty database. The backup file is about 1.6MB
3. Backup the original DB that you need to truncate. At my case this backup file is about 200MB.
4. Generate database script for the full database, and execute this sql script against the empty database.
5. Export the data in the Database to the new DB
6. Backup the new DB again and restore it against the original DB. Now the database will have all the data and structure. But the log file is minimized. It will only include the initial insert log.
Comments
Post a Comment