Tag Info

Hot answers tagged


Declare variable to get current instance name and pass value to OpenROWSet. Enable Ad Hoc Distributed Queries EXEC sp_configure 'show advanced options', 1 RECONFIGURE GO EXEC sp_configure 'ad hoc distributed queries', 1 RECONFIGURE GO OPENROWSET using windows authentication to fetch data DECLARE @InstanceName VARCHAR(200), @sql NVARCHAR(MAX) SELECT ...


You can join on the certificate thumbprint: use master; go select database_name = d.name, dek.encryptor_type, cert_name = c.name from sys.dm_database_encryption_keys dek left join sys.certificates c on dek.encryptor_thumbprint = c.thumbprint inner join sys.databases d on dek.database_id = d.database_id; My sample output: database_name ...


It turns out the user had been granted other privileges by a different account as well as the one we use, so we were unable to see those privileges in ALL_TAB_PRIVS. We had to look in DBA_TAB_PRIVS, and sure enough, there were the other permissions. Thanks to all for chiming in!

Only top voted, non community-wiki answers of a minimum length are eligible