Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

How to get the DNS API permissions in CLR assembly

07 October,2014 by Tom Collins

 Question: I’m getting an error on a CLR assembly , such as :

 

System.Net.Sockets.SocketException: The requested name is valid, but no data of the requested type was found

 

How can I fix this error?

 

Answer: Two things you need to consider on fixing this issue

1)    Do you have the CLR assembly catalogued as PERMISSION_SET = EXTERNAL_ACCESS ?  You can can use UNSAFE , but at minimum EXTERNAL_ACCESS is required.

2)    Access is in the security context of the SQL Server service account. There is a situation where you could be impersonating the CLR procedure user. Check to see if the it’s set as Local System, you may discover there are not enough permissions to to access the DNS api

Read More on managing logons to SQL Server

SQL Server – Restrict SQL Server Logons by IP with EVENTDATA and SQL Logon Trigger

How to create a SQL Server Security Audit


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to get the DNS API permissions in CLR assembly


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer