Sample Header Ad - 728x90

SQL Server on LInux - OpenRowSet function only has access to files in /var/opt/mssql directory?

2 votes
1 answer
197 views
I have a file I want to import into an SQL Server 2019 database running on Ubuntu 20.04. The file resides in the /proc directory and I have done a chmod 777 on that file. However, when trying to read it from a SQL Server query using Openrowset, I get this error:
select * from openrowset(bulk '/proc/loadavg', SINGLE_CLOB) cpu_load
> Msg 12703, Level 16, State 1, Line 1 > > Referenced external data source "(null)" not found. If I copy that file to the /var/opt/mssql directory, it will then work and I can query the file. Why can I not read a file in /proc but I can from /var/opt/mssql? Also, how do I get access to the /proc file from within SQL Server?
Asked by Dean Richards (23 rep)
May 17, 2023, 07:18 PM
Last activity: May 18, 2023, 01:10 PM