select log_reuse_wait_desc from sys.databases where name = 'AdventureWorks' If Output is "LOG_BACKUP" -- Execute 2 Times just in case -- BACKUP LOG AdventureWorks TO DISK='NUL:' -- Now Truncate the Log -- USE AdventureWorks GO ALTER DATABASE AdventureWorksSET RECOVERY SIMPLE WITH NO_WAIT; GO DBCC SHRINKFILE(AdventureWorks_LOG, 100); GO ALTER DATABASE AdventureWorks SET RECOVERY FULL WITH NO_WAIT; GO
EXEC sp_configure 'show advanced option',1 GO RECONFIGURE GO EXEC sp_configure 'xp_cmdshell', 1 GO RECONFIGURE GO
Action : Start a Program Program : powershell.exe Add Arguements (Optional) "& 'c:\checkDS\CheckDiskSpace_post.ps1'"
SQL Server supports creating indexes on a view. It is the same concept as Materialized Views in Oracle. The main difference in the syntax in normal views and indexed views is the clausa "with schemabinding" Now go ahead amd create the index on the view you just created.
In case your mirroring has been suspended and you have tried everything else and nothing works. Your last option is to break the mirroring and restore the mirror database and connect the client application to the mirror site. Before proceeding with this please note that doing this will require you to rebuild the Data Mirroring … Continue reading Sql server 2008 database mirroring manual failover
Incase you want to change the mode of the mirroring from High Performance to High Safety. You can do it from the command line. ALTER DATABASE SET PARTNER SAFETY OFF; Please note that SQL Server 2008 Standard Edition does not allow changing the safety level. It will throw the below error "Msg 1473, Level 16, … Continue reading Change Modes Database Mirroring SQL Server 2008