Solve the problem of access denied IN Bulk Insert, bulkinsert

Source: Internet
Author: User
Tags bulk insert

Solve the problem of access denied IN Bulk Insert, bulkinsert

Batch import txt and other files to SQL Server:

Truncate table dbo. lb _ Broadband off-network forecast modeling data 1501

Bulk insert lb _ Broadband off-network forecast modeling data 1501
From 'f: \ bandwidth list \ 201501.txt'
With
(
FIELDTERMINATOR = '$ ',
ROWTERMINATOR = '\ n ',
Maxerrorrs = 100
)
Truncate table dbo. lb _ Broadband off-network forecast modeling data 1501

However, during import:

"The file cannot be opened..., so it cannot be loaded in large capacity. The operating system error code is 5 (Access denied )".


Cause:

When you try to import a remote network file through bulk insert, you actually use the SQL SERVER built-in account to access network files. By default, you do not have the permission to access network files.


Solution:

Change the logon identity of the SQL SERVER service to a system administrator or another account with access permissions.


(1) Open SQL server configuration managaer and double-click SQL SERVER Service

(2) In the displayed dialog box, change the logon identity to "Local Account" and enter a user with the permission to access the remote network file.

(3) restart the service.


"Failed to open file... the system could not find the specified path" error. Generally, the file is not imported into the disk of the SQL Server.

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.