ChrisMDrew
asked on
C# Using SMO to copy a SQL Server database under Windows 7
Hi,
I have an application which normally runs against a SQL Server installation on a server but needs to be able to also run in a 'detached' mode whereby it runs against a local SQL Server.
This has been running happily for a while - currently I use SMO and Microsoft.SqlServer.Manage mentObject s.Smo.Tran sfer.Trans ferData to copy the entire database from the remote SQL Server to a local SQL Server instance.
I have recently upgraded both my main SQL Server and my local PC to Windows 7 and on trying this operation I now get an error of :-
ERROR : errorCode=0 description=Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10_50.LIFECHEC K\MSSQL\DA TA\lifeche ckv4.mdf" failed with the operating system error 3(failed to retrieve text for this error. Reason: 15105). helpFile= helpContext=0 idofInterfaceWithError={C8 1DFC5A-3B2 2-4DA3-BD3 B-10BF861A 7F9C}
This is when copying the database from my remote server to my local instance. I have disabled the Windows Firewall on both PCs just in case that is intefering but am not at a bit of a loss to explain what the problem is.
I have an application which normally runs against a SQL Server installation on a server but needs to be able to also run in a 'detached' mode whereby it runs against a local SQL Server.
This has been running happily for a while - currently I use SMO and Microsoft.SqlServer.Manage
I have recently upgraded both my main SQL Server and my local PC to Windows 7 and on trying this operation I now get an error of :-
ERROR : errorCode=0 description=Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10_50.LIFECHEC
This is when copying the database from my remote server to my local instance. I have disabled the Windows Firewall on both PCs just in case that is intefering but am not at a bit of a loss to explain what the problem is.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER