473,473 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sql Trigger For Timeout

9 New Member
How do i call an sql trigger when an insert has not happened in a table for a time. I want to call a trigger when the timeout had happened.

If such a trigger is not possible is there any other way to implement something close this ? somebody please give me a solution
Jul 19 '07 #1
13 5643
hariharanmca
1,977 Top Contributor
How do i call an sql trigger when an insert has not happened in a table for a time. I want to call a trigger when the timeout had happened.

If such a trigger is not possible is there any other way to implement something close this ? somebody please give me a solution

is your project is web based Application?
Jul 19 '07 #2
baju123
9 New Member
is your project is web based Application?
No. It is not a web based applicaation. so a NO INSERT Trigger is not possible ?
Jul 19 '07 #3
NeoPa
32,556 Recognized Expert Moderator MVP
Which version of SQL Server - 2000 or 2005?
Just so I know where to look.
Jul 19 '07 #4
NeoPa
32,556 Recognized Expert Moderator MVP
Try this MSDN link.
Jul 19 '07 #5
hariharanmca
1,977 Top Contributor
No. It is not a web based applicaation. so a NO INSERT Trigger is not possible ?
It is possible. you said timeout, So not mensioned. is it Server timeout are Application Timeout..etc.
I think NeoPa gave some refrence pages.
that will help you.
Jul 20 '07 #6
baju123
9 New Member
It is possible. you said timeout, So not mensioned. is it Server timeout are Application Timeout..etc.
I think NeoPa gave some refrence pages.
that will help you.
hi Neo and hari .thanks for your replies.

I am using sql 2005. I searched in the link you gave me. i couldn't find a trigger that is needed.

here is the scenario,


I want to call an sql trigger on a NO INSERT condition on a table for a given time(i want a trigger to be executed when no rows has been inserted in a table for 2 seconds). It is just opposite to TRIGGER ON INSERT. I need one which should be TRIGGER ON NO INSERT for a give timeout interval.

The timeout is what i define. it is not the server timeout.

Now i have one more idea. How will i execute a sql code in a procedure every 2 seconds(time may even be in milliseconds). Can i loop a code every 2 seconds. Can you help me on this ?

Thank you once again for taking time to reply.
Jul 20 '07 #7
hariharanmca
1,977 Top Contributor
Now i have one more idea. How will i execute a sql code in a procedure every 2 seconds(time may even be in milliseconds). Can i loop a code every 2 seconds. Can you help me on this ?

Thank you once again for taking time to reply.
No, what is your idea is wrong. (can you just think how many two seconds are there in a Day, Month, Year. Then what will be the row count?)


can you explain, why you are going to do that?
Jul 20 '07 #8
baju123
9 New Member
No, what is your idea is wrong. (can you just think how many two seconds are there in a Day, Month, Year. Then what will be the row count?)


can you explain, why you are going to do that?
It is like i want to loop based on time as the critieria. instead of saying i = 500

while(i > 0)
i--;

i will say

while(time has elapsed)
{
// this will be executed every time the timeout has elapsed.
execute code;
}

can i do this loop in sql

what are all the time related operations available ?
Jul 20 '07 #9
hariharanmca
1,977 Top Contributor
It is like i want to loop based on time as the critieria. instead of saying i = 500

while(i > 0)
i--;

i will say

while(time has elapsed)
{
// this will be executed every time the timeout has elapsed.
execute code;
}

can i do this loop in sql

what are all the time related operations available ?
i think you are not in the correct way. I want to know your Requirement of this process. Then we can suggest better.
Jul 20 '07 #10
NeoPa
32,556 Recognized Expert Moderator MVP
hi Neo thanks for your reply.

I am using sql 2005. I searched in the link you gave me. i couldn't find a trigger that is needed.

here is the scenario,


I want to call an sql trigger on a NO INSERT condition on a table for a given time(i want a trigger to be executed when no rows has been inserted in a table for 2 seconds). It is just opposite to TRIGGER ON INSERT. I need one which should be TRIGGER ON NO INSERT for a give timeout interval.

Now i have one more idea. How will i execute a sql code in a procedure every 2 seconds(time may even be in milliseconds). Can i loop a code every 2 seconds. Can you help me on this ?

Thank you once again for taking time to reply.
Baju PMed me with this information which I've copied into the thread where it belongs.
Jul 20 '07 #11
NeoPa
32,556 Recognized Expert Moderator MVP
I can't be much more help I'm afraid. I don't get much into SQL Server nowadays. What I can say though :
  • There is an INSERT trigger. You can use this to reset any timer or delay process you implement.
  • I would strongly advise against using looping code to handle delays (especially, but not restricted to) in server software. This could have a very serious impact on the performance of the PC as a whole.
  • I'm afraid I really know very little about what methods or procedures are available to schedule or manage delays / timeouts etc in SQL Server.
Jul 20 '07 #12
baju123
9 New Member
I can't be much more help I'm afraid. I don't get much into SQL Server nowadays. What I can say though :
  • There is an INSERT trigger. You can use this to reset any timer or delay process you implement.
  • I would strongly advise against using looping code to handle delays (especially, but not restricted to) in server software. This could have a very serious impact on the performance of the PC as a whole.
  • I'm afraid I really know very little about what methods or procedures are available to schedule or manage delays / timeouts etc in SQL Server.
Thanks Neo for the information
Jul 23 '07 #13
NeoPa
32,556 Recognized Expert Moderator MVP
No problem. I'm pleased if it was any help to you :)
Jul 23 '07 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: E Sullivan | last post by:
I am having a time out issue when multiple users are accessing the server. This time out does not happen all of the time. My understanding is that the time out value is actually set in two places....
6
by: Rolf Kemper | last post by:
Dear All, we are running SQL2000 Sever and make use of the xp_sendmail. For any reason the mail service can run into problems and it looks like that the statemnt below gets not finished. ...
0
by: JohnO | last post by:
Thanks to Serge and MarkB for recent tips and suggestions. Ive rolled together a few stored procedures to assist with creating audit triggers automagically. Hope someone finds this as useful as...
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
5
by: Prabu Subroto | last post by:
Dear my friends... I am using SuSE Linux 9.1 and postgres. I am a beginner in postgres, usually I use MySQL. I have 3 tables : appointment, appointment0 and appointment1. the fields of...
15
by: Cleverbum | last post by:
I'm hoping to execute some code "when the page has completely finished loading" by which I mean the page and all the images on it, does anyone know of a way to do this?
22
by: Nick Craig-Wood | last post by:
Did anyone write a contextmanager implementing a timeout for python2.5? I'd love to be able to write something like with timeout(5.0) as exceeded: some_long_running_stuff() if exceeded:...
9
by: Ots | last post by:
I'm using SQL 2000, which is integrated with a VB.NET 2003 app. I have an Audit trigger that logs changes to tables. I want to apply this trigger to many different tables. It's the same trigger,...
11
by: tracy | last post by:
Hi, I really need help. I run this script and error message appeal as below: drop trigger log_errors_trig; drop trigger log_errors_trig ERROR at line 1: ORA04080: trigger 'LOG_ERRORS-TRIG'...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...
0
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...
1
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
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.