Object text too long error?????

  • I'm working in a SQL Server 6.5 database. I wrote a SP that got a little long (2700 lines) It debugged fine and works like a charm, but when I tried to do a "Create Procedure" I got this error. I don't really want to hack this into 5 SP (my boss will kill me). Is there anything I can do????

    Object text is too long - can only support 255 rows in Syscomments.

    Edited by - jw48 on 06/28/2003 09:47:59 AM


    JW

  • You've hit the SQL 6.5 hard limit of 64k bytes in a stored procedure. (this limit became about 250mb with the introduction of SQL 7.0). This is 255 bytes of SP text * 255 rows in syscomments.

    Your only real options are to streamline your SP, or break it down into functional (and reusable?) components.

    Your boss won't be happy I'm afraid.

    Another option is break down the SP into numbered procedures with the same name:

    CREATE PROCEDURE MyProc;1

    .

    .

    GO

    CREATE PROCEDURE MyProc;2

    .

    .

    GO

    etc etc


    Cheers,
    - Mark

  • Suppose you can remove layout spaces, carriage returns, etc. from the code and get it to recompile.

    Rather go for McCork suggestion of functional breakouts(sub procs).

  • Thank you very much mccork & 540... (whatever!!:-))

    I can put all the "CREATE PROCEDURE's" in the same script??

    JW


    JW

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

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