0

I have access to a SQL server and my rights are extremely limited.

I have been tasked with uploading 180 flat files. However, I can’t write a tsql script for bulk insert as I can’t access the file stores programmatically and I can’t run PowerShell. This is all because of admin access which I am never going to get.

Is there a convenient way to do this via SSMS? Or is the only option to go through 180 files and use the task import wizard ?

user3546025
  • 88
  • 1
  • 10
  • If you have the command-line BCP utility installed, you could use that using a [`for` in a batch script](https://stackoverflow.com/questions/180741/how-to-do-something-to-each-file-in-a-directory-with-a-batch-script) to import each file. – Dan Guzman Feb 06 '20 at 01:10
  • could i run bcp through ssms to access files not on the server ? – user3546025 Feb 06 '20 at 21:34
  • You could run xp_cmdshell from an SSMS query window to launch BCP on the server if the files are available via a share but I wouldn't go there. You would need sysadmin to do that anyway. – Dan Guzman Feb 06 '20 at 22:52
  • I can’t use anything Xp because of the crazy admin rights – user3546025 Feb 06 '20 at 23:42
  • Ideally I was look for a bulk import from the SSMS as I can manually import files via the import and export wizard. – user3546025 Feb 06 '20 at 23:43
  • I can’t understand why I can’t use the same functionality that the import export wizard uses within sqlcmd when using SSMS – user3546025 Feb 07 '20 at 00:10
  • You can, with Powershell. Is SSIS an option? – Dan Guzman Feb 07 '20 at 01:02

0 Answers0