문제

http://technet.microsoft.com/en-us/library/jj919148.aspx

In the above link it is well explained how to restore a Sql Server db from a backup file stored as a blob in Azure: the paragraph is "Restore a database and move files" for the language C#.

The lines

restore.RelocateFiles.Add(new RelocateFile(dbName, newDataFilePath));
restore.RelocateFiles.Add(new RelocateFile(dbName+ "_Log", newLogFilePath));

map the logical names of the db files to physical paths. But the problem with this is that the logical names are not always the same as the dbName. The logical names are usually found this way:

RESTORE FILELISTONLY
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\MyDatabaseBackup.bak'
GO

Is it possible to find the logical names in such a way, from the backup stored in Azure?

Thanks a lot for any suggestion.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top