SQL Server Central is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

List DB tables and their maximum row size (bytes)

By Dfalir, 2005/09/02

Total article views: 87 | Views in the last 30 days: 4

Many users during the process of insert or update get the following warning issued by SQL Server

Warning: The table 'TABLE NAME' has been created but its maximum row size (XXXX) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

This is happening because the row-length in bytes, exceeds the maximum length SQL server allows. The script, does not prevent this from happening. Instead, it lists to the user all of its database tables, along with their length in Bytes. All Tables that are above 8060 should have their column datatype lengths changed to prevent any loss of Data during Insert or Update of Data.


By Dfalir, 2005/09/02

Total article views: 87 | Views in the last 30 days: 4
Your response
 
 
Related tags

Miscellaneous    
 
Already registered?  

Free registration required

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Register

E-mail address:
Password:
Password (confirm):

  

Subscriptions

We ask you to register on the site and subscribe to our newsletters. Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

We ask that you give the newsletter a try for a week. Over 200,000 SQL Server Professionals a day find it entertaining and useful. If not, you are welcome to unsubscribe at anytime.

Steve Jones
Editor, SQLServerCentral.com