SQL Server Performance

Weird security behavior with MSDASQL

Discussion in 'SQL Server 2008 General DBA Questions' started by Roderick McBan, May 23, 2011.

  1. Roderick McBan New Member

    Hello everyone,

    I have a security issue that puzzles me. We are accessing a MySQL database through an ODBC datasource, using an OPENROWSET statement in a stored procedure. The stored proc is then called from an Excel macro in an xlsm file.

    Now, I tested this using a test domain account. The registry key DisallowAdhocAccess , was updated to 0, and my test user is OK. The sproc runs well from sqlcmd, goes all the way to the mysql db and returns the rows it is supposed to.

    Nevertheless, when the same sproc is run through Excel, using the same security credentials, it returns error 7415 - Ad hoc access to OLE DB Provider MSDASQL has been denied
    the behavious is repeatable and I can see it in my profiler trace.

    It's the first time that I see this thing, same account (and I stress the same account) with different behaviours.
    Any ideas about this ? Someone else has seen this ?
  2. Jahanzaib Member

    Check the property of MSDASQL option 'DisallowAdHocAccess' must be uncheck

Share This Page