I use an users to login SQLServer(not sa)
so I can’t exec the “exec sp_configure ‘Ad Hoc Distributed Queries’,1”
if always set the ‘Ad Hoc Distributed Queries’ on?
is there any risk or disadvantage ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you are going from SQL to SQL, IMO you should try and use sp_addlinkedserver instead – this way your DBA’s have better visibility and control into cross server data access.
The only reason I could think why you would want to use OPENROWSET was if you wanted to directly access a non-SQL data store – but you might consider other technologies at application level which might be preferable, e.g. DTS / SSIS, or a custom application with 2 connection strings.
That said, it seems there is a bug with the Ad Hoc Queries option.