Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9189253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:11:59+00:00 2026-06-17T20:11:59+00:00

I have a stored procedure which I am trying to call from a command

  • 0

I have a stored procedure which I am trying to call from a command line vb.net program running on SQL Server 2012:

CREATE TABLE #ftpData(ftp_Email varchar(150) COLLATE DATABASE_DEFAULT, ftp_Segment varchar(1) COLLATE DATABASE_DEFAULT)
BULK INSERT #ftpData FROM 'C:\Users\Administrator\Documents\tempSegFiles\segmentation_.csv'
WITH(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)

When I run this from management studio it executes successfully. When I call the stored procedure from my vb.net program I get the error

Cannot bulk load because the file “xxx” could not be opened. Operating system error code 5 (Access is denied.)

The SQL account that I log in with to call the stored procedure has permissions for altering, executing, inserting and administer bulk operations. It also has server wide security privileges to bulkadmin, diskadmin, public.

Are there any other options that are required?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:12:00+00:00Added an answer on June 17, 2026 at 8:12 pm

    The “Access is denied” error indicates the problem is with accessing the CSV file you’re trying to bulk insert. Make sure that whatever account is executing the command line (and the stored procedure) also has permissions to read the CSV file.

    UPDATE: I see you’re using a SQL login to run the procedure. Please see the section titled “Security Considerations” at this MSDN article. To wit:

    If a user uses a SQL Server login, the security profile of the SQL
    Server process account is used.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing stored procedure in SQL Server that I need to call
I have a stored procedure which returns sys_refcursor and I am trying to fetch
I'm having a never-ending problem with trying to call a stored procedure from a
I have written a PL/SQL (Ora10gR2) package which contains a stored procedure. The header
I'm trying to call an Oracle Stored Procedure which returns XMLType data, but all
I have been trying to use BLToolkit to activate an Oracle stored procedure which
I have been trying to make a stored procedure which autodeletes temporary tables. CREATE
I am new to Linq and trying to convert this SQL Server stored procedure
I am trying to write a stored procedure which selects columns from a table
I have a stored procedure which update a table based on such calculation and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.