SQL databases recovery model

SELECT name, recovery_model_desc
FROM sys.databases

GO

Advertisements

Send Email with PS

Send-MailMessage -From “email address” -To “email address” -Subject “Test email” -Body “Test” -SmtpServer “SMTP server address”

Set offline database

ALTER DATABASE <dbasename> SET OFFLINE WITH
ROLLBACK IMMEDIATE
GO

How to force drop database in SQL

USE master;
ALTER DATABASE [databasename] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE [databasename] ;

Cannot see a SQL Configuration Manager

sqlservermanager11.msc

Rename SharePoint Web Application Name

$WA = SPWebApplication | where {$_.Name -match “OldName”}
$WA.Name =”NewName”
$WA.Update()
Get-SPWebApplication | where {$_.Name -match “NewName”}

Embed Smooth video in SP

<iframe width=”640″ height=”390″ src=”http://mediasite.com” frameborder=”0″ allowfullscreen></iframe>”