I know. It's a stupid question, or at least a dangerous one, but my supervisors are having to restart DP jobs every time I run a LOG truncation job that reduces the size of our LDF file from what was 300GIG down to 5GIG.
This is because the "truncation job" detaches the database, changes it to SIMPLE mode, does its thing and then changes it back to FULL mode.
To save them having to remember or be reminded that my log truncation job has completed, they've asked me if I can force the entire windows server, not just the SQL Server and Agent, but the entire server to be rebooted.
Is that possible from within an T-SQL job?
Please don't get me started on why, I just need to know how.
Thanks
UPDATE
Here is the transaction job I am using, once a month to keep the log file small.
USE finprod
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE finprod
SET RECOVERY SIMPLE WITH NO_WAIT;
GO
-- Shrink the truncated log file to 5 gig
DBCC SHRINKFILE(finprod_log, 5024); --file_name is the logical name of the file to be shrink
GO
-- Reset the database recovery model.
ALTER DATABASE finprod
SET RECOVERY FULL WITH NO_WAIT;
GO
-- now run a full backup, otherwise the next TxnLog backup will fail
EXEC msdb.dbo.sp_start_job N'FINPROD - Backups.Full Backup';