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
Can you explain different types of joins?
Is BCNF better than 2NF & 3NF? Why?
What are commonly used odbc functions in php?
Which are the important points to note when multilanguage data is stored in a table?
What do you understand by intent locks?
What is the current pricing model of SQL Azure?
What is entity data services?
What are the joins in sql server? : sql server database administration
What is the openxml statement in sql server?
Can you explain what is the use of custom fields in report?
What are different types of schemas?
What are the hotfixes and patches in sql server?
how many no of arguments can be passed in procedures and functions
Explain what is cte (common table expression)?
What does it mean to invest in the index?