Database Blues

Discussion in 'Databases' started by giorgiogobbo, Nov 23, 2013.

  1. We are trying to upload an existing DotNetNuke website, which has been previously running on another host and has an existing MSSQL database of 41Mb in a .BAK format.

    The article in the knowledge base "How do I restore a backup file to my Winhost database" is not really helpful since it seems to pertain to databases which have been backed up via the Winhost control panels.

    There seems to be restrictions to the name's size and its format (i.e. _backup at the end of the name?). However even when complying to the restrictions and restoring it via the MS SQL Manager we get " Restore failed. The backup is larger than your allotted SQL database size". Since we have an allocation of 1000Mb this is clearly not the way to go.

    The installation of DNN has created a DB in /app_data called Database.mdf but we cannot see how it relates to what we are trying to achieve.

    So for now we are stumped. Where do we go from here?
     
    Last edited by a moderator: Oct 14, 2015
    hbfraser likes this.
  2. ComputerMan

    ComputerMan Winhost Staff

    In the current .bak file that you have locally on your computer. Try to restore it locally and check the real size of the SQL database you're trying to restore.

    Remember, just because the .bak file is 41 MB in size. Doesn't mean that once it has been restored it's only 41 MB in size. It could by much larger.

    The only way to get the real size of the SQL database that you're trying to restore. Is to restore it locally first using SQL Server Management Studio. Then check the real size of the SQL database by right clicking on it.

    Select "Properties" and click on "Files".

    This will give you the right size of the current SQL database you're trying to restore.

    Check how big your MDF (the data file) & LDF (log file) file is.

    Make sure that the LDF file is below 1000 MB and make sure that the MDF file is below 1000 MB of disk space.
     
    hbfraser and Michael like this.

  3. Ok I've done that and the DB is only 90Mb... however I understand now that I need to attach the db not restore it. However I cannot find the option
    from what this article says,
    http://support.Winhost.com/KB/a1043/attach-database-tool.aspx
    it should be here
    Home >> Sites List >> Site Manager >> MS SQL Manager >> Manage
    but the last Option "Manage" does not appear
     
    Last edited by a moderator: Oct 14, 2015
    hbfraser likes this.
  4. rum

    rum Winhost Staff

    You need to do the following things in order to transfer your database from previous host to Winhost:

    1. Restore the backup to your local SQL Server running on your desktop computer
    2. Connect to your local database with Management Studio and make sure that the initial sizes of your raw data and log files of your database are small. I suggest you to set the initial size of your data file to 10 MB and the size of your log file to 1 MB. Please see the screen shot attached. I suggest to set the initial size and auto grouth for your files exactly as you see on the screen shot.
    3. Backup your local database in Management Studio
    4. Upload your newly created backup with .bak extension to your site
    5. Restore this backup to your Winhost database.

    ScreenShot.jpg
     
    Last edited by a moderator: Oct 14, 2015
    hbfraser, Michael and ComputerMan like this.

Share This Page