I am trying to transfer the database from one SQL server to another. I am doing this through a console written in C #. Method is a type. I first separate the database, move the data, and log on the files in the new location and then attach the files from there. However, after separating the file, I am not able to copy the data and log files. The error I get is: 'Device is not ready' I am using network path for both source and destination. I file files to move. I am using copy () and I am allowed to create files in related folders
in a hip , 'Device Not Ready' is a C # exception generated by the file copy command. Exceptions are possible; Unauthorized access failure, logic expression, logic, execution, pathtool exceptions, directionsoutfound exceptions, filenate found ups, IOException, NotSupportedException
So this 'error' There may be something that is generated internally according to other comments, more information is required.
- Place a breakpoint in your code where the 'device is not ready' text string is present in your code
- Both paths are valid paths in your code
- Is your program designed to control UNC paths or file paths? The exception is likely being caught secretly, but you have to debug it to find out.
- If you are trying to move the database, do you want to databases? Paused Windows Service instance withholding? Type services.msc from the Run command, then scroll to the SQL server ( your SQL instance name ), then stop the service from there. This will unlock the database file.
Good luck.
Comments
Post a Comment