which query u can write to sql server doesn't work
inbetween 7.00PM to nextday 9.00AM
Answer Posted / sarvesh
CREATE PROCEDURE usp_StartStop_services
AS
Begin
Declare @date as varchar(100)
SET @date = convert(varchar, getdate(), 114)
Print @date
if @date >= '19:00:00.000'
exec MASTER.DBO.xp_cmdshell 'NET Stop SQLSERVER'
Else if
@date >= '09:00:00.00' and @date < '19:00:00.000'
exec MASTER.DBO.xp_cmdshell 'NET START SQLSERVER'
END
GO
| Is This Answer Correct ? | 19 Yes | 0 No |
Post New Answer View All Answers
What is deploy, process and build? : sql server analysis services, ssas
Do you know query execution plan?
What do you need to connect php to sql server?
Can a unique index be created on a column, which contains null?
What is the difference between Triggers and Stored Procedure?
Write a program using SQL queries to find a unique entry in a table.
What is the difference between stored procedure and user defined functions?
What do you understand by coalesce in sql server?
What is the cpu pressure?
How to access the inserted record of an event?
Mention the differences between having and where clause.
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
What new data source types were added in ssrs 2014?
What is database replication?
Suppose you want to implement the one-to-one relationships while designing tables. How would you do it?