Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favourite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved 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: 366 | 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

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones