Powershell Restore-CVSQLDatabase missing NORECOVER option

  • 15 September 2021
  • 1 reply

Badge +2

Looking for a NORECOVER option when restoring SQL DB with powershell.

Not possible with this cmdlet.
Is there another way?


Best answer by Chris Hollis 15 September 2021, 05:02

View original

1 reply

Userlevel 6
Badge +15

Hi @yan 

There is another community post about similar Restore-CVSQLDatabase related questions: 

From what I can see, there is no other way when using powershell - Someone else in the community however may know something I don’t! 

As for alternatives,  you could try using qcommands:

There is a template that can be leveraged: 

You populate the parameters you require, in this particular situation you would modify the sqlServerRstOption <sqlRecoverType> "STATE_RECOVER" to "STATE_NORECOVER" and the restore will leave the database in a no recovery state.

If you must use powershell, the other community article I linked above has next steps you can follow on how you can get answers or clarification. 

Hopefully this helps in some way.