DiscountASP.NET Support Portal
Language
 
Home>Knowledge Base>Databases>MS SQL 2005>SQL 2005 Management Tools
Information
Article ID191
Created On11/13/2008
Modified8/5/2009
SQL 2005 Management Tools
Shrink Database tool
This tool shrinks the data file to help customers reduce their SQL disk space usage. It is recommended that you run this tool when your database size grown to 80% of the allotted size.  We do not recommend running this tool more than once a day.

Backup Database tool
This tool creates a real-time backup of your SQL database and copies the file to your web site root. The file will be named: <DBNAME>_backup.bak or <DBNAME>_backup.zip, depending on the backup format that you choose.

We recommend using the zip format for backups that you are archiving, as the file size is considerably smaller than the bak file, so your downloading and storage requirements will be much less. If you are making a backup for rollback purposes (for example, before making a change to your database), use the bak format.

You can only save one copy of each format of database backup in your site (1 zip and 1 bak).

The .bak format database backup is intended for restoration on our database server. Though technically possible, we cannot provide support for restoring a database backup from your own SQL server.

Restore Database tool
This tool allows you to restore a database backup (generated by the Backup Database Tool) to your database.

Note that a zip file cannot be uploaded and used to restore your database, and that all existing data in the database will be overwritten when you use this tool!

Follow the steps below to restore a database:
  1. Upload a .bak file generated by the Backup Database Tool to your web site
  2. Log in to the SQL 2005 Manager in your control panel
  3. Navigate to the "SQL Tools" menu
  4. Select the database you want to restore the .bak file to
  5. Enter the path to the .bak file. For example, \backup.bak
  6. Click the "Restore Backup" button
Attach MDF file tool
This tool allows you to attach a local SQL 2005 or local SQL 2005 Express data file to the SQL 2005 database hosted on our server.

Note: all existing data in the database will be overwritten!

Follow the steps below to attach a database:
  1. Detach the local SQL database. There are various ways to do this:
    • Using VS.NET 2005/Visual Web Developer:
      • Right click on the database icon in the Solution Explorer
      • Select "Detach"
    • Using SQL Management studio:
      • Open SQL Management Studio
      • Expand the database node
      • Right click on the database you want to upload/attach to our SQL server
      • Select Tasks -> Detach
  2. Upload the database file (.mdf) to your web site
  3. Log in to the SQL 2005 section in your control panel and navigate to the SQL Tools tab  
  4. Select the database you want to attach the MDF file to
  5. Input the path to the .mdf file. For example, \club.mdf
  6. Click the "Attach Database" button