Skip to content Skip to sidebar Skip to footer

BULK INSERT Returns Error "Access Is Denied"

When running Bulk Insert BULK INSERT MyDatabase.dbo.MyTable FROM '\\Mylaptop\UniversalShare\SQLRuleOutput.csv' WITH (FIRSTROW = 2, FIELDTERMINATOR = ',', ROWTERMINATOR = '\n')

Solution 1:

The share must be accessible to the Windows account that the MSSQL Service is running under; typically Local System or Network Service (but could be anything). Its unlikely you have explcitly granted access to MYSERVER\LOCAL SERVICE to your local file share.

Running Powershell Invoke-SQLCMD doesn't demonstrate that the MSSQL service has rights to your drive - it depends what account you are running power shell as.


Post a Comment for "BULK INSERT Returns Error "Access Is Denied""