Msg 7415, Level 16, State 1, Line 1. Ad hoc access to OLE DB provider ‘ MSDASQL’ has been denied.

Unless you are an ‘sa’ you probably will get this error.

Fix it by adding this setting to the registry.

Value Data
DisallowAdHocAccess 0

 


— Quickly check your registry settings running this on SQL 2005+ servers

EXEC master..xp_regenumvalues 
                        ‘HKEY_LOCAL_MACHINE’,
                        ‘SOFTWARE\Microsoft\Microsoft SQL Server\<instance>\Providers\MSDASQL’

— or on SQL 2000

EXEC master..xp_regenumvalues 
                        ‘HKEY_LOCAL_MACHINE’,
                        ‘SOFTWARE\Microsoft\MSSQLServer\Providers\MSDASQL\’

Comments are closed.

Post Navigation