September 12, 2019 at 11:11 pm
windows 2016 server with sql 2016
doing a bulk insert on a space delimited text file. The file resides on another server. very routine.
Works all day long when I remote into the sql server with an admin acct and run the code from there.
It can't find the file when I run it from my desktop using a non-admin acct. The file is shared by both of my user accts and the sql agent server acct. My Sql standard security acct has owner rights on the database I am using. I need this to run from my pc. I'm using the full file path with double quotes due to embedded spaces in the file name. Again it works fine when remoteing into the sql server using my local admin acct. I'm ready to jump...
When the snows fall and the white winds blow,The lone wolf dies but the pack survives.
Once you've accepted your flaws, no one can use them against you.
September 13, 2019 at 1:19 pm
are you using a fully qualified UNC path? such as
\\server\folder1\file1
or a local path
H:\file1
I've had issues with local paths and now everything is UNC for me
MVDBA
September 16, 2019 at 9:14 pm
I have tried mapped drives and the full unc path. Life continues to be unkind. I am considering trying BCP after my root canal without nova Caine.
When the snows fall and the white winds blow,The lone wolf dies but the pack survives.
Once you've accepted your flaws, no one can use them against you.
September 16, 2019 at 10:17 pm
And hopefully you aren't referencing an admin share - such as C$, D$. You may want to try using RunAs with SSMS or whatever you are using for the bulk insert and using your admin account. Just to see if it works. You could try having the bulk insert in a job on that server but that's not an option if you need it to run from your PC.
Sue
September 17, 2019 at 7:59 am
have you checked both the file security for the shared folder AND the share permissions.
i'm not saying this is best practice, but what I tend to do is set "everyone" to "all permissions" to start with and then start trimming it down to what is needed.
MVDBA
September 18, 2019 at 3:56 am
I have tried mapped drives and the full unc path. Life continues to be unkind. I am considering trying BCP after my root canal without nova Caine.
Bulk Insert uses the privs of the login using it. You have to make sure the login being used as the privs in the source directory.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 18, 2019 at 7:54 am
Bulk Insert uses the privs of the login using it. You have to make sure the login being used as the privs in the source directory.
Hehe - until you put it in a scheduled job and someone has set up sql agent to use the default NT/Anonymous
you never know with server admins... they set up things and hand them over 🙂
MVDBA
September 18, 2019 at 1:01 pm
Jeff Moden wrote:Bulk Insert uses the privs of the login using it. You have to make sure the login being used as the privs in the source directory.
Hehe - until you put it in a scheduled job and someone has set up sql agent to use the default NT/Anonymous
you never know with server admins... they set up things and hand them over 🙂
Heh... oh my. I've not seen someone do that before. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
September 19, 2019 at 9:44 am
I know this sounds obvious, but have you tried putting it into an SSIS package? (for the love of god please bring back DTS)
you schedule that in SQL agent and if the job fails then you know its a permissions issue on the service account
MVDBA
September 25, 2019 at 6:22 pm
I gave up on Bulk Insert. Used the SQL Import function. In a few hours, my life was fulfilled once again. My camper is happy.
When the snows fall and the white winds blow,The lone wolf dies but the pack survives.
Once you've accepted your flaws, no one can use them against you.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply