do some dynamic script generation by joining the relevant system tables.
Here is an example of this that I just now did for a work requirement:
select 'select ''' + s.name + '.' + o.name + ''' as ''tblname'', count(*)
from [' + s.name + '].[' + o.name + ']
go'
from sys.objects o inner join sys.schemas s on o.schema_id = s.schema_id
where type = 'u'
order by s.name, o.name
grab the output and paste it and execute:
select 'audit.BookedLoanApplications' as 'tblname', count(*) from
[audit].[BookedLoanApplications]
go
select 'audit.DealerApplications' as 'tblname', count(*) from
[audit].[DealerApplications]
go
...

Signature
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
> Hi,
>
[quoted text clipped - 4 lines]
> Thank you,
> Max
Max2006 - 04 Jul 2008 13:57 GMT
Thanks Kevin for help.
Is there any existing tool to so such tasks?
Max
> do some dynamic script generation by joining the relevant system tables.
> Here is an example of this that I just now did for a work requirement:
[quoted text clipped - 32 lines]
>> Thank you,
>> Max
TheSQLGuru - 05 Jul 2008 16:03 GMT
I think there may be tools that will allow you to make a change to a table
and apply it to other tables somehow. but such things are so variant you
best and most appropriate option (imho) is to simply script them yourselves
using the mechanism I proposed. I use this form of build-it scripting very
frequently to do all sorts of things.

Signature
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
> Thanks Kevin for help.
> Is there any existing tool to so such tasks?
[quoted text clipped - 38 lines]
>>> Thank you,
>>> Max