Tuesday, October 23, 2012

Developers have no access to linked servers after creating one

 So, you just created a linked server back to DB2 on MS SQL Server 2008R2. However, the developer calls you and says I getting this error;
 The EXECUTE permission was denied on the object ‘xp_prop_oledb_provider’, database ‘mssqlsystemresource’, schema ‘sys’. (.Net SqlClient Data Provider)

This script assumes the user is basis_admin
use master
go
create user basis_admin for login basis_admin
go
grant exec on sys.xp_prop_OLEDB_provider to basis_admin