14 Aralık 2011 Çarşamba

SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server.

SELECT *
FROM OPENROWSET('SQLOLEDB', 'Trusted_Connection=Yes;Server=(local);Database=MikroDB_V14_FIRMA', 'exec dbo.rp_PersonelCalismaListesi ''20111201'',''20111231''')
GO

SQLOLEDB aracılığı ile "SELECT FROM stored procedure" stored procedur çalıştırıyorsanız yada farklı bir yöntemle "SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource" mesaj alıyorsanız.

Msg 15281, Level 16, State 1, Line 1
SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online.

--Gelişmiş seçenekleri tamamını göstermesi için;
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE WITH OVERRIDE

EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
RECONFIGURE WITH OVERRIDE

--Tüm parametreleri görmek için;
EXEC sp_configure

Hiç yorum yok: