3

I am facing issue that SQL Server Management Studio terminates silently apparently when text in message panel is too big e.g. a few million rows.

Is there a solution for this?

And also can we clear this message panel while stored procedure is executing? I am using print statement to see the status of execution. FYI I have data of 3+ million rows to process.

4
  • 1
    Why don't you use sqlcmd to run the sp and store the output in a file? That is easier to handle afterwards and prevents management studio from running out of scarce resources. Commented Oct 22, 2012 at 7:03
  • Actually I have many queries, only some of them are SP and others are larger query batches with variables, and in Studio if I choose file mode then it saves in file as well as shows in the panel. FYI In my org we have to go through very long documentation and approval process to update (to covert all to SPs). I wanted to know if there is a shorter solution for now. Commented Oct 22, 2012 at 10:19
  • 1
    why on earth are you processing 3 million records one at a time? Commented Oct 22, 2012 at 19:52
  • I already thought of bulk processing but as I have to re-calculate ledger etc of 3+ million clients and since I have to use some formula for each transaction, I have to do what I am doing. And I don't have much time to do so, that means it should complete without any stopping. Commented Oct 25, 2012 at 7:39

1 Answer 1

2

Client tool was crashing when it exceeded memory usage while showing row counts. I simply used

"SET NOCOUNT ON"

"SET NOCOUNT OFF"

I found solution at following post:

How to stop SQLServer writing extraneous stuff eg (1 rows affected)

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.