.sql file script too large to view in SSMS? [Error HRESULT E_FAIL]

Discussion in 'Databases' started by JägerSchmidt, May 17, 2012.

  1. hi all. i'm running into an issue that i need advice on.

    i'm following Winhosts (WH) "publishing your sql 2008 db to WH sql 2008 server" to the letter. i assume this is the only way to publish a DB to WH, other than using the .bak restore in CP, but i can't use that because your instructions state that you have to create the .bak using WH CP first before you can restore it back to WH.

    the DB i need to publish has an .mdf filesize of circa 565MB. i use VS08 to publish the DB as directed, which creates the .sql script. and the .sql file that results is a whopping 2.5 GB in size.

    i next go into SSMS, File >> Open and select the sql script. but on trying to open it, i get an error popup: "Error HRESULT E_FAIL has been returned from a call to COM component." everything dies there and the sql script will not open in SMSS, so there's no way for me to try to edit or execute it.

    i have run through this process with 2 other sql scripts that are both under 500MB in size, and it works without issue and i can publish them.

    i'm suspecting the problem may be that the file is just to big to open in SSMS. i don't think it's a memory issue on my hardware either, because i have 4GB of system RAM available.

    i need opinions/advice. if this is the only way i can publish to Winhost, it's a dealbreaker and i will have to cancel my account.

    i am on win7, sql srvr 08 R2, and SSMS version 10.50.2500
     
    Last edited by a moderator: Oct 14, 2015
  2. hi again, just wanted to update: i made an attempt at publishing a local .BAK up to WH using the WHCP 'Restore' function. this seems to work so far.

    the reason i didn't try this before posting is because there seem to be 2 conflicting KB articles:

    1
    KB article: "How to transfer your local SQL database to a Winhost SQL database" very straight-forwardly seems to indicate that you can publish to WH using a local .BAK and then use WHCP to Restore it on the server.

    2
    KB article: "How do I generate (or restore) a backup of my MS SQL database?" states that: "The database restoration tool is intended to be used with backups generated in Control Panel only. If you create a backup on your local system and attempt to restore it to the live database the restoration may fail."

    which one is accurate? so far it seems to work but "the restoration may fail" does not inspire much confidence in me to upload data with this tool.
     
    Last edited by a moderator: Oct 14, 2015
  3. Elshadriel

    Elshadriel Winhost Staff

    The statement is generally correct because you may run into errors if you try to restore a backup that you upload. Here are some examples of backups that would fail:

    1) Restoring the wrong version of a SQL Server database.
    2) Having more than one .mdf file or .ldf file or using File Groups/Partitions (we don't support this).
    3) Not detaching the database properly prior to uploading or having uncommitted transactions.
    4) The maximum size of your local database exceeds the maxsize of the database you created at Winhost.

    If you run into a problem, you can open up a support ticket, and our staff will let you know why the restore operation failed.
     
    Last edited by a moderator: Oct 14, 2015
  4. thanks for the clarification Elsh. just a suggestion (take or leave), but it'd be nice to have the scenarios you listed added onto the KB article.

    reading "may fail" w/o any specific clarifications could make developers skittish (as it did me).
     

Share This Page