Apr 26

GRANT Schema Permissions

Background: I had a user that needed to be able to read, but not execute, stored procedures in the DBO schema. I used these methods below to achieve this task.

There are two methods to granting schema permissions in SQL server.

  • One is through T-SQL commands:

Apr 25

Reseed Identity for Table

I’ve designed an integration job that deletes all data from a table and imports new records each night. The table has an identity column in it, so the value (or seed) will always be growing.

Here is the easiest way to reseed the identity column for a table:

This will force the next inserted identity value to be 1 (0+1=1 Smile).


Apr 12

Checking for sysadmin on an Instance

Here is a simple script that checks for sysadmins on an instance:


Apr 04

Sort or Search in sp_who2

Here is a simple script that allows you to sort and search for items in the sp_who2 stored procedure. Works with SQL 2005 and up: