Suppress Warning Messages

  • The script below generates the following warning message:

    Warning: The table '#Temp' has been created but its maximum row size (10025) 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.

    How do I suppress this message?  NoCount and ANSI_Warings won't do it.

    Thanks for any help!

     

    script:

    SET NOCOUNT OFF

    SET ANSI_WARNINGS  OFF

    CREATE TABLE #Temp(Col1 varchar(5000), Col2 varchar(5000))

    DROP TABLE #Temp

  • I have tried all these options but it is not consistent.

    1. SQL Query Analyster - >Tools -> Connection Properties -> Unchecked the SET ANSI_WARNING

    Right click on the tempdb and refresh

    Execute the script. Initially for 4 to 5 times it gives the warning and it doesn't give.

    2. Tried setting this option to the database it gives another error

    USE master       

    EXEC sp_dboption 'pubs', 'ANSI warnings', 'FALSE'

    ALTER DATABASE statement not allowed within multi-statement transaction.

    sp_dboption command failed.

    Any thought by SQL gurus.

    Thanks,

    Ganesh

     

     

     

     

     

     

     

  • I have the same problem. I think the problem is associated with the ANSI WARNINGS dboption in the tempdb database rather than the pubs db. However, the sp_dboption BOL says "

    "sp_dboption

    should not be used on either the master or tempdb databases"

    which I duly ignored and discovered that it made not a lick of difference.

     

  • You cannot supress that warning. How about not creating the temp table with such a large row size? Use TEXT/NTEXT/IMAGE columns if necessary...

    --
    Adam Machanic
    whoisactive

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

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