-1

I want to create and use a bak file of an SQL Server db.

The database is accessible via SSMS (v 17.9.1) and is on the local machine (not MY machine, but a remote server to which I log in directly). I managed to create a bak file using the easy way of right click -> Tasks -> Backup.

The problem is that when I try using that file, I'm getting an error saying I need to use a backup file with a UNC format since the db is on another machine.

1) Why does it say it's on another machine if the SSMS shows on top the same machine name I login to?

2) How can I create the bak file in a UNC format? Since I'm not that familiar with SSMS in general, I'll be glad if you could guide me on where exactly I need to navigate inside to get to wherever I need to.

  • please show the exact error message – Squirrel Mar 22 at 14:01
  • @SMor It's some unknown 3rd party program in which I can import the db dump files. I need to give it a bak, ldf, mdf. There when I try I get the error message saying the bak file needs to be in UNC format – Yonatan Nir Mar 22 at 14:06
  • 2
    No one can help with "some unknown 3rd party program". Guessing is the best one might do and not many will attempt that with so little information. And I don't understand how this application can be "unknown" if you are actually using it. If you want help, you will need to provide better information. – SMor Mar 22 at 16:26
1

Files are not in "UNC format". UNC is a standard means of referencing files on network paths without having to rely upon (in the case of Windows) mapping drive letters. The format is \\servername\sharename\remainder_of_path

To restore a database to SQL Server instance when the backup file(s) are not located on a drive local to that instance's host server, you must specify a UNC path which the account under which the SQL Server engine has permission to access. If you're running SQL Server as a local system account, this probably won't work because those accounts won't have access to network shares.

To create a backup on a UNC path, you need to (just like the restore) specify a UNC path on which the SQL Server engine's account has write permissions.

If you don't know how to locate a UNC path (file share) that your SQL Server instance can access, you'll need to work with your system/network admins. It is impossible for anyone here to tell you what servers and shares you have accessible.

Once you've created the backup of your database on the UNC path and you need to access the backup from another piece of software, this question is no longer about databases but rather how to work with a UNC path, and you need to seek out assistance from the vendor of this unspecified 3rd party software and/or your sysadmins (see the previous paragraph).

  • Thanks for you answer. What I'm using is some unknown 3rd party program in which I can import the db dump files. I need to give it a bak, ldf and mdf files, all of which are just located on the desktop of the machine where the db is. There when I try I get the error message saying the bak file needs to be in UNC format. So it seems like everything IS local.. – Yonatan Nir Mar 22 at 15:22
  • 1
    Repeating the same statements over and over does not make your question any more clear. If you need to access the desktop of the computer where SQL Server is running, you need to provide the UNC path to that location. But even more concerning is you keep saying that you're using "some unknown 3rd party program" - if this is inside your own company, why don't you know the software you're dealing with? – alroc Mar 22 at 16:44
  • Did I say its something inside some company? If you don't know how to help than just say so. Saying "you need to provide the UNC path to that location" without explaining how when doing it from the exact same machine is not that helpful – Yonatan Nir Mar 22 at 20:45
  • Did you try the UNC path format as suggested by alroc above? – Tibor Karaszi Mar 23 at 7:54
  • A UNC path to a local file looks like this: \\LocalMachineName\sharedrrive\path\backup,bak. It's just like any other UNC path. Who knows if that helps though.... there is zero context on what you're doing here. – Nick.McDermaid Mar 23 at 14:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.