skip to Main Content

I am using Docker’s MSSQL because I’m on Ubuntu 22.04.

In the terminal,

cat @filepath

where @filepath is the absolute file path, works.

So the file path exists, and I have file rights (don’t need to sudo)

How can I solve this? I am not too sure about how to use docker, but when I connected to my docker’s MSSQL, my server was localhost, 1433

2

Answers


  1. If you are using BULK INSERT T-SQL statement to do the bulk load, then you need to make sure that the service account running the SQL Server instance has access to the file. In this case SQL Server will not be using your user account.

    Login or Signup to reply.
  2. You cannot access your local files from Docker. This is what you should do:

    docker cp @FILEPATH @CONTAINER:/
    

    from there,

    bulk insert your_table_name
    from '/';
    

    or whatever your bulk insert statement, would work

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search