When opening a 150MB SQL script file in Microsoft SQL Server Management Studio, the following error appears:-
Instead of opening the large SQL script file and execute it, we can execute it directly from command line.
sqlcmd -E -d[database_name] -i[sql_file_path]
-E uses trusted connection,
-d points to the database and
-i points to the SQL script file path.
sqlcmd -E -dshittydb -ic:\Users\shittyuser\shittydb.sql