Here is some code to get a list of identity columns in database.
select so.name as TableName, + o.list as IdentityColumnName
from sysobjects so
case when exists (
select id from syscolumns
and columnproperty(id,name,'IsIdentity') = 1
end + ' '
from information_schema.columns where table_name = so.name
) o (list)
where xtype = 'U'
AND o.list is not null
AND name NOT IN ('dtproperties')
posted @ Monday, November 11, 2013 4:14 PM