Evgeni Velikov
Evgeni Velikov

Reputation: 382

Cannot open backup device ''. Operating system error 1326 (Logon failure: unknown user name or bad password

Well. I have SSMS installed in the local machine. And I need every day create backup in the server.

I know what is the problem here. Account which I use don't have permission rights for create backup in the server.

The server and local machine have same accounts name, but the domain is different and that is the real problem.

My question is: Is it possible to create backup file on the server using application who is installed in local machine.

Upvotes: 1

Views: 15697

Answers (3)

Michael G
Michael G

Reputation: 582

For me, it was a sharing issue. I had to turn off 'Password Protected Sharing' on the folder I was sharing to the network. To do this:

  • Right click folder -> Properties -> Sharing tab
  • Under Password Protection click the link to 'Network and Sharing Center'
  • Expand the 'All Networks' pane
  • Under Password proected sharing select the 'Turn off password protected sharing' option

This allowed my on prem server to access my local machine to save a db backup

Upvotes: 1

Shyam Sharma
Shyam Sharma

Reputation: 41

  1. Press Window + R; type service.msc and find SQL Server (MSSQLSERVER) service.

  2. Double click it and open this. Go to the "Log On" tab and check "This Account" and click browse and type the logged in user name which has access on the Azure SMB Network share.

  3. After providing right credentials restarts the service and reopen sql server and re-try to take backup in this smb.

     BACKUP DATABASE AMS_Test
     TO DISK = '\\xyzTes.file.core.windows.net\xyznewfileshare\AMS_Test.bak'
     WITH CHECKSUM; 
    
  4. If that doesn't work try to create a DB user with the same name as the logged in user. It will definitely resolve the issue but above steps are must.

Upvotes: 1

Julien Vavasseur
Julien Vavasseur

Reputation: 3952

Using SQL Server Configuration Manager, you first need to figure out which User is starting the SQL Server service on the server. You are looking for Account Name such as NT Service\MSSQLSERVER or a local or domain account.

You can follow this: SQL Server Configuration Manager. But don't change the configuration, you only need to copy the name of the account.

Once you know which account is used, go to the server and give this user the right to write on the folder where you wan't to create the backups or on a parent folder.

Upvotes: 3

Related Questions