3

I have been using on my SQL Server 2008R2 server Ola Hallengren solutions for almost two years. Last night backups failed, both System databases and user databases with error below.

Example of system databases error:

Date and time: 2016-05-31 20:00:01 Command: DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_create_subdir N'E:\SQLBackups\Server1\master\FULL' IF @ReturnCode <> 0 RAISERROR('Error creating directory.', 16, 1) HResult 0x5620, Level 16, State 1 xp_create_subdir() returned error 183, 'Cannot create a file when that file already exists.' Msg 50000, Level 16, State 1, Server Server1, Line 1 Error creating directory. Outcome: Failed Duration: 00:00:00 Date and time: 2016-05-31 20:00:01

User Databases error Example:

Date and time: 2016-05-31 20:00:12 Database: [Dummy_1] Status: ONLINE Standby: No Updateability: READ_WRITE User access: MULTI_USER Is accessible: Yes Recovery model: SIMPLE Differential base LSN: 423000000014100036 Last log backup LSN: 342000000037500001 Date and time: 2016-05-31 20:00:12 Command: DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_create_subdir N'E:\SQLBackups\Server1\Dummy_1\FULL' IF @ReturnCode <> 0 RAISERROR('Error creating directory.', 16, 1) HResult 0x5620, Level 16, State 1 xp_create_subdir() returned error 183, 'Cannot create a file when that file already exists.' Msg 50000, Level 16, State 1, Server Server1, Line 1 Error creating directory. Outcome: Failed Duration: 00:00:00 Date and time: 2016-05-31 20:00:12

It failed when I run the job on right click too

Does anyone know how to solve the problem?

4

You need to ensure the SQL Server Service Account has the required Access Control for the paths used for storing your backups.

Check the SQL Server Accounts and Permissions page for details about what ACLs are required. See Configure File System Permissions for database engine access for details about how to change permissions.

0

I had the same error today when backing up to a network-share: RAISERROR('Error creating directory.', 16, 1)

I did a manual BACKUP DATABASE in SSMS. This revealed the true cause behind the error: Write on "\\server.domain.com\SQL\2016\SERVER$INSTANCE_PROD\master\FULL\master.bak" failed: 112(There is not enough space on the disk.)

The disk on the network-drive was full. I didn't see it otherwise because i do not have administrative access to that device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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