by Vishwa
18. July 2007 18:29
I came across a situation where I had to find all the stored procedures or user defined functions that do not have “execute” permission under a particular user. Here is a simple SQL Statement one which can be used under SQL Server 2005 to find those objects.
[More]
432c598d-4a6b-409c-a146-713649a0b64b|2|3.5
Tags: Security
SQL
by Vishwa
25. June 2007 10:22
You might have come across situation when you wanted to log SQL Connections and Locks for a particular day or period. In the following example, by using two tables and one stored procedure, you can log these activities and analyze at a later time. This stored procedure can be turned into a SQL Job for any given interval so that you do not have to manually run it.
[More]
d4f32724-f906-429a-b643-d94eb73071d1|1|5.0
Tags:
SQL
by Vishwa
1. June 2007 08:42
At some point you might need to know, how many tables you have in database, number of rows in each table, size of table and indices. Following is a simple SQL Script which can provide you a snapshot of all such details.
[More]
076dc02d-5842-42ab-a189-a830ff594b90|2|4.0
Tags:
SQL