SQLWriter VSS and AddNewTarget error
-
2012年5月4日 上午 10:05
I encountered the following problem. When I try to restore a file in the alternativedirectory with
HRESULT AddNewTarget( [in] VSS_ID writerId, [in] VSS_COMPONENT_TYPE ct, [in] LPCWSTR wszLogicalPath, [in] LPCWSTR wszComponentName, [in] LPCWSTR wszPath, [in] LPCWSTR wszFileName, [in] bool bRecursive, [in] LPCWSTR wszAlternatePath );
and pass wszPathC:\some_dir all is well. But when I pass C:\ (because my database files located at the C:\), alternate path did not applied.
Does anyone know how to solve?
所有回覆
-
2012年5月5日 上午 12:42版主What is the error that you are getting? Are you sure that you aren't getting an Access denied/Permissions issue with this? The root of the disk is protected under UAC so you might need to verify that you aren't getting a problem from that.
Jonathan Kehayias | Principal Consultant, SQLSkills.com
SQL Server MVP | Microsoft Certified Master: SQL Server 2008
Author of Troubleshooting SQL Server: A Guide for Accidental DBAs
Feel free to contact me through My Blog or Twitter. Become a SQLskills Insider!
Please click the Mark as Answer button if a post solves your problem! -
2012年5月7日 上午 05:44
SQLWriter fails at PostRestore. <FAILED_AT_POST_RESTORE(0x800423f4 - VSS_E_WRITERERROR_NONRETRYABLE)>. SQLServer has all the rights to the root drive.
Steps to reproduce:
1. Create database DB (E:\DB.mdf, E:\DB.ldf)
2. Perform full VSS backup.
3. Delete database DB.
4. Run restore DB to new target with AddNewTarget (move E:\DB.mdf => C:\SomeFolder\DB.mdf, E:\DB.ldf => C:\SomeFolder\DB.ldf)
5. Restore fails at PostRestore.
In the SQL Server profiler I see that the SQLWriter still uses the old path to recovery. E:\DB.mdf instead C:\SomeFolder\DB.mdf. He looks for a file E:\DB.mdf.

