use master
go
deny view any database to [test]--先禁止看到所有数据库,除了master和tempdb
 --额外指定数据库
ALTER AUTHORIZATION ON DATABASE::test TO test  --前面为库名,后面为用户名