Forum Discussion

amdcler's avatar
amdcler
Level 4
10 years ago

How restore SQL database to different server?

Hello!
We used Netbackup 7.6.1
With scripts .bch has been configured Full online backup SQL database which succeeds. Recovery with .bch is also successful, but only on the same server. (in mode "recovered" and "not recovered" (.mdb,.ldb))

How to set up a database restore to a different server?
I have tried to make these instructions:

Recovery is initiated on the master server

Redirecting a SQL restore to a different host
Multiple NetBackup database clients can be configured to use a single NetBackup
master server for backing up SQL Server databases. With this configuration, you
can back up SQL Server database objects from one client and restore them to
another. In the following procedure, HostA is the client that was originally backed
up and HostB is the other client to which the restore is redirected.
To redirect a restore to a different host
1 Establish permission settings on the master server.
Do one of the following:
■ Create a install_path\NetBackup\db\altnames\No.Restrictions file
to allow unrestricted redirected restore privileges.
■ Create a install_path\NetBackup\db\altnames\HostB file to allow HostB
to restore HostA's data. The client named HostB can then access HostA's
data on the master as well as any other client's data that was backed up
on the master.
2 Select File > SetSQLServerconnectionproperties.
3 Log onto the target instance on HostB.
4 Select File > SetNetBackupclientpropertiesand select the current master
server to be a master server that is common to both HostA and HostB.
5 Select File > RestoreSQLServerobjects.
6 From the Backup History Options dialog box, select HostA as the SQL host
from which the target objects were backed up.
When the restore window appears it contains a history of objects that were
backed up from HostA. Select those objects and restore them to HostB.

In this scenario, I get an error

ERR - Error in CoCreateInstance: 0x80040154.

 

 

and Recovery is initiated on the client server which was backuped

https://support.symantec.com/en_US/article.TECH35995.html

Here is an example with the option "not recovered"

HostA - source client

HostB - destination client


#  This is a template for the database MOVE command.

OPERATION RESTORE
OBJECTTYPE DATABASE
RESTORETYPE MOVE

#  Replace the database name in the following line with the name of the database that you
#  want to move to. Also remove the hash mark <#> which precedes the keyword <DATABASE>.

DATABASE "123"
#
#  Replace the file path <E:\SQLData\PortalDBs\WSS_videocam.mdf>
#  with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
#  The target of the MOVE keyword must be "WSS_videocam".
MOVE  "WSS_videocam"
TO  "E:\123.mdf"
#
#
#  Replace the file path <E:\SQLData\PortalDBs\WSS_videocam_log.LDF>
#  with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
#  The target of the MOVE keyword must be "WSS_videocam_log".
MOVE  "WSS_videocam_log"
TO  "E:\123_log.LDF"
#
# The following image is type: Full
NBIMAGE "HostA.MSSQL7.HOSTA.db.WSS_videocam.~.7.001of001.20150430110244..C"
SQLHOST "HostB"
NBSERVER "HostM"
BROWSECLIENT "HostA"
MAXTRANSFERSIZE 6
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE NOTRECOVERED
SQLCOMPRESSION TRUE
NUMBUFS 2
ENDOPER TRUE

INF - RESTORE STARTED USING
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
Jun 28 2012 08:36:30
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)
Batch = C:\test.bch, Op# = 1.
INF - Using backup image HostA.MSSQL7.HOSTA.db.WSS_videocam.~.7.001of001.20150430110244..C
INF - restore database "123" from VIRTUAL_DEVICE='VNBU0-6740-6876-1430400456' with  stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 2, replace , norecovery, move 'WSS_videocam' to 'E:\123.mdf', move 'WSS_videocam_log' to 'E:\123_log.LDF', replace
INF - Number of stripes: 1, Number of buffers per stripe 2.
INF - Created VDI object for SQL Server instance <HostB>. Connection timeout is <300> seconds.
ERR - Error in GetConfiguration: 0x80770003.
    CONTINUATION: - The api was waiting and the timeout interval had elapsed.
DBMS MSG - ODBC return code <-1>, SQL State <37000>, SQL Message <3201><[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open backup device 'VNBU0-6740-6876-1430400456'. Operating system error 0x80070002(failed to retrieve text for this error. Reason: 15105).>.
DBMS MSG - SQL Message <3013><[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE DATABASE is terminating abnormally.>
ERR - Error found executing <restore database "123" from VIRTUAL_DEVICE='VNBU0-6740-6876-1430400456' with  stats = 10, blocksize = 65536, maxtransfersize = 4194304, buffercount = 2, replace , norecovery, move 'WSS_videocam' to 'E:\123.mdf', move 'WSS_videocam_log' to 'E:\123_log.LDF', replace>.
INF - OPERATION #1 of batch C:\test.bch FAILED with STATUS 1 (0 is normal). Elapsed time = 304(304) seconds.
INF - Results of executing <C:\test.bch>:
<0> operations succeeded. <1> operations failed.

 

As now all I fix this? I already read a lot of topics on the forum and admin guide, but nothing happens...

Is it possible to perform a recovery exclusively on the master server in case the server is physically damaged power?

Thanks in advance.

  • You cannot initiate a SQL restore from the master server. You can only start the restore from the destination client. See 'Redirecting a SQL restore to a different host' in NetBackup for Microsoft SQL Server Administrator's Guide : http://www.symantec.com/docs/DOC6479

18 Replies

Replies have been turned off for this discussion