Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

spFindTableInfo

By TJay Belt,

spFindTableInfo is a great proc for finding info about your database.  It will accept parameters like tablename, fieldname, size, datatype.  So you can run it with no params, and it'll report every table, every field in those tables, and the size, datatype and whether its nullable or not.  You can filter it by Table name and get all fields of that table.  You can search for particular fields in a table, or data types in a field, or table.... well you get the idea. 
  I used this to familiarize myself with our data structure.  A developer would ask about a field, and we'd guess the name and search for it, until we found the appropriate one.  Its just a great tool.  I suggest running it in master and naming it sp_FindTableInfo so that it can be accessed in each and every db you work with.
  it will work on sql server 2000, not sure about 7 or below.

Total article views: 367 | Views in the last 30 days: 2
 
Related Articles
FORUM

Quetion about Page field in Index Properties?

Quetion about Page field in Index Properties?

ARTICLE

Leveling the Field

Today Steve Jones talks about the ability of cloud services to level the field when it comes to soft...

BLOG

5 Tools Every DBA Should Know About

After monitoring enterprise SQL Server instances for over 10 years now, there are 5 tools that are...

FORUM

Incrementing a field

Incrementing a field

 
Contribute