By default, the logged-on user sees themselves in addition to the database for which they have administrative privileges. You can also see other databases, which prompt for no permissions when you click Open. The following settings enable the user to see only the databases for which they have administrative privileges, but not other databases that do not have permissions.
(1) Cancel default to view any database
DENY VIEW any DATABASE to public; --No permissions set, all default login users cannot view any database
(2) Permission to view a database with administrative privileges
ALTER AUTHORIZATION on DATABASE::D bname to DBUser; --Give Dbuser (here Dbuser for example, with the corresponding database administrator can) to view and Access dbname (here dbname to the distance database, replaced by the corresponding database name) database (do not give it to other databases to view permissions, You cannot view other databases.)
Logged-in users such as SQL Server 2008 can only see their own database setup methods