title: BULK INSERT permission denied - BLOB vs FILESTREAM
body: <p>My company is very strict when it comes to security. My project, (built using VB.Net and SQL Server 2008) requires that users upload PDF files which then need to be stored into the database along with the associated path.  Because the files will be just about 256kb or less, I wanted to insert the files as <code>Single BLOB</code>.  My table has two columns Path as <code>varchar(50)</code> and <code>File</code> as <code>varbinary(max)</code>.  My SQL query looks something like this:</p>
  
  <pre><code>INSERT INTO [DBNAME].[dbo].[SOMETABLE](PATH, FILE)
  values ('C:\Somefile.pdf', (SELECT * FROM 
  OPENROWSET(BULK N'C:\Somefile.pdf', SINGLE_BLOB)
  AS import ))
  </code></pre>
  
  <p>Unfortunately, I only have read and write permissions on the database, thus yielding the following error: <code>You do not have permission to use the bulk load statement.</code> I have read this <a href="https://dba.stackexchange.com/questions/23599/bulk-insert-permission-on-a-single-database">post</a> but for other security reasons, I will not be granted <code>Insert</code> or <code>ADMINISTER BULK OPERATIONS</code>  permissions.  From other posts that I have read, without the permissions this option seems to be a dead end.</p>
  
  <p>Now, I am looking into using <code>FILESTREAM</code> to insert the files but will not be able to create a new database. Can I accomplish this by enabling <code>FILESTREAM</code> on an existing database and database table and work with those? I have been on this for two days, any help or ideas would be much appreciated.</p>