Showing posts with label guidance. Show all posts
Showing posts with label guidance. Show all posts

Monday, March 12, 2012

How can we list all the tables without any clustered index within a SQL Server 2005 database?

Hi ,All,

Would please anyone here give me any advice and guidance for how to list all the tables without a clustered key within a SQL Server 2005 database?

Thanks a lot in advance for that.

With best regards,

Yours sincerely,

Switch to the database you want to analyse and run this script:

select

sys.schemas.nameas [Schema],

sys.tables.nameas [Table]

from sys.tables

leftouterjoinsys.schemasonsys.schemas.schema_id =sys.tables.schema_id

where sys.tables.object_id not in

(

select

sys.indexes.object_id

fromsys.indexes

wheresys.indexes.type= 1

)

|||

Hi, Daniel, thanks a lot.

With best regards,

|||

Take a look at

http://msdn2.microsoft.com/en-us/library/ms345522.aspx#_FAQ1

It answers exactly the question you have asked

|||

Hi, Asvin, thanks a lot for the link. It's very helpful.

With best regards,

Yours sincerely,

How can we list all the tables without any clustered index within a SQL Server 2005 database

Hi ,All,

Would please anyone here give me any advice and guidance for how to list all the tables without a clustered key within a SQL Server 2005 database?

Thanks a lot in advance for that.

With best regards,

Yours sincerely,

Switch to the database you want to analyse and run this script:

select

sys.schemas.name as [Schema],

sys.tables.name as [Table]

from sys.tables

left outer join sys.schemas on sys.schemas.schema_id = sys.tables.schema_id

where sys.tables.object_id not in

(

select

sys.indexes.object_id

from sys.indexes

where sys.indexes.type = 1

)

|||

Hi, Daniel, thanks a lot.

With best regards,

|||

Take a look at

http://msdn2.microsoft.com/en-us/library/ms345522.aspx#_FAQ1

It answers exactly the question you have asked

|||

Hi, Asvin, thanks a lot for the link. It's very helpful.

With best regards,

Yours sincerely,

How can we check the language by which functions, stored-procedures, and triggers are written in

Hi, all here,

Could please any experts here give me any guidance in what way can we check in what language (T-SQL or CLR language?) the user defined database engine objects :functions, stored-procedures and triggers are written?

Thanks a lot in advance for any guidance and advices for that.

With best regards,

Yours sincerely,

Sys.objects provides that information

Have a look at this page in BOL ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/f8d6163a-2474-410c-a794-997639f31b3b.htm

|||

Hi, Simon,

Thanks a lot.

With best regards,

Yours sincerely

How can we check the language by which functions, stored-procedures, and triggers are writte

Hi, all here,

Could please any experts here give me any guidance in what way can we check in what language (T-SQL or CLR language?) the user defined database engine objects :functions, stored-procedures and triggers are written?

Thanks a lot in advance for any guidance and advices for that.

With best regards,

Yours sincerely,

Sys.objects provides that information

Have a look at this page in BOL ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/f8d6163a-2474-410c-a794-997639f31b3b.htm

|||

Hi, Simon,

Thanks a lot.

With best regards,

Yours sincerely