sql server - Restore database backup with SQL FileTable to same instance -
how can backup , restore database filetable
same sql server instance; filestream
enabled; different name? whether through gui or write out scripts so, stuck @ same place: restore new, non-existent database fails "cannot obtain exclusive access database".
the issue: have filetables in backup , looks trying restore files on existing database's files.
this script i'm using restore:
restore database [mydatabase_test] disk = n'd:\backup\mydatabase.bak' file = 1, move n'mydatabase' n'd:\data\mydatabase_test.mdf', move n'mydatabase_log' n'e:\data\mydatabase_test_log.ldf', move n'mydatabase_docs' n'd:\data\mydatabase_test_docs', nounload, stats = 5 -- database has filetable called 'documents' setup \\dbserver\mydatabase\documents. -- how specify files should go \\dbserver\mydatabase_test\documents during restore?
this breaks if it's same sql instance being run on. guess i'd need specify directory_name
filestream
of database restoring to... haven't figured out how (or if i'm on right track)
Comments
Post a Comment