I have 10 databases on a server. Each database is part of a different AG. Each database has its own listener. Can I hide all databases and show only the one database belonging to a listener? I also do not want to create a separate user for each listener as it will be a lot of users to be created and maintained across many database servers.
1 Answer
Can I hide all databases and show only the one database belonging to a listener?
Yes. Have each AG's databases owned by a separate login created specifically for that purpose.
I also do not want to create a separate user for each listener
Then no. There's no way to trim the list of databases a user can see based on the endpoint used to connect to SQL Server.