How do I set a SQL Server script's timeout from within the script?

前端 未结 3 707
天涯浪人
天涯浪人 2020-12-17 20:15

I have a large script file (nearly 300MB, and feasibly bigger in the future) that I am trying to run. It has been suggested in the comments of Gulzar\'s answer to my questi

3条回答
  •  时光说笑
    2020-12-17 20:35

    sqlcmd -t {n}
    

    Where {n} must be a number between 0 and 65535.

    Note that your question is a bit misleading since the server has no concept of a timeout and therefore you cannot set the timeout within your script.

    In your context the timeout is enforced by sqlcmd

提交回复
热议问题