Monthly Archives: March 2014

PowerShell – System Information

Different ways to find system information are given below:- Method 1:Querying WMI objects Download the code SystemInfo Create the function with Powershell console and call the function with ComputerName as its argument .SYNOPSIS  Get Complete details of any server Local or remote  .DESCRIPTION  This function uses WMI class to connect to remote machine and get all related details  .PARAMETER COMPUTERNAMES  Just Pass computer name as Its parameter  .EXAMPLE   Get-SystemInfo  … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

SQL Jobs – Complete Information – SQL 2000/2005/2008/R2

SQL Job details – The script can be executed across all SQL version from SQL 2000 onwards. The below are the columns listed in the output ServerName ScheduleID ScheduleName IsEnabled ScheduleType Occurrence Recurrence Frequency ScheduleUsage StartDate ScheduleUsage EndDate ScheduleCreatedOn ScheduleLastModifiedOn … Continue reading

Posted in SQL | Tagged , , , | Leave a comment

SQL – Backup Report

The simple query to find the database backup status The select statment consists of ServerName dbname BackupStartDate BackupFinishDate BackupAge Size status Type The query will only run from sql 2005 and later version. Select    SERVERPROPERTY(‘ServerName’),,   CONVERT(VARCHAR(10), b.backup_start_date, 103) +   + convert(VARCHAR(8), b.backup_start_date, 14) backup_start_date,   CONVERT(VARCHAR(10), b.backup_finish_date, 103) +   + convert(VARCHAR(8), b.backup_finish_date, 14) backup_finish_date,    case          when (DATEDIFF(hour, b.backup_start_date, getdate())<24)then ‘Success’  … Continue reading

Posted in SQL, XML | Tagged | 4 Comments

INVENTORY – SQL- SSAS – SSRS – Excel Output – Email

Inventory Inventory is a vital information,whether you’re a consultant or an in-house DBA, you need to have a reliable inventory of the servers you manage.This inventory can take any number of forms but, ideally, will allow some aggregation of information. When … Continue reading

Posted in PowerShell, SQL, SSAS, SSRS, T-SQL | Tagged , , , , , , , | 2 Comments