Problem with the back up script on SQL Server 2012 Express

  • Hello All,

    I've script that backs up SQL database every morning at 7AM. After, I installed new microsoft updates last week on my server, my SQL script no longer works. Below is my script:

    EXEC sp_BackupDatabases @backupLocation='C:\Backups-All\Backup\7AM\', @backupType='F'

    When I try to run the stored procedure on SSMS, I get the below error message:

    Cannot open backup device 'C:\Backups-All\Backup\7AM\ScheduleDb_FULL_01202015_102821.BAK'. Operating system error 5(Access is denied.).

    Msg 3013, Level 16, State 1, Line 1

    BACKUP DATABASE is terminating abnormally.

    Can somebody please help?

    Thanks

  • check what account the sqlserver.exe service is logged in under and make sure that account has permission to write to the folder you are trying to back up to.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • TheSQLGuru- SQL server is running under the account - NT Service\MSSQLSERVER . How do I add this account to access my backup folder which is C:\Backups-All\Backup?

    Thanks for your quick response

  • Can somebody give me a hand on this? Thanks

  • amolacp (1/20/2015)


    Can somebody give me a hand on this? Thanks

    Did you search for help online?? You should do that first before asking for help.

    A Google search of these terms: windows write permission folder

    top hit tells you exactly what to do.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply