Search through all the Data files to find a specific data file path. Here’s a quick script to search through ALL the database files, and paths to find a specific file. Advertisements
This script will Set all Offline Databases Online, and do a backup after the switch to online. I’ve also taken the liberty of adding some extra logic to use a network backup […]
Here is a quick script to configure ALL your databases to Simple Recovery not just your User Databases, but System Databases too. use master; set nocount on declare @change_all_databases_to_simple_recovery varchar(max) set @change_all_databases_to_simple_recovery […]
This simple script will show you when databases were restored. It helps you find the restore history of any or all databases.
You can use this quick little script to find when a Backup or Restore completes. It will estimate how many hours, or minutes you have left.
Just go to management Studio and type in the following statement: This will return a list of ALL databases organized in ascending order.
Here’s a quick script that will backup all databases to a shared location on the network. The database backup files will be titled like this: MyDatabaseName.bak There is some extra logic to […]
It seems since the acquisition of LiteSpeed again and again has somewhat fragmented the amount of available information, so I’ll post up what I have in my notes about the LiteSpeed Parameters. […]
Here’s a quick script you can use to check all Jobs to see whats enabled, or disabled. use msdb; set nocount on select name , ‘Job State’ = case enabled when ‘1’ […]
Here’s a quick you can use to disable all Jobs. –to disable all jobs run this. use msdb; set nocount on declare @disable_all_jobs varchar(max) set @disable_all_jobs = ” select @disable_all_jobs = @disable_all_jobs […]
Just go to Management Studio, and run the following logic. select serverproperty(‘edition’) , serverproperty(‘productlevel’) , serverproperty(‘productversion’) exec xp_msver; exec xp_cmdshell ‘systeminfo’; The output will give you lots of good information such as […]
Here’s some logic I wrote to take get the database names for your entire server, and pass that into some restore logic which in turns produces a restore script for every database […]
You can see when the Server was last rebooted by running a single script. exec master..xp_cmdshell ‘systeminfo’ If you find an error; then you may need to enable this through sp_configure in […]
I usually include this single script in with any enterprise wide reports to get an idea of the SQL Edition, Service Pack, and Version numbers. You could also insert this into a […]