What is exactly a system restart? I understand that there are two system restarts: Either scheduled or unscheduled..I want to specifically know What will happen to a logged on session and scheduled system restart process at the same time? Or do I have to have all sessions out before beginning a system restart?
No, when the system restarts, existing sessions are recovered automatically. Any open transactions on those sessions are rolled back. The next request on each session will get a "retryable" error response, indicating that a previous request may have rolled back.
The "-x" option of tpareset is used to shut down the database. To restart the system, execute tpareset without that option.