SQL Server data import problem: Error "call to COM component returned wrong HRESULT E_FAIL"

Source: Internet
Author: User

The database used by the customer is older, SQL Server 2008, and two SQL files are exported.

With the help of OPS, SQL Server 2008 is installed and configured in the WIN10 system.

Open the first file, no problem, build the appropriate database, run the script, you can import.

The second file encountered a problem, always error "the call to COM components returned a false HRESULT E_fail"

The solution that the search engine gives is to start and configure the DTC service, to make sure that the "Distributed Transaction Coordinator" service is open and allows permission to operate, after a great deal of work, it doesn't solve the problem. Finally, a comparison of two files found that the first file size was only 1 m, the second is 3G, the suspicion is that Microsoft has limited the size of the file, the subsequent search found that this is true.

SQL Server 2008 opens a script file with an error of more than 80M. The workaround is to execute the SQL statement using the SQLCMD method. In the cmd window, enter the following command:

Sqlcmd-usa-p123-i E:\test.sql

Several parameters are user name, password, and file in turn.

Spit Groove: 1 Microsoft's software always has a lot of inexplicable limitations, 2 error is inexplicable, the document is too large to report the file overrun errors, you can go a lot less detours.

SQL Server data import problem: Error "call to COM component returned wrong HRESULT E_FAIL"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.