Suspend SQL server script?

I am trying to develop a script that I can run based on SQL Server 2008 [Express]. The database contains about 10-15 tables, which are updated with different values ​​/ new fields, etc.

However, this is not a fully automated process and at update points, it would be great to suspend script execution, put the mailbox out of the script, which allows the user to do it <something>. Clicking OK on the script will continue execution and complete the migration.

Is there such a thing?

+3
source share
3 answers

T-SQL script . WAITFOR , .

A () , script -chunks BATCH script. : -

SQLCMD -S <servername> -E -I <path_to_script_one>
PAUSE
SQLCMD -S <servername> -E -I <path_to_script_two>

, ; , . BATCH , script .

, , SQL.

"" , , ...

+2

WAITFOR. , T-SQL script

0

SQL Server .

SQL 2008 Management Studio script , , script .

script undefined , , script.

If you want this to be automated, you could then run them from a .cmd file using the DOS PAUSE command between scripts.

0
source

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


All Articles