Configure Windows 7 not to shutdown automatically?

How should I configure Windows 7 not to shutdown automatically? I found out that when you restart Windows 7 as the default setting, it would be a security risk which can be the reason for widespread loss of data and also defects. I do a back-up during the evening and copy a large database. However, my computer automatically shuts down since this is the default setting on my Win7.
What step-by-step procedure should I follow to prevent this from happening again?
