Maintenance and Management

Technical Article

detect different datatypes

  • Script

-  a simple and handy script that finds what differences might exists between the fields in your database that have the same name.I was wondering why my execution plans where different  for tables with the same  field names and the same indexes,statistics etc... because the syetem was converting my fields in the WHERE statement. -  […]

You rated this post out of 5. Change rating

2003-06-08

104 reads

Technical Article

How to get ColumnNames, datatypes and length

  • Script

This is a followup to the script submitted by srallapalli. One can return a record set of all tables in a database using the following:USE MyDatabaseSELECT so.name AS TableName, sc.name AS ColumnName,  st.name AS ColumnDatatype,  convert(int, sc.length) AS ColumnLength FROM syscolumns sc, sysobjects so , systypes st WHERE so.type='U' AND OBJECTPROPERTY(so.id,'ismsshipped') = 0 AND sc.id=so.id […]

You rated this post out of 5. Change rating

2003-05-10

144 reads

Technical Article

truncate logs regularly

  • Script

It is a painful experience for all us administrators to truncate logs regularly. I just created a job to executesp_msforeachdb "use ?; backup log ? with truncate_only ; dbcc shrinkfile(2,5)"on all the servers at frequent intervals. It has saved me a lot of time. hope it helps you too.n.b: I assume that file id 2 […]

You rated this post out of 5. Change rating

2003-04-18

316 reads

Technical Article

Get the Foreign Key Hierarchy 2

  • Script

This procedure is just another approach for getting a list of tables defined in a database, ordered by dependency on other tables based on foreign key relationship.I used it for a deployment process, where the TABLE create scripts must be executed in the correct order,because the foreign key constraints are specified in the create script […]

4.5 (2)

You rated this post out of 5. Change rating

2003-04-18

372 reads

Blogs

My 2024 in Data: Music

By

This is my last week of the year working (I guess I come back...

A New Word: Suente

By

suente– n. the state of being so familiar with someone that you can be...

Side Projects

By

Anyone (everyone?) who has ever tried to learn a programming language knows that to...

Read the latest Blogs

Forums

Attaching an SQL Server database without Transaction Log Files through SQL Server Management Studio.

By Noman072

Comments posted to this topic are about the item Attaching an SQL Server database...

Superseded Indexes

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Superseded Indexes

Timeout Error while executing a TSQL statement in Sql server Express Edition

By IT researcher

I am getting the below error when I execute a SQL command in SQL...

Visit the forum

Question of the Day

Superseded Indexes

Which of these indexes is superseded by another?

See possible answers