Link to home
Start Free TrialLog in
Avatar of tschary
tschary

asked on

Restoring Alwayson SQL dataabase backup using cmdlet Restore-DpSqlBackup

Hi Team,

we do SQL Server backups and restore using IBM TSM Tivoli storage manager via TDPSQL. I am struggling for restore command. I want to restore production Always On(AAG) database full backup into test database using Restore-DpSqlBackup cmdlet. Please find below syntax which i am using and kindly correct it.

Restore-DpSqlBackup  proddbname -Full -Replace -SQLSERVer testinstancename -SQLAUTHentication INTegrated -Stripes 1 -FromSqlServer AG-xyz -QueryNode  AlwaysOn -IntoDBName  Testdbname -Relocate COLLATE_Log,COLLATE_Data -To ldf file path,mdf file path  -MountWait Yes -ConfigFile "C:\Program Files\Tivoli\TSM\TDPSql\Restore_From_SQL.cfg" -TsmOptFile "C:\Program Files\Tivoli\TSM\TDPSql\Restore_From_SQL.opt"

I am getting the below error
Restore-DpSqlBackup : RC: 113
ACO0261I There are no backups for the server named AG-xyz

Regards,
Sreenivasa
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Do you know if TSM supports AlwaysOn?
Avatar of tschary
tschary

ASKER

Yes. it supports
Did you check this IBM document? Looks like it's a well known bug and there's a fix for it.
Avatar of tschary

ASKER

Hi,
the below command is working fine if i keep objectid name like 20160301230446\00002458.But i want to automate this command to perform on daily basis which will take latest full backup file.

Syntax:
Restore-DpSqlBackup -Private proddb-Full -BackupDestination TSM -BackupMethod legacy -Replace -SQLSERVer testinst1 -SQLAUTHentication INTegrated -Stripes 1 -FromSqlServer AG-testp -ObjectNames 20160301230446\00002458 -QueryNode AlwaysOn -IntoDBName testproddb -Relocate COLLATE_Log,COLLATE_Data -To X:\logs\testproddb .ldf,S:\data\testproddb .mdf -MountWait Yes -ConfigFile "C:\Program Files\Tivoli\TSM\TDPSql\Restore_From_SQL.cfg" -TsmOptFile "C:\Program Files\Tivoli\TSM\TDPSql\Restore_From_SQL.opt"
Hi,
i do not know if you used a fake name of testinstancename, but in case it is longer than 15 chars, then it fails, as reported on the following:

http://www-01.ibm.com/support/docview.wss?uid=swg21967472

Do you have the same error if you use graphical interface ?

hope this helps
max
ASKER CERTIFIED SOLUTION
Avatar of tschary
tschary

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
tschary, if your issue has been resolved please chose the comment or comments that helped you so this question can be closed.
Avatar of tschary

ASKER

I found solution from another source and closing the question.
Avatar of tschary

ASKER

I have customized the restore commands and it is running fine. Took from the help of IBM Tivoli®Storage Manager for DatabasesData Protection for Microsoft SQL Server Installation and User’s Guide