I am unable to revoke user roles using ArcGIS 10.2.1 and SQL Server 2012.
I am running:
>>> arcpy.CreateRole_management("Database Connections\Connection to xyz.sde","db_datareader","REVOKE","DOMAIN\user")
Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 4620, in CreateRole raise e ExecuteError: Error revoking role privileges from user. [Underlying DBMS error [[Microsoft][SQL Server Native Client 11.0][SQL Server]The metadata could not be determined because statement 'exec (@stmtR)' in procedure 'sp_droprolemember' contains dynamic SQL. Consider using the WITH RESULT SETS clause to explicitly describe the result set.]] Failed to execute (CreateRole).
It seems to me that an SQL command is called incorrectly.
If this is a bug, is there a workaround through ArcGIS (of course I can do it through SQL Server Mgmt Studio)?
Or if not, what am I doing wrong?