Error 15105 while restoring transaction log.

  • I was running some sanity checks on a new SQL 2008 server on which we will be implementing a third party system in a couple of weeks. Part of my checks involved restoring backups created by the maintenance plan to a test database.

    This worked:

    RESTORE DATABASE DBNAMETest

    FROM DISK = 'H:\SQLData_instance\DBNAME\DBNAME_backup.bak'

    WITH NORECOVERY

    ,MOVE 'DBNAME' TO 'G:\SQLData_instance\DBNAMETest.mdf'

    ,MOVE 'DBNAME_log' TO 'E:\SQLData_instance\DBNAMETest_log.ldf'

    but when I tried to restore the first log:

    RESTORE LOG DBNAMETest

    FROM DISK = 'H:\SQLData_instance\DBNAME\DBNAME_backup.trn'

    WITH NORECOVERY

    the following error occurred:

    Msg 3201, Level 16, State 2, Line 1

    Cannot open backup device 'H:\SQLData_instance\DBNAME\DBNAME_backup.trn'.

    Operating system error 2(failed to retrieve text for this error. Reason: 15105).

    Msg 3013, Level 16, State 1, Line 1

    RESTORE LOG is terminating abnormally.

    Error 15105 seems to be some sort of permissions problem.

    This is a physical server on which I was logged in as the local Administrator. I had sysadmin rights to the instance and the disks are local RAID 10 arrays. (ie No SAN.)

    Has anyone come across this problem?

    Any ideas on how to fix this will be gratefully received.

  • This has nothing to do with your permissions. The permissions must be granted for the service account running SQL Server.

  • Steve Jones - Editor (8/23/2010)


    This has nothing to do with your permissions. The permissions must be granted for the service account running SQL Server.

    Thanks for the reply.

    Please could you explain how me attempting a restore has anything to do with the SQL Server service account?

    Edit: Also why would restoring the BAK file work but not the transaction log?

  • As far as the restore, YOU do not issue a command against that file. You issue a command to the SQL Server, and it must access OS resources to perform the action. It's the SQL Server service accounts, or proxies for some services, that have permissions checked.

    If the log backup files are in the same place as the .bak files, it still could be permissions. However, most people permission on folders, not files, so perhaps it's something else? You can try a NET MSG 2 to see what your OS returns here.

  • Hello!

    Is the log file physically consistent? You can try copying it to a different physical path on the SAN (if the space so allows) just to make sure that the OS can indeed read the file correctly.

    Next, what is the recovery model of the database?

    Thanks & Regards,
    Nakul Vachhrajani.
    http://nakulvachhrajani.com

    Follow me on
    Twitter: @sqltwins

  • Hello!

    Just a thought - I trust you do not have any white spaces in the database name - can you just give it a try (eg. you have [MyDB ] instead of [MyDB])

    Thanks & Regards,
    Nakul Vachhrajani.
    http://nakulvachhrajani.com

    Follow me on
    Twitter: @sqltwins

  • Steve Jones - Editor (8/23/2010)


    As far as the restore, YOU do not issue a command against that file. You issue a command to the SQL Server, and it must access OS resources to perform the action. It's the SQL Server service accounts, or proxies for some services, that have permissions checked.

    If the log backup files are in the same place as the .bak files, it still could be permissions. However, most people permission on folders, not files, so perhaps it's something else? You can try a NET MSG 2 to see what your OS returns here.

    Thanks for the info. I will check the server when it is up again.

    I suspect the permsision is on the Folders (but will double check) so I am still confused as to why I can restore the full backup but not the transaction log.

  • Nakul Vachhrajani (8/23/2010)


    Hello!

    Just a thought - I trust you do not have any white spaces in the database name - can you just give it a try (eg. you have [MyDB ] instead of [MyDB])

    Thanks for the sugestions.

    The server does not use the SAN, the DB is in full recovery mode and there is no white space in the DB name.

  • I have just checked and the SQL Service Account is currently the LocalSystem.

    My understanding is that the LocalSystem has full rights to all local drives.

    Does anyone else have an idea on why this error occurs?

  • LocalSystem should have full rights. Did you check that individual file?

    Have you tried restoring these files on another instance to rule out file issues?

  • Steve - thanks a lot for your help.

    When I copied the files to another server and tried to restore there was no problem.

    I then tried on the new server and it worked!

    The last time I tried the restore on the new server there were pending Windows updates which everyone had been postponing for a few days so as to not disrupt UAT. Since then the machine has been re-started so I presume that was the problem.

    You live and learn!

  • Not sure I helped, but thanks for the update. I wouldn't think pending updates were the issue, and I suspect something else, but I'm glad it's working for you.

Viewing 12 posts - 1 through 11 (of 11 total)

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