1

I am looking to create a simple test pipeline to pull in a csv file on my laptops C drive and load it into SQL Server on-prem (also installed on my laptop).

I have installed the self hosted integration runtime and have no issues creating a linked service to SQL Server. However I have spent the weekend trying to create a linked service to my C drive with no luck. I have checked out other forums which mentioned changing the host from c:\ to \host\c$\ which has changed the error from 'access to c:\ is denied' to the below (error 11402).

Seeing if anyone has any ideas on how I can resolve this issue?

enter image description here

enter image description here

alex878
  • 11
  • 3
  • When you set up your linked server for a local drive, did you put in your login credentials? The error you posted _access to c:\ is denied_ is a security / access error .I also suggest you try a path that's a bit less locked down like `C:\temp` BTW I can't see any linked pictures so it would to reproduce those in text. Using `\host\c$\` is a red herring. That's not the answer. – Nick.Mc Jun 05 '23 at 03:04
  • re-posted screenshots above if this helps. When i change the Host to \\localhost\c$\Temp the error changes to the below. Not sure if this helps? Error code 11402 Details The value of the property '' is invalid: 'Access to laptop-xxx is denied, resolved IP address is xxxx, network type is OnPremise'. – alex878 Jun 05 '23 at 03:33
  • My corporate network blocks all picture sharing sites so I can't see anything (and we generally recommend you post text instead of pictures, for many good reasons). Forget about \\localhost, as I said, it's a red herrring. You need to focus on the credentials, as the error is a security error. What did you enter for network credentials? I can try and reproduce here shortly. – Nick.Mc Jun 05 '23 at 03:59
  • This setup is for my personal laptop (not work) and have access to read/write to my C drive. I used the same creditional as the linked service which connected successfully to sql server. So was my laptop name\alexa. – alex878 Jun 05 '23 at 04:54
  • OK 100% yes I just reproduced this. I am using a locked down laptop so I'm unable to experiment, but you could try changing the service account that the runtime service runs under. https://learn.microsoft.com/en-us/azure/data-factory/create-self-hosted-integration-runtime?tabs=data-factory#service-account-for-self-hosted-integration-runtime to be your account and see if that helps. – Nick.Mc Jun 05 '23 at 08:58
  • Actually this looks much more promising, but I'm unable to test on a locked down laptop. https://stackoverflow.com/a/76112606/1690193 – Nick.Mc Jun 05 '23 at 09:02
  • Thanks Nick it worked. I first had to change the default service from DIAHostService to the user name I was using when setting up the linked service in ADF (first link you sent). I then disabled security valdidation using .\dmgcmd.exe -DisableLocalFolderPathValidation (second link). Much appreciated. – alex878 Jun 06 '23 at 01:37
  • Glad you sorted it. It's possible only one of these changes helped though. – Nick.Mc Jun 06 '23 at 08:08

1 Answers1

0

Thanks to @Nick.McDermaid I created file system linked service with required details I got below error:

enter image description here

I run PowerShell as administrator and Disable security validation to enable access to file system of the local machine using below command

 cd "C:\Program Files\Microsoft Integration Runtime\5.0\Shared\"
 .\dmgcmd.exe -DisableLocalFolderPathValidation

enter image description here

I tested the linked service connection again, it tested successfully.

enter image description here

Bhavani
  • 1,725
  • 1
  • 3
  • 6