473,511 Members | 15,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

execute proc on stopping mssql server

How execute extended proc on stopping ms sql server (it mean before
stoping).
Is it possible to handle this?
Or is in system proc a'la sp_on_stop?

Thx
Jul 23 '05 #1
2 1798
Indrek Mägi (mk**@hotmail.com) writes:
How execute extended proc on stopping ms sql server (it mean before
stoping).
Is it possible to handle this?
Or is in system proc a'la sp_on_stop?


KILL on the spid in question is the only way I can think of. Short of
rebooting the server.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
Try this,
--Email when database is started

CREATE procedure email

as

exec sp_sendSMTPmail 't***@test.com.au', 'Database Rebooted',
@cc='', @BCC = '',
@Importance=1,
@Attachments='', @HTMLFormat = 0,@From =
't***@test.com.au'

GO
exec sp_procoption N'email', N'startup', N'true'
GO
Thanks,
"Indrek Mägi" <mk**@hotmail.com> wrote in message
news:42********@news.estpak.ee...
How execute extended proc on stopping ms sql server (it mean before
stoping).
Is it possible to handle this?
Or is in system proc a'la sp_on_stop?

Thx

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3194
by: Joe Seamour | last post by:
I would like to access a table in MS Access from a stored procedure on MS SQL 2000. The MS Access DB is running on a diferent computer attached on the same network. I think I need to create an ODBC...
1
11106
by: Cox News Server | last post by:
I'm a rookie with MSSQL. I need to run a DTS package to export a result set to an MX Excel spread sheet. I need to call the DTS from a stored procedure and pass it three values, depending on the...
0
1268
by: Rick | last post by:
I wrote a medium length stored proc that uses both temp tables and one cursor. I compiled and it ran fine. However, we reboot our machine every weekend, and on Mondays the stored proc gets the...
2
1744
by: Duane Phillips | last post by:
How do you execute a stored procedure in MS SQL Server? I can design and execute them from MS Access dev front end, but cannot seem to find how to run them in the Enterprise Manager. TIA. ~...
2
1678
by: Ranjith | last post by:
We have a console.php which takes in SQL queries and displays them in a result.php webpage. Sometimes the query takes minutes to execute or crashes the PHP application. Is it possible to cancel...
15
14035
by: Madhanmohan S | last post by:
Hi All, I want to run a command line appplication from C#. When i start the application, it will go into specific mode. After that, i have to give commands to use the application. How Can This Be...
5
3234
by: Ivan Simurina | last post by:
I m getting the following error once i initiate a page that connects with database. SqlException: EXECUTE permission denied on object 'sp_items_for_sale', database 'bids', owner 'dbo'.] what...
8
9542
by: Jiggaz | last post by:
Hi, In my ASPX Page, i have a form for signup. And whene user click on the button, the event Button1_Click must use a stored procedure. But instead of use stored proc, i get this exception :...
7
3013
by: Ronald S. Cook | last post by:
I've always been taught that stored procedures are better than writing SQL in client code for a number of reasons: - runs faster as is compiled and lives on the database server - is the more...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.