Are there any programs that reduce sql script file size?

I have an SQL script that is extremely large (about 700 megabytes). I am wondering if there is a good way to reduce the size of the script?

I know there are code minimizers for JavaScript, and I'm looking for one for use with SQL scripts.

I do not want to get performance on SQL script. I am trying to make the file size smaller. Removing extra spaces. Keeping the naming down so that the sizes of the script files can be smaller.

If I try to upload a file in SQL Server Management Studio, I get this error.

Not enough storage space, run this command. (Exception from HRESULT: 0x80070008) (mscorlib)

+3
source share
7

script 700 ?! , /, .

:

  • , Insert,
  • , , (, "" col = 1, id (..) ).
  • ( script), script proc

, script . ( ?) .

+3

script script?

, .

:

REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
REM Define widely-used variables up here so they can be changed in one place
REM Search for "sqlcmd.exe" and make sure this path is valid for you
REM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
set sqlcmd="C:\Program Files\Microsoft SQL Server\100\Tools\Binn\sqlcmd.exe"
set uname="your_uname_here"
set pwd="your_pwd_here"
set database="your_db_name_here"
set server="your_server_name_here"

%sqlcmd% -S %server% -d %database% -U %uname% -P %pwd% -i "c:\script1.sql"
%sqlcmd% -S %server% -d %database% -U %uname% -P %pwd% -i "c:\script2.sql"
%sqlcmd% -S %server% -d %database% -U %uname% -P %pwd% -i "c:\script3.sql"

pause

, , Windows.

, .BAT , .BAT.

+3
+1

SQL , , . , , .

, .

+1

( , , "SQL script size" )

script Management Studio. SQL2008 R2 SQL 2008 SQL Server script, 700mb .sql.

, script:

C: > sqlcmd -S [SQLSERVER\INSTANCE] -i [FILELOCATION\FILENAME].sql

, - .

+1

sql .

txt sql / .. ...

- "" . , .

. ? ?

0

pg-minify , PostgreSQL, , MS, MySql ..

0

Source: https://habr.com/ru/post/1720561/


All Articles