通过查询获取网络服务器中的数据库位置
Get DBs Location In A Network Server by a query
T-SQL 中是否有一个查询可以提取网络中服务器(不是本地驱动器)内所有数据库的位置。
我看过这个例子SQL Server - get all databases with MDF and LDF File Location
.但是,它似乎没有用,我猜这是由于该服务器的位置不是本地的。
链接的答案有效,但您必须有足够的权限才能查看结果。
If the caller of sys.databases is not the owner of the database and the database is not master or tempdb, the minimum permissions required to see the corresponding row are ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission, or CREATE DATABASE permission in the master database. The database to which the caller is connected can always be viewed in sys.databases.
The minimum permissions that are required to see the corresponding row are CREATE DATABASE, ALTER ANY DATABASE, or VIEW ANY DEFINITION.
T-SQL 中是否有一个查询可以提取网络中服务器(不是本地驱动器)内所有数据库的位置。
我看过这个例子SQL Server - get all databases with MDF and LDF File Location .但是,它似乎没有用,我猜这是由于该服务器的位置不是本地的。
链接的答案有效,但您必须有足够的权限才能查看结果。
If the caller of sys.databases is not the owner of the database and the database is not master or tempdb, the minimum permissions required to see the corresponding row are ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission, or CREATE DATABASE permission in the master database. The database to which the caller is connected can always be viewed in sys.databases.
The minimum permissions that are required to see the corresponding row are CREATE DATABASE, ALTER ANY DATABASE, or VIEW ANY DEFINITION.