If you would like to change the database recovery model on your SQL Server database you can use the ALTER DATABASE command.
To set your database recovery model to full you can execute the following statement:
----------------------------------- ALTER DATABASE [test] SET RECOVERY FULL WITH NO_WAIT; -----------------------------------
To set your database recovery model to simple you can execute the following statement:
----------------------------------- ALTER DATABASE [test] SET RECOVERY SIMPLE WITH NO_WAIT; -----------------------------------
To set your database recovery model to bulk logged you can execute the following statement:
----------------------------------- ALTER DATABASE [test] SET RECOVERY BULK_LOGGED WITH NO_WAIT; -----------------------------------
I need powershell scripts for sql server
Hi Sudheer – what kind of things are you looking to do with the PowerShell scripts?