question

smarinova avatar image
smarinova asked

Transfer Database Offline - network share file not found?

Hello, I am trying to transfer a database offline between two servers. I have specified SourceDatabasefiles and DestinationDatabaseFiles. I created two folders and made them shared on both source(`\\EAPRDSQL41\Source_Share` is the shared folder on the source) and destination. I specified the "Network file Share" on both Source and Destination files. But when I run the package, I get the error: [Transfer Database Task] Error: The following exception occurred during an offline database transfer: System.IO.FileNotFoundException: Could not find file '\\EAPRDSQL41\Source_Share\SourceDatabase.mdf'. File name: '\\EAPRDSQL41\Source_Share\SourceDatabase.mdf' Why is the package looking for the mdf file located on the Network File share? Isn't the task supposed to create that file first? Thank you!
ssisdatabasetransfer
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

smarinova avatar image smarinova commented ·
The "Source Folder" has the path to the .mdf file. It is "F:\MSSQL\SourceDatabase". the Source Folder was populated automatically when I specified the database. The Network File Share has "\\EAPRDSQL41\Source_Share", it has two back slashes. I do not know why when I run the task I am getting an error that the .mdf file does not exist on the Network share. The .mdf file is in the "Source folder" and it is my understanding that the task will copy it to the Network share.
0 Likes 0 ·
Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
This web site runs on voting. Please indicate all helpful answers by clicking on the thumbs up next to those answers. If any one answer lead to a solution, please indicate this by clicking on the check mark next to that answer.
0 Likes 0 ·
CirqueDeSQLeil avatar image
CirqueDeSQLeil answered
Looks like you specified the share starting with a single \ instead of a double \. A network share needs to start with \\\\ and not a single \\ . After that, verify permissions exist such that users and service accounts can reach that share from both servers.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
Updated the format. OP included a double `\\`
0 Likes 0 ·
KenJ avatar image
KenJ answered
The task does not create the source `.mdf` file, it copies the existing one to the destination network share. Your source share needs to be the full network path to the `.mdf` file of the database you want to transfer. "When you use offline mode, the database is detached, the database files are copied or moved, and the database is attached at the destination after the transfer finishes successfully. If the database is copied, it is automatically reattached at the source if the copy is successful" - [ http://msdn.microsoft.com/en-us/library/ms141204.aspx][1] [1]: http://msdn.microsoft.com/en-us/library/ms141204.aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.