Archive for the ‘T-SQL’ Category

SQL Server health check using PowerShell and T-SQL   15 comments

I am back with another interesting blog which hopefully the production DBAs would find more useful. We often have the need to capture aggregated data related to SQL Server health which can not only be captured quickly but also be able to customize as per the requirements.

We have many tools available to capture the performance data but it mostly has some data lag and does not tell us what’s currently running on the system.

Since last few days, I have been working on a script based solution which helps us to perform quick health check of our production instance to resolve any production issue with this blog, I intend to share the solution as I have found it quite useful Read the rest of this entry »

Getting SQL server’s data into sys logs:   Leave a comment

One of our clients had enabled C2 auditing on SQL server and as a result the logs are generated in trace file format at the specified location. As per our client’s requirement the output of the trace file should be stored in the sys logs (in the Event logs) or SQL server error logs. So we used the following method to get the SQL server data in to the sys logs:

1. Created a table(audit table) to store the output of a trace file

CREATE TABLE c2audit (Complete varchar(8000))

Read the rest of this entry »

Posted June 7, 2012 by CK in T-SQL

Tagged with , , , ,