Needing to figure out which users in which database are members of roles? You’ve come to the right spot! Try this code…
Year: 2012
Script version of SSMS “Sql Server Agent” Job Activity Monitor
Are you tired of “right-click” “refresh” on the job monitor? Want a single, simple script to tell you what step a job is at? Try this script:
Sql Binaries location, SessionTimeout, Sql Version
OK…this is a ‘strange’ post… That is because the script i have for you today is a real ‘utility’ script… it does three things that occasionally come in REAL handy! It tells you the location of your SQL binaries. It…
Sql Server Status
What’s the first thing you do when you get a report of a problem on one of your servers? In my case… i run this following script that gives me a quick overview of all the top counters of interest.
Backup Script to replace xp_sqlmaint
Need a backup script because xp_sqlMaint is not running on 2008? Try this one. You need only fill in the database name and directory name in the appropriate places below:
Out of disk space…Log file grown too big?
It’s early in the morning, and you’ve got disk space problems… log file, right? Yep. OK, we need a script that will tell us what we need to know ASAP. Since i experienced this issue multiple times…and since they always…
Find the users and their roles in a Database
Do you need to know all the users for a single database…and also to know what roles they have? (The key is to look for the string “mscs” in the code and replace it with what your databases beginning strings…
When were your statistics last updated?
Introduced in sql 2005 the following query will tell you the date your statistics were last update for each of indexes of a table…
Improved EventLogs in Win 2008
Recently at one client location we had numerous unexplained cluster failovers. I had SQL Server and Analysis Services running on the clusters. When analysis was done on the failover, the analysts found that the “FlightRecorder” showed errors immediately before the…
Determine “Locked Paged” use across your domain…
So, building on my previous blog entry, now, let’s open a multi-server query and run this script that follows. It will tell you for each server it’s version and how much memory is in locked pages.