Suppress exceeds maximum number of bytes per row warning

  • Receiving a warning which I'd like to suppress:
     
    Warning:
    The table 'XXX' has been created but its maximum row size (17935) 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.
     
    Any idea's as to how I can suppress this warning?
    BT
  • You can't, as it's a necessary warning. However, is there a good design reason as to why the table exceeds the maximum row size?

    K. Brian Kelley
    @kbriankelley

  • Hi,

    You divide that table into two tables and establish one-one relationship between those

    two tables...

    ..hema

  • Not necessarily... for instance, perhaps one or two of the columns are better off as text or ntext columns. Hence the reason to ask about the design.

    K. Brian Kelley
    @kbriankelley

  • I found myself in the same boat.

    I used a command like this:

    SET @CALL = 'osql -S DATABASE -U USERNAME -P PASSWORD -Q "USE MyDataBase; ALTER TABLE My_Table ADD FLAG CHAR(1) NULL;"'

      EXEC('master.dbo.xp_cmdshell ''' + @CALL + '''')

    ...in a stored procedure and called the procedure from my webpage. The server kicks off an osql command and it runs just like it would in Query Analyzer.

    The warning message is returned to the osql session but the command is still executed.

     

    Cheers

Viewing 5 posts - 1 through 4 (of 4 total)

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