Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This T-SQL script exceeds the maximum allowed size. Adjust this setting in the SQL Server Tools page by selecting Options from the Tools menu

I have a .sql scripts which is pretty huge. I added this script to a sql server project under visual studio 2013. When I try to build it I got this error message

This T-SQL script exceeds the maximum allowed size. Adjust this setting in the SQL Server Tools page by selecting Options from the Tools menu

According to this msdn article there is a property called Maximum script size it can be accessed in visual studio tools:

Tools->Options->Text Editor->SQL Server Tools->IntelliSense->Maximum script size

I changed it from 1MB to unlimited but nothing had changed

like image 434
Ibrahim Amer Avatar asked Jun 01 '15 10:06

Ibrahim Amer


2 Answers

Change the setting under SQL Server Tools -> General

enter image description here

like image 67
Martin Smith Avatar answered Oct 07 '22 00:10

Martin Smith


In addition to the other answers/comments I'd like to point out that ReSharper also played a role in this game.

I configured VS like so:

Tools / Options / SQL Server Tools / General / Database model size: 20 megabytes -> 200 megabytes
Tools / Options / Text Editor / SQL Server Tools / IntelliSense / Maximum script size: Unlimited

Still getting the error (which is not a build error btw., but an IntelliSense error, MSBuild works fine).

A colleague applied the same configuration and it worked for him. The reason was that he did not have ReSharper installed. After disabling ReSharper (2018.3.4 Build 183.0.20190304.43214) it worked for me as well.

We realized that there was a new version of ReSharper available (2019.1.1) and this one seems to have fixed the issue as well.

Just for reference: There is a Developer Community entry available with nearly the same content.

like image 31
timmkrause Avatar answered Oct 07 '22 00:10

timmkrause