sql server - What could cause database restore from a network share to fail? -


I SQL- to restore a database backup that is located on a shared network is an example of running SQL Server Using the DMO on the local machine

The code works fine on my machine. But on a test VM this works only when I put backup in the local route. If I try this on the network, it fails.

I was running under SQL Server showed system user VM and change it to run as network services thinking Was that network access problem. But it did not solve the problem.

This is an empty result set call to ReadFileList fails because of code.

  reinstated as {with Dim New SQLDMO.Restore. Action = SQLDMO.SQLDMO_RESTORE_TYPE.SQLDMORestore_Database, .ReplaceDatabase = true, .Database = dBNAME, .Files = "[" + backupFile + "]", .Devices = ""} dim fileList = restore.ReadFileList (sqlserver) Dim dataLogicalName = fileList .GetColumnString (1, 1) dIM dataPhysicalName = Path.GetFileName (fileList.GetColumnString (1, 2)) dim logLogicalName = fileList.GetColumnString (2, 1) dIM logPhysicalName = Path.GetFileName (fileList.GetColumnString (2, 2))   

[Skyuel- DMO] this cache is not Lines set up a result set, or the current results.

I have a code for this code before file. Axis (backup file) and it passes. However, I am aware that the process runs the Czech (runs my program) is the one that restored (SQL Server) that, if nothing else for it to go by.

Can this cause the behavior? What can I do to figure out why the server can not see the backup file?

Look at the services start (- & gt; Run & gt; services.msc) and SQL Server Scroll through the Logon tab, the user most likely is not allowed to share.

Sql Server domain is going to need access to resources, then I recommend changing to a low-privileged domain service to log on as the user, so that these resources Permissions for can be specified.

Comments