Best Practices - Stored Procedure Logging

后端 未结 4 1746
后悔当初
后悔当初 2021-02-07 02:25

If you have a long running SP, do you log somehow its actions or just wait for this message?

\"Command(s) completed successfully.\"

4条回答
  •  无人共我
    2021-02-07 03:09

    We generally use logging tables and take care around transactions. We pretty much avoid anything that involves going outside of SQL Server (e.g. writing to filesystem, calling external services, .NET assemblies, etc.)

    We also try to avoid cursors -- is it possible your proc is long running because it's inefficient?

提交回复
热议问题