TSQL Admin scripts

Soldato
Joined
12 Dec 2006
Posts
5,694
I'm looking for some TSQL scripts to check the health of a system after a deployment.

So we have one system that is heavy dependant on other databases. Often when someone makes a changes or a deployment to those systems, it breaks this system. I want to check have user/application permissions changes, have SP changed or are missing, same with views. Things like lookup, and data missing I can script ok. Its the where database objects themselves have been altered I don't know how to check in a script. The admin stuff. I can do it manually. But I want to automate it.

For example one time someone renamed the database and it took a while to realise this was the problem. Another time someone replicated live back to dev and lost all the Stored Procs that were in dev but not live. Sometimes they remove data which breaks the system.

I just don't want to have spend so much time finding out what happened.

Even links to where I can research this.
 
I'm only an analyst not a DBA so my knowledge is limited, however, it sounds more like you need proper change protocols in place before any admin scripts.

Who are making these changes?
What process do they need to go through?
Who checks changes?
Also nice to know what version of SQL server you're running, i'm sure later one had some change reporting built in.

Out place has these change systems in place, we're pretty lax currently on the basic stuff but your place makes this sound like a NASA mission.
 
We are running every version from 2005~2016 maybe even 2017 in test somewhere.
I'm mainly using 2008 and 2013. We must have about 60+ databases. Not all MS SQL either.

The whole place is dysfunctional. All silo'd teams and fiefdom's.
Easier getting blood out of stone than influence them to change.

I have moved myself away from these teams and mainly work in different area now.
This is just some legacy stuff, that I get dragged aback to now and then.
Tedious repetitive work I automate allowing me to do more interesting things.
I've just not done it with server admin before.
 
Back
Top Bottom