Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm trying to copy a database from SQL Server 2008 R2 to another server, using the Copy Database Wizard in SQL Server Management Studio.

I get an error telling me to check the error log on the destination server. The log says:

Event Name: OnError
Message: Access to the path '\\server\folder\db.mdf' is denied.
StackTrace:
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.InternalCopy(String sourceFileName, String destFileName
        , Boolean >overwrite)
    at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.CopyFile(
        String sourceFileName, String destinationFileName, Boolean overwriteOnExist)

It seems like my destination server can't access my network share on the source server.

The services "SQL Server" and "SQL Server Agent" are running under the account "network service" on both servers. This account has write permissions to my network share on the source server.

The database is too large to backup locally and then move to destination server through network share. There is not enough space on the local disk.

How can I resolve this issue?

share|improve this question

closed as not a real question by jcolebrand Sep 7 '12 at 19:45

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Consider taking a backup to directly to the network share (if you have enough space to store the backup there) and then restore locally. Copy database wizard is buggy. –  yogirk Mar 26 '12 at 19:06
    
I tried that. Getting another access error I suppose: BackupDiskFile::CreateMedia: Backup device '\\server\Backup\db.bak' failed to create. Operating system error 5(failed to retrieve text for this error. Reason: 15105). –  Maxelsson Mar 26 '12 at 19:11
    
Definitely insufficient permissions Issue. Try changing the service to a domain\account, grant complete permissions to the service account on the target network share. Then backup. –  yogirk Mar 26 '12 at 19:20
    
Sounds like you are having share permission issues. –  Thomas Stringer Mar 26 '12 at 19:24
    
@yogirk Is that really necessary to change the services to run under a domain\account? I really don't won't to restart the services. –  Maxelsson Mar 26 '12 at 19:25