Operating system error 2: "2(The system cannot find the file specified.)" Sql Exception: Unable to
説明
Operating system error 2: "2(The system cannot find the file specified.)" Sql Exception: Unable to open the physical file Attachability checks are failing with the following error -
Sql Exception: Unable to open the physical file "C:\ProgramData\AppRecovery\MountPoints\0372f6c8-0514-401c-9486-4972e991c535\C__\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\.mdf". Operating system error 2: "2(The system cannot find the file specified.)".
対策
Resolution:
This means that the database it is trying to run the attachability checks on is not found within that snapshot/database. - Check the logs to find out which database it is failing on exactly. (Agent logs should show the database) - Next, log into the SQL Server machine - Open SQL Management Studio - Open Databases - Look for the database name that was referenced in the logs. - Check to see if it is there, if it is, check to see if it holds any data or tables. - If the database is empty, have the customer delete it - (back it up first if needed) - Restart SQL Services - If you cannot restart the SQL services, skip and follow the next steps
- Go back onto the Core machine - Click on the SQL Agent in the Core and force a new snapshot - Once snapshot is completed, force an attachability check on the new snapshot
The issue should be resolved with any snapshots from this point and forward. The previous snapshots should be passing on all databases except for the one causing the problems(that was in the logs), however because it failed on one database, it fails the whole job even though the other databases were successful.