Quickly generate script to bring all SQL Server Databases offline.
SELECT 'ALTER DATABASE ['+name+'] SET OFFLINE WITH NO_WAIT'+CHAR(10)+' GO' FROM
MASTER.sys.databases
WHERE name NOT IN ('master','tempdb','model','msdb','distribution')
TechBrothersIT is a blog and YouTube channel sharing real-world tutorials, interview questions, and examples on SQL Server (T-SQL, DBA), SSIS, SSRS, Azure Data Factory, GCP Cloud SQL, PySpark, ChatGPT, Microsoft Dynamics AX, Lifecycle Services, Windows Server, TFS, and KQL. Ideal for data engineers, DBAs, and developers seeking hands-on, step-by-step learning across Microsoft and cloud platforms.
SELECT 'ALTER DATABASE ['+name+'] SET OFFLINE WITH NO_WAIT'+CHAR(10)+' GO' FROM
MASTER.sys.databases
WHERE name NOT IN ('master','tempdb','model','msdb','distribution')
Beautiful simplicity. Perfect!! Thank you.
ReplyDeleteNicest information!!! I'll be enchanted to greatly help due to what I've learnt from here.
ReplyDeleteuser experience design agency
He arrived on time, and expertly investigated and recognized the problem.
ReplyDeleteweb design SF
This web page has given me loads to keep in mind and what I wanted for years!! What an extraordinary solution to design studios!!
ReplyDeletecompany logo design
Every day I visit a number of blog sites to see content, however this offers quality based content.
ReplyDeletebrand strategy firms
Hi, I have just started to SQL Certification Online. and this blog is really informative for me. Keep us posted for this kind of valuable blog. Thank you for this blog!
ReplyDeleteI liked your blog because there is a lot of good information in it, if you look for java script in
ReplyDeleteTraining Services Company in Dinanagar then you will not get anything better than Satyam Technology.