cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Server alternate restore failing on trxlog

Grus_minion
Level 2

 Hi folks,

I'm having a slight issue trying to run an alternate restore from one SQL Server environment to another, but only on the transaction logs. It'll restore the full and differential backup fine but fails with 'They system cannot find the file specified'. Below is my batch file and the error that I get :

 

OPERATION RESTORE
OBJECTTYPE DATABASE
FILEGROUP "PRIMARY"
PARTIAL TRUE
DATABASE "Test_DB"
MOVE "Test_DB"
TO "D:\SQLDBA01\DATA01\DATA\Test_DB.mdf"
MOVE "Test_DB_log"
TO "F:\SQLDBA01\LOGS01\LOGS\Test_DB_log.ldf"
# The following image is type: Read-write filegroups
NBIMAGE "TSTSERVER01.MSSQL7.TSTSERVER01\TSTINS01.db.Test_DB.~.7.001of001.20180126200240..C"
SQLHOST "DEVCLUSTV02"
SQLINSTANCE "SQLDBA01"
NBSERVER "BACKUPMASTER01"
BROWSECLIENT "TSTSERVER01"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE NOTRECOVERED
NUMBUFS 1
ENDOPER TRUE
OPERATION RESTORE
OBJECTTYPE DATABASE
DUMPOPTION INCREMENTAL
FILEGROUP "PRIMARY"
DATABASE "Test_DB"
# The following image is type: Differential on read-write filegroups
NBIMAGE "TSTSERVER01.MSSQL7.TSTSERVER01\TSTINS01.inc.Test_DB.~.7.001of001.20180129200050..C"
SQLHOST "DEVCLUSTV02"
SQLINSTANCE "SQLDBA01"
NBSERVER "BACKUPMASTER01"
BROWSECLIENT "TSTSERVER01"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE NOTRECOVERED
NUMBUFS 1
ENDOPER TRUE
OPERATION RESTORE
OBJECTTYPE TRXLOG
DATABASE "Test_DB"
# The following image is type: transaction log
NBIMAGE "TSTSERVER01.MSSQL7.TSTSERVER01\TSTINS01.trx.Test_DB.~.7.001of001.20180130120047..C"
SQLHOST "DEVCLUSTV02"
SQLINSTANCE "SQLDBA01"
NBSERVER "BACKUPMASTER01"
BROWSECLIENT "TSTSERVER01"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE RECOVERED
NUMBUFS 1
ENDOPER TRUE

INF - RESTORE STARTED USING
Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64)
Oct 28 2016 18:17:30
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64> (Build 9600: ) (Hypervisor)
Batch = C:\temp\test4.bch, Op# = 1.
INF - Using backup image TSTSERVER01.MSSQL7.TSTSERVER01\TSTINS01.db.Test_DB.~.7.001of001.20180126200240..C
INF - restore database "Test_DB" filegroup=N'PRIMARY' from VIRTUAL_DEVICE='VNBU0-3444-7580-1517315208' with  partial,  stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 1, replace , norecovery, move 'Test_DB' to 'D:\SQLDBA01\DATA01\DATA\Test_DB.mdf', move 'Test_DB_log' to 'F:\SQLDBA01\LOGS01\LOGS\Test_DB_log.ldf'
INF - Number of stripes: 1, Number of buffers per stripe 1.
INF - Created VDI object for SQL Server instance <SQLDBA01>. Connection timeout is <300> seconds.
Restore started Tue Jan 30 12:26:49 2018

INF - ODBC return code <2>, SQL State <01000>, SQL Message <3211><[Microsoft][SQL Server Native Client 11.0][SQL Server]10 percent processed.>.
INF - SQL Message <3211><[Microsoft][SQL Server Native Client 11.0][SQL Server]20 percent processed.>
INF - ODBC return code <2>, SQL State <01000>, SQL Message <3211><[Microsoft][SQL Server Native Client 11.0][SQL Server]30 percent processed.>.
INF - SQL Message <3211><[Microsoft][SQL Server Native Client 11.0][SQL Server]40 percent processed.>
INF - ODBC return code <2>, SQL State <01000>, SQL Message <3211><[Microsoft][SQL Server Native Client 11.0][SQL Server]50 percent processed.>.
INF - SQL Message <3211><[Microsoft][SQL Server Native Client 11.0][SQL Server]60 percent processed.>
INF - ODBC return code <2>, SQL State <01000>, SQL Message <3211><[Microsoft][SQL Server Native Client 11.0][SQL Server]70 percent processed.>.
INF - SQL Message <3211><[Microsoft][SQL Server Native Client 11.0][SQL Server]80 percent processed.>

INF - Thread has been closed for stripe #0
INF - OPERATION #1 of batch C:\temp\test4.bch SUCCEEDED with STATUS 0 (0 is normal). Elapsed time = 47(40) seconds
INF - RESTORE STARTED USING
Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64)
Oct 28 2016 18:17:30
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64> (Build 9600: ) (Hypervisor)
Batch = C:\temp\test4.bch, Op# = 2.
INF - Using backup image TSTSERVER01.MSSQL7.TSTSERVER01\TSTINS01.inc.Test_DB.~.7.001of001.20180129200050..C
INF - restore database "Test_DB" filegroup=N'PRIMARY' from VIRTUAL_DEVICE='VNBU0-3444-4248-1517315258' with  stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 1, replace , norecovery
INF - Number of stripes: 1, Number of buffers per stripe 1.
INF - Created VDI object for SQL Server instance <SQLDBA01>. Connection timeout is <300> seconds.
INF - Thread has been closed for stripe #0
INF - OPERATION #2 of batch C:\temp\test4.bch SUCCEEDED with STATUS 0 (0 is normal). Elapsed time = 18(12) seconds
INF - RESTORE STARTED USING
Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64)
Oct 28 2016 18:17:30
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64> (Build 9600: ) (Hypervisor)
Batch = C:\temp\test4.bch, Op# = 3.
INF - Using backup image TSTSERVER01.MSSQL7.TSTSERVER01\TSTINS01.trx.Test_DB.~.7.001of001.20180130120047..C
INF - restore log "Test_DB" from VIRTUAL_DEVICE='VNBU0-3444-14176-1517315277' with  stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 1, replace , norecovery
INF - Number of stripes: 1, Number of buffers per stripe 1.
INF - Created VDI object for SQL Server instance <SQLDBA01>. Connection timeout is <300> seconds.
ERR - Error in GetCommand: 0x80770004.
    CONTINUATION: - An abort request is preventing anything except termination actions.
INF - OPERATION #3 of batch C:\temp\test4.bch FAILED with STATUS 1 (0 is normal). Elapsed time = 7(7) seconds.
INF - Results of executing <C:\temp\test4.bch>:
<2> operations succeeded. <2> operations failed.
ERR - Error in VxBSAGetServerError: 6.
    CONTINUATION: - The system cannot find the file specified.
ERR - Error in VxBSAEndData: 6.
    CONTINUATION: - The handle used to associate this call with a previous VxBSAInit() call is invalid

 Its driving me insane! Does anyone have any idea what the issue could be ?

Cheers!

4 REPLIES 4

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello,

does the database contain any other filegroups instead of PRIMARY? Then it is required to restore also their backups, before applying transaction logs.

Review alos Windows Event Viewer for error messages, I guess the problem is related rather to SQL than Netbackup.

Regards

Michal

Marianne
Level 6
Partner    VIP    Accredited Certified

Can we assume that you have verified that the log path F:\SQLDBA01\LOGS01\LOGS\  exists? 

Level 3 dbclient log will shed more light on where exactly the error is.

Hi folks, thanks for the replies.

The only filegroup is PRIMARY on the restore server (we have one other test database on it currently).

"F:\SQLDBA01\LOGS01\LOGS\" definitely exists. 

I've enabled logging as per this article, but don't seem to be getting any logs (have restarted the services) https://www.veritas.com/support/en_US/article.000027153

Cheers!

Marianne
Level 6
Partner    VIP    Accredited Certified

If dbclient folder exists on the SQL server under <install-path>\veritas\netbackup\logs before restore is started, it will most certainly create log file during restore process.