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
plss anybody specify tha constrian management system in dbms
How do you use a subquery to find records that exist in one table and do not exist in another?
Describe the functionalities that views support.
How do indexes help, types?
Explain trigger and trigger types?
Can you type more than one query in the query editor screen at the same time?
What is the difference between DataRow.Delete() and DataRow.Remove()?
Explain logical operators in sql server?
What is schemabinding a view?
explain how to create a new schema in a database? : Sql server database administration
What is the rdl file?
What are partitioned views?
Why we need sql server?
What is master database? : SQL Server Architecture
How to update values in a table with update statements in ms sql server?