Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
elaine
Starting Member
6 Posts |
Posted - 2012-01-22 : 11:50:44
|
Currently we have about 5000 .sql files and want to combine them in a big file(about 45GB) and then import into the SQL server database.I have completed the combination right now. But when I try to import the final big .sql file into SQL database by SQL server-file-open...It did not work at all, and returned an error:Error HRESULT E_FAIL has been returned from a call to a COM component.But when I only import one small size file (500K) into SQL server, it works very well.Does anyone know how to solve the problem?Really thanks a lot. Otherwise, I have import the file into database for 5000 times..... |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-01-22 : 13:44:20
|
I assume you mean data files rather than sql scripts.HRESULT E_FAIL is the most generic of COM messages - it just tells you that whatever you were trying failed. First time I saw that error message my reaction was, "Yeah Einstein! like I needed YOU to tell me that!!". http://msdn.microsoft.com/en-us/library/bb401631.aspx If you have a return code that is different from 0x80004005 somewhere in your call stack, that may help.Given that the error code is of not much help, my suggestion would be one or more of the following:1. Instead of trying to combine the 5000 files at the first attempt, combine 2 files and see if that works. If it does, try 20 files, and so on.2. Depending on how you are sending the data to SQL server, your database settings etc., it very well could be that your server is running out of disk space because the log file is growing too large. Without knowing the specifics of your database and details of how you are importing it that is just a wild guess.3. You know your business requirements better than I do, and I hope I don't come across as being presumptuous, but why combine the files at all? Let the computer worry about the five thousand files, and let IT process the files. |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2012-01-22 : 14:57:22
|
As I posted in your other thread...Why are you using .sql files to import huge amounts of data? Surely something like BCP or bulk insert with an appropriately delimited source file would be way easier (easier to produce, easier to insert)--Gail ShawSQL Server MVP |
|
|
|
|
|
|
|