| Sybase ASE |
| 11.0 |
11.5 |
11.9 |
12.0 |
12.5 |
15.0 |
| Last updated: 15 January 2003 |
|
|
ASE restarts itself
|
| |
|
This is a demo of how you can use
XP server features in ASE. XP server was added to ASE 11.5. makes it possible to execute OS commands from SQL (don't confuse XP server with a certain Microsoft Windows product of the same name).
Below, you can download the stored procedure
sp_restart_server. When executing this procedure (or its alias, sp_reboot), it
first shuts the ASE server down, and then immediately
restarts it automatically. This works as follows:
- First, XP server creates an OS file
containing OS statements to perform shutdown
and a restart.
- Next, XP server executes this
file, resulting in a server shutdown and immediate restart.
This procedure works both on NT/Win2000 and on Unix, although the implementation details are quite different.
For more information, see the header of the downloaded SQL script.
Download the SQL code here
.
(Note: if you're running
ASE on AIX, you'll need at least ASE version 11.9.2, because XP
server doesn't work in earlier version on AIX)
|
|