我需要解决方案
When creating a move template for a restore in the GUI client, it is able to quickly generate a listing of the SQL Server logical and physical filenames for you to change:
MOVE "DBNAME"
#TO "d:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\DBNAME.mdf"
#
#
# Replace the file path <d:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\DBNAME.ldf>
# with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
# The target of the MOVE keyword must be "DBNAME_Log".
MOVE "DBNAME_Log"
#TO "d:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\DBNAME_Log.ldf"
I am wondering where or how it get's this information? Is it stored in metadata somewhere in the backup image? I am working on scripting out a restore so would like to find if there is a command line command I can use to get that metadata to build a move .bch script. I know I could go to the source SQL Server, and find the information, but I need to do this without the process having access to the source sql server database.
I use bplist to get the image names to restore, I just don't know how to get this metadata.
Any ideas?
Thanks.