Was looking for a solution on how to fix a known SQL problem where @@SERVERNAME is NULL and came across this posting. Someone wanted to fix this problem without restarting the box and the reply was as follows:
It is much more complicated if you can’t stop and restart SQL server. The first part of this procedure is to follow the procedure from the article above, but don’t actually restart SQL. Then things start to get complicated.
You’ll have to improvise, but the general plan goes something like:
1) Get the SQL design team to help you determine where in RAM the buffer is that holds the value for @@servername on your machine.
2) Call in the team that designed the server hardware to determine where that buffer physically is on the chips in your machine.
3) Disassemble your server while it is running, being very careful not to unplug anything in the process.
4) Bring up a scanning electron microscope, and prepare it for use.
5) Issue an IO_Freeze call (the documentation is in the IO device driver developers guide, but I don’t know of a copy of that online).
6) Fire the electron microscope to change the contents of the buffer in RAM. This will require repeated firings for each bit you need to reset.
7) As soon as possible, issue an IO_Thaw call so that the server can resume writing to disk.
8) Reassemble the server hardware.
9) Pack everything up, and send everyone home.
I’ve never actually done this, but serveral of us discussed the concept one night at Tech-Ed. I’d estimate the cost somewhere around 750-800 million dollars, although that could be reduced significantly if you can get some of the technical expertise donated. I’d still strongly suggest that you consider restarting SQL Server instead of going to this amount of trouble.
Good stuff Pat !!