Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SP character limit

Author  Topic 

mdhingra01
Posting Yak Master

179 Posts

Posted - 2006-06-02 : 14:58:10
Did anyone know that there is a character limit allowed in a stored proc (4096). Anyone know a way around it other than multiple sp.

Thanks

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-06-02 : 15:16:55
There is a character limit, but it is more like 250 MB.


From SQL Server Books Online:
"Bytes in source text of a stored procedure: Lesser of batch size or 250 MB

Length of a string containing SQL statements (batch size): 65,536 * Network packet size"


CODO ERGO SUM
Go to Top of Page

mdhingra01
Posting Yak Master

179 Posts

Posted - 2006-06-02 : 15:57:34
SQL Server wouldn't let me save my sp until I split it into 2 sp. It was telling me max allowable is 4096 characters and I currenly have 5537 characters.

I made 3 sp, 2 witht he code aand 1 to call the 2 sp.
Go to Top of Page

nosepicker
Constraint Violating Yak Guru

366 Posts

Posted - 2006-06-02 : 20:22:49
Are you creating the sp in Enterprise Manager? You won't have that limit if you create the sp in Query Analyzer.
Go to Top of Page
   

- Advertisement -