Use a variable in an ALTER DATABASE command

Note:  Best viewed in Internet Explorer 6 and above Implementation: How to use a variable in an ALTER database command. Scenario: Lets say,you want to use a variable in an ALTER DATABASE for putting all or selected DBs offline/online/attach/detach purpose. Infrastructure:The below query/procedure has been run/tested successfully on sql server 2005,2008,2008 R2 and 2012. Kindly find the below …

Continue reading Use a variable in an ALTER DATABASE command

Move MSDB & MODEL databases to another location without downtime [without start\stop SQL service]

 Note:Best viewed in Internet Explorer 6 and above Implementation: Moving the msdb,model databases without SQL service start and stop. Scenario: Lets say you are suppose to move the system databases(msdb,model) not tempdb and master to another location without SQL service start and stop operations. Below some steps will help you out for getting done above …

Continue reading Move MSDB & MODEL databases to another location without downtime [without start\stop SQL service]