SQL Server Error - HRESULT E_FAIL has been returned from a call to a COM component I have a huge 200MB .SQL file. When I try to open this in SQL server management studio 2008, I get the error -Error HRESULT E_FAIL has been returned from a call to a COM component.

What could the reason be and how to fix it ? Is this caused due to big files ? It does not happen when I open a 2-3 KB file.
You probably cannot open the file due to lack of memory.  A 200GB 200MB .sql file is very, very big.  You could process the file using SQLCMD.exe instead of SQL Server Management Studio.