Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compare all table records in 2 Databases
Message
De
06/05/2010 07:59:31
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01428886
Message ID:
01463379
Vues:
35
>>>>Don't you think that it is an overkill for a simple job. I would simply use a T-SQL like this:
>>>>
>>>>
select object_name(si.id),si.rowcnt from [sys].[sysindexes] si
>>>>	inner join [sys].[tables] st
>>>>		ON si.id = st.[object_id]
>>>>	where si.indid<2 and st.is_ms_shipped = 0
>>>>      order by object_name(si.id)
>>>>
>>>>Cetin
>>>
>>>Is it only for tables having indexes?
>>
>>No, why do you think it is?
>>PS: However it is better to use Rows instead of RowCnt (table might be partitioned).
>>
>>Cetin
>
>Thanks. For some reason I thought since it's an inner join to sysindexes it means table should have indexes (as the name suggests). Thanks again.

No you are wrong. It doesn't mean that table should have indexes. SysIndexes doesn't only hold information about tables that have indexes and it is clearly documented.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform