从旧的 SQL Server 实例获取 master 数据库并将其附加到新系统,或者恢复 master 数据库的备份,以便您可以查询它。 (只是不要覆盖/替换实时系统的主数据库!)
SELECT [Name], FileName FROM sysdatabases
将为您提供该服务器上的数据库列表以及完整文件路径。
get the master database from the old SQL Server instance and attach it to the new system, or restore a backup of the master database, so you can query it. (just dont overwrite/replace the live system's master db!)
SELECT [Name], FileName FROM sysdatabases
will get you a list of the databases on that server, and the full file paths.
发布评论
评论(2)
从旧的 SQL Server 实例获取 master 数据库并将其附加到新系统,或者恢复 master 数据库的备份,以便您可以查询它。 (只是不要覆盖/替换实时系统的主数据库!)
SELECT [Name], FileName FROM sysdatabases
将为您提供该服务器上的数据库列表以及完整文件路径。
get the master database from the old SQL Server instance and attach it to the new system, or restore a backup of the master database, so you can query it. (just dont overwrite/replace the live system's master db!)
SELECT [Name], FileName FROM sysdatabases
will get you a list of the databases on that server, and the full file paths.
Sys.Databases 接受的答案不会为您提供物理文件位置。 对于仍在寻找它的人,您需要查询:
The accepted answer of Sys.Databases will not give you the physical file location. For anyone looking still for it, you need to query: