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
Explain the difference between control flow and data flow?
What is transact-sql ddl trigger?
What is the difference between inner join and equi join?
What do you mean by table and field in sql?
What is dbcc?
Difference between connected and disconnected database in .net with sql server?
Can you change the data type of a column in a table after the table has been created? If so, which command would you use?
Explain something about security and SQL Azure?
What are pages and extents? : SQL Server Architecture
Explain what is the use of custom fields in report?
How many instances per computer are there in sql server 2000?
How to get a list all databases on the sql server?
How do database indexes work?
How can I add Reporting Services reports to my application?
Tell me about normalization in DBMS.