- Q What is wood made of? Does it have a chemical composition?
- Q How do counsellor monitor the progress of treatment?
- Q Why do you need primary in mvg?
- Q Which is the venue of 2018 Commonwealth Games in Australia?
- Q Explain mdi?
- Q What is ADT ? We do not need to know how a data type is implemented in order to be able to use it?
- Q Form an essay on taxonomic collections and identification.
- Q Define breakdown voltage.
- Q Bank teller job roles and responsibilities? Bank teller job duties?
- Q Thattekad Bird Sanctuary is located in
- Q Approximately how many chiefs signed that day?
Question
How do I start SQL Server Agent from ASP?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Answers
When you rely on jobs in SQL Server, it can be quite frustrating when SQL Server Agent has stopped and either it's
not set to auto-restart, or you are using an older version of SQL Server where this option didn't exist. So if you can't
connect to the database using Enterprise Manager or Query Analyzer, you can write up a quick ASP script that
connects to the database and starts the service (assuming the SQL Server service is started, and that the user has
appropriate permissions to execute such a command):
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.open ""
sql = "EXEC Master.DBO.XP_ServiceControl 'QUERYSTATE','SQLServerAgent'"
set rs = conn.execute(sql)
if trim(rs(0)) <> "Running." then
response.write "Starting SQL Server Agent..."
sql = "EXEC Master.DBO.XP_ServiceControl 'START', 'SQLServerAgent'"
conn.execute(sql)
else
response.write "SQL Server Agent already started..."
end if
conn.close
set conn = nothing
%>
Keep in mind that XP_ServiceControl is undocumented and unsupported; its behavior could change with a service
pack or the next release of SQL Server.
Your Comment
not set to auto-restart, or you are using an older version of SQL Server where this option didn't exist. So if you can't
connect to the database using Enterprise Manager or Query Analyzer, you can write up a quick ASP script that
connects to the database and starts the service (assuming the SQL Server service is started, and that the user has
appropriate permissions to execute such a command):
<%
set conn = Server.CreateObject("ADODB.Connection")
conn.open "
sql = "EXEC Master.DBO.XP_ServiceControl 'QUERYSTATE','SQLServerAgent'"
set rs = conn.execute(sql)
if trim(rs(0)) <> "Running." then
response.write "Starting SQL Server Agent..."
sql = "EXEC Master.DBO.XP_ServiceControl 'START', 'SQLServerAgent'"
conn.execute(sql)
else
response.write "SQL Server Agent already started..."
end if
conn.close
set conn = nothing
%>
Keep in mind that XP_ServiceControl is undocumented and unsupported; its behavior could change with a service
pack or the next release of SQL Server.
Your Comment
- 0
- 0
- New Answer
- Contributors: *,
More Software Questions..
What is the inputsplit in map reduce software?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is software configuration management?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What Is Java Api For Xml-based Rpc (jax-rpc)?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How can you implement fine-grained auditing?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is IBM’s simple explanation for Big Data’s four critical features?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is static synchronized method in JDBC API? Give an example?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What does the NULLIF function do?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What happens if a start method is not invoked and the run method is directly invoked?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Should we override finalize method
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
what is the difference between mysql_fetch_array and mysql_fetch_object?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How will XML affect my document links?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Why to use Style Sheets?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What are Filters in MVC?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Can you explain Application layer in OSI model?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How to define new testplan attributes?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Which oracle package is used to manage the oracle lock management services?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is marker interface?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What types of partitioning are there for BW?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,