How to give a user access to sys.master_files in SQL Server?
12,937
for you to run successfully
select * from sys.master_files
the minimal permissions that you need to grant is as follows:
GRANT VIEW ANY DEFINITION TO [texas_user]
GO
I have tested and it works fine on sql 2008 r2
regards
marcelo
Author by
BetaRide
Developer, maker, youtuber. Visit my youtube channel: https://www.youtube.com/channel/UCN8wBEouFtaAyIjjIH2LjJQ
Updated on June 25, 2022Comments
-
BetaRide about 2 years
I need to give a database user read access to the
sys.master_files
table. How can I do that?Currently the user has this permissions:
Calling
SELECT
onsys.master_files
returns an empty result. I also tested the same query with thesa
user which works as expected. -
Sandr over 10 yearsSmall remark. The above code you need to execute with the
sa
privileges