This exceeds the maximum allowable table row size, 8060

  • Hi all,

    I do have script that is currently running perfectly in our Prod server. I copied it to our Development server for enhancement. but as the script progress, it gives below error

    Creation of table 'tmp_Station_P3' failed because the row size would be 8104, including internal overhead. This exceeds the maximum allowable table row size, 8060.

    The logic of this script is that:

    There is a temporary table tmp_Output_Table. Using Left Join, it appends several fields each pass on the loop.

    Is 8060 kb limit dependent on specs of your server (i.e. memory, disk space available)?

    Regards,

    Renan

  • the maximum size of a row of a table is 8060 bytes. Its not dependent on server specs.

    "Keep Trying"

  • It's an internal thing because of the size of each page of SQL Server's data files is 8K, with a few bytes used for the page header information. The people who wrote SQL Server decided to not allow "chaining" a record across multiple pages like Oracle does, but even Oracle people will tell you to try to avoid this condition as it can slow down physical reads and writes.

    If you do need a row larger than 8060 bytes, you can use VARCHAR(MAX) with the "large value types out of row" option turned on, so just a pointer is stored in the actual row. See sp_tableoption in books online for ensuring that option is on.

    D'oh, I just realized that the question was posted in SQL Server 2000 forum and VARCHAR(MAX) is new in 2005. Sorry, you'd have to use TEXT datatype in 2000, which does have some limitations in what string functions work on it.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply