Permissions - Warning 200 and System Error 5

llweisscptcllweisscptc Posts: 5 Bronze 1
edited January 11, 2012 8:59PM in SQL Backup Previous Versions
Same issue as others mentioned here. Maybe my situation is unique -

I am running SQL Backup on a cluster

Warning 200:
Warning 200: Error creating backup file: \\SANSHAREFOLDER\PATHTOBACKUPFOLDER\xxxx.sqb.
Warning: System error 5 (Access is denied)

So using the Copy Backup to Network check box and also tried just the folder option by entering the network location - both don't work.

How would SAN shares be represented?

I assume:

\\SANSHAREFOLDER\PATHTOBACKUPFOLDERusing the test button I get:

folder does not exist.

Checking the path by running this in SSMS:

EXEC master..sqbutility 999, 'RWE', '\\SANSHAREFOLDER\PATHTOBACKUPFOLDER\'

<SQBUTILITYRESULT>:1:

I am running the backups under an account that has full permissions to the share and every file and folder in it.

One other point I am trying to backup databases on a second cluster.

Any clues would be helpful.

Comments

  • peteypetey Posts: 2,358 New member
    The results of the rights check (sqbutility 999) indicates that the SQL Backup Agent service does have rights to read/write/erase files on the network share.

    What happens when you back up a small database to the network share using SSMS e.g.
    EXEC master..sqlbackup '-sql "BACKUP DATABASE model TO DISK = &#91;\\SANSHAREFOLDER\PATHTOBACKUPFOLDER\model.sqb&#93;"'
    
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Backing up model (full database) to:
    \\SANSHAREFOLDER\PATHTOBACKUPFOLDER\model.sqb

    Thread 0 error:
    Error 605: Error creating backup file(s). No files could be created.
    Warning 200: Thread 0 warning:
    Warning 200: Error creating backup file: \\SANSHAREFOLDER\PATHTOBACKUPFOLDER\model.sqb.
    Warning: System error 5 (Access is denied)


    SQL error 3013: SQL error 3013: BACKUP DATABASE is terminating abnormally.
    SQL error 3271: SQL error 3271: A nonrecoverable I/O error occurred on file "SQLBACKUP_FBDF67A0-5B0A-4CF1-8B12-605178CF3056:" 995(The I/O operation has been aborted because of either a thread exit or an application request.).
    Warning 110: Failed to save primary log file: Cannot create file "\\SANSHAREFOLDER\PATHTOBACKUPFOLDER20120110 143543 01.log". Access is denied.

    Warning 110: Failed to save primary log file: Cannot create file "\\SANSHAREFOLDER\PATHTOBACKUPFOLDER20120110 143543 01.log". Access is denied.


    SQL Backup exit code: 790
    SQL error code: 3271

    ----


    With windows explorer, from the target SQL Server cluster I can access the Network Share on the SAN and create, modify and delete files. SO this means all the permissions are set fine.

    Still unclear why I can't access the share from within SQLBackup or SSMS.
  • peteypetey Posts: 2,358 New member
    SQL Backup's access to network shares is dependent upon the rights of the account used to start up the SQL Backup Agent service. Does that account have the required rights?

    Thanks.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Yes the account has the rights to the folders. I can copy, create and edit files and place them in that share via windows explorer without issue.
  • peteypetey Posts: 2,358 New member
    Can you back up a database using SQL Server to the network share e.g.
    BACKUP DATABASE model TO DISK = '\\SANSHAREFOLDER\PATHTOBACKUPFOLDER\model.bak'
    
    If so, can you then change the SQL Backup Agent service startup account to the same account used by the SQL Server service, and then try backing up to the same network share using SQL Backup?

    Thanks.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • kkammseamkkammseam Posts: 0 New member
    There are some users who have encountered this error named system 5 has occurred. Access is denied. It pops up in the command prompt window when people try to start some instructions. Here we have some solutions to solve this issue but in case you want to go in detail then visit this webpage https://appuals.com/how-to-fix-system-error-5-has-occurred-on-command-prompt/ Windows 7 users can solve this problem by right-click on the option of Command Prompt and select run as administrator.
    Then tap yes when urged by User Account Control. Windows 8, 8.1 and 10 users can solve this issue by tapping Windows key + X at the same time to open quick-access menu. Here press the option of Command Prompt (Admin). Then press the option of Yes when prompted by User Account Control and hopefully you would be able to solve this error.
Sign In or Register to comment.