473,671 Members | 2,163 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 1810
Indrek Mägi (mk**@hotmail.c om) 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****@sommarsk og.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.c om> 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
3204
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 connection from the MS SQL 2000 to the MS Access DB but not sure. Secondly how do I refer to the table in the MS SQL stored proc? Thanks for your input, Joe Seamour
1
11113
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 input parameters to the stored proc. DTS package is no problem. Pretty easy with the DTS wizard. My problem is that I can't figure out how to instansiate the DTS package object from a stored proc and pass the three values as parameters to the DTS...
0
1278
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 following errors : Infinite loops on cursors (can't fetch the next record. Gets stuck on one record) AND
2
1750
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. ~ Duane Phillips.
2
1686
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 a query during execution? If yes, how does one go about it. The PHP Console is used by multiple users simultaneously. The queries are executed on a Remote Database.
15
14047
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 Done in C#.... Thanks and Regards, S.Madhanmohan
5
3239
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 should i do to correct this? thanx
8
9557
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 : _____ System.Data.SqlClient.SqlException: EXECUTE permission denied on object 'CreateAccount', database 'wizou', schema 'dbo'. at
7
3020
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 proper tier to put it since is a data function But then I've heard that writing SQL in my client .NET code might run just as fast? Dynamic SQL or something? And then there's LINQ on the horizon. Is it a successor to everything
0
8474
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8392
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8819
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8669
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4403
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2049
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.