Propagation Of Event Notification When Tables Are Updated.
Jul 23, 2005
I would like to propagate an event signal to an external application
when a table in my MSSql2000 server is updated.
Prog A; I have an external application adding records to a table.
Prog B; I have another external application using this table as well.
When Prog A creates a new record in the Table, how can I have Prog B be
notified of the event without polling the table or creating a link
between Prog A and Prog B.
Thanks.
View 2 Replies
ADVERTISEMENT
Aug 10, 2004
Does anyone know if there is any software available that notifies specified people when an error above a certian level occurs. Im thinking along the lines of email and text message.
Im running sql server 2k at sp3a level, and the software will have to be compatible with it so as to get the event notification to pass the information on.
If there isn't any software, would anyone know of any scripts that will do this?
View 4 Replies
View Related
Aug 10, 2004
I am trying to set up the email notification system in SQL server 2000, but im having some problems. Mainly, im having problems with setting up an email account in the first place (there is a dedicated mail box, but the one im working with is a different box altogether).
If anyone could help fathom this out from start to finish i would be really grateful.
View 1 Replies
View Related
May 21, 2006
Hi
I have a simple question regarding event notification in sql 2005. I keep up getting a message indicating a syntax error when trying to execute the following script. I also tried with [ instead of '.
CREATE EVENT NOTIFICATION NotifyCT
ON DATABASE
FOR CREATE_TABLE
TO SERVICE 'NotifyService'
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'NotifyService'.
I cannot find any error in my syntax. Please help
Thanks
View 1 Replies
View Related
Jan 30, 2006
Hello Remus,
I have implemented Event Notification sample you provided in my logic, but I am perplexed that even though my watched queue does go down, I do not get message in the Event_Collector queue all the time. The Event_Collector queue does stay enabled though. Any thoughts? I guess any suggestions on debugging the event notification portion would be helpful.
Lubomir
View 4 Replies
View Related
Apr 13, 2007
If I call ExecuteNonQuery() in a timer event callback in a console application, it hangs. Why is that?
.B ekiM
class Program
{
static SqlConnection conn = new SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=NONEOFYOURBISUINESS;Data Source=localhost");
static void Main(string[] args)
{
NativeMethods.MEMORYSTATUSEX mem = new NativeMethods.MEMORYSTATUSEX();
NativeMethods.GlobalMemoryStatusEx(mem);
Console.WriteLine("{0} bytes", mem.ullAvailPhys);
System.Timers.Timer aTimer = new System.Timers.Timer();
// Set the Interval to 2 seconds (2000 milliseconds).
aTimer.Interval = 1000;
aTimer.Enabled = true;
// Hook up the Elapsed event for the timer.
aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
Console.ReadLine();
}
private static void OnTimedEvent(object source, ElapsedEventArgs e)
{
NativeMethods.MEMORYSTATUSEX mem = new NativeMethods.MEMORYSTATUSEX();
NativeMethods.GlobalMemoryStatusEx(mem);
SqlCommand cmd = new SqlCommand(
"INSERT INTO Observation (StatisticType, StatisticObserved, StatisticValue) VALUES (1, @When, @AvailPhys);" +
"INSERT INTO Observation (StatisticType, StatisticObserved, StatisticValue) VALUES (2, @When, @AvailPageFile);" +
"INSERT INTO Observation (StatisticType, StatisticObserved, StatisticValue) VALUES (3, @When, @AvailVirtual);" +
"INSERT INTO Observation (StatisticType, StatisticObserved, StatisticValue) VALUES (4, @When, @AvailExtendedVirtual);");
DateTime dt = DateTime.Now;
cmd.Parameters.AddWithValue("AvailPhys", mem.ullAvailPhys);
cmd.Parameters.AddWithValue("AvailPageFile", mem.ullAvailPageFile);
cmd.Parameters.AddWithValue("AvailVirtual", mem.ullAvailVirtual);
cmd.Parameters.AddWithValue("AvailExtendedVirtual", mem.ullAvailExtendedVirtual);
cmd.Parameters.AddWithValue("When", dt);
cmd.ExecuteNonQuery();
Console.WriteLine("Inserted {0}", dt);
}
}
View 3 Replies
View Related
Jun 19, 2007
Hello,
I have configured an Event Notification for BROKER_QUEUE_DISABLED.
I created a Queue different from the one the Receive my normal messages and on this queue I define an activation.
The Activated SP takes the [EventNotification] message and execute a
RAISEERROR('Message',0,1) WITH LOG.
The error is properly logged in the SQL server event log but I gave a look the Initiator and target sys.conversation_endpoints catalog view and I have see the the conversations are in the status CONVERSING or SI ...
Do I have to call the END CONVERSATION after the commit or these statuses are caused by some mistakes on the message process workflow?
Thank you
Marina B.
View 4 Replies
View Related
Feb 21, 2007
Hello,
Can anyone spot what i am missing here ? The problem is that i am getting a null object for e.TextData in the t_OnEvent(object sender, TraceEventArgs e) function below. I am trying to get event- notifications while processing the data mining structure.
thanks
anil
//-------------code below-------------------------------------
using Microsoft.AnalysisServices;
private void ProcessMiningStructure(MiningStructure mStruct)
{
Trace t;
TraceEvent e;
t = server.Traces.Add();
e = t.Events.Add(TraceEventClass.ProgressReportCurrent);
e.Columns.Add(TraceColumn.TextData);
t.OnEvent += new TraceEventHandler(t_OnEvent);
t.Update();
try
{
t.Start();
mStruct.Process(ProcessType.ProcessFull);
t.Stop();
}
catch (Exception ex)
{
}
t.Drop();
}
//------------------------------------------------------
void t_OnEvent(object sender, TraceEventArgs e)
{
SetText(e.TextData);
}
//------------------------------------------------------
View 4 Replies
View Related
Aug 20, 2007
Hi
I am unable to drop the above login. The error is Error:15141 The server principal owns an event notification and cannot be dropped.
I have looked in the table sys.server_event_notifications and there are rows returned that have a server_principal_id of the user I am trying to drop. No events have been created on this server, so I am assuming these notifications are either created by default or are somehow related to Database Mail?
All the event notifications belong to service name "SQL/Notifications/ProcessWMIEventProviderNotification/v1.0" and begin with SQLWEP (i.e. SQLWEP_RECHECK_SUBSCRIPTIONS, SQLWEP_B415ADB8_A604_4057_976F_600002FA5AF6). How can I find out what these are for and how they were created?
What purpose do these event notifications have? Is there some syntax to change the owner of these event notifications so I can successfully drop the login? If the only way is to directly update the system view, is this safe and what repercussions could this have?
Thanks
Martin
View 4 Replies
View Related
Apr 1, 2008
I had another thread discussing the intricacies of FailParentOnFailure, MaxErrorCount, and error event propagation. Check it out here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3093944&SiteID=1.
In doing further research I think I may have come across what seems to be a bug, but perhaps there is some reasoning behind it. Take the following package structure:
Package1 --> Task Execute Package2
Package2 --> TaskA
TaskA is a task that I have constructed intentionally to generate errors. When executing Package2 on its own separate from Package1, TaskA errors and the package completes with a result of Failure. This is what is expected.
Now, add an OnError Event Handler to TaskA, which does nothing, and set its Propagate variable to True (the default). Again executing Package2 on its own causes the package to complete with a result of Failure. Again, as expected.
Now, for the OnError Event Handler of TaskA, set the Propagate variable value to False. When executing Package2, we now get a result of Success. Again, this is as expected since TaskA does not have FailPackageOnFailure set to True.
One would think that if Package1 is now executed, since TaskA in Package2 is preventing the error from propagating up, that Package1 would report success, right? Wrong.... at least according to my tests. When Package1 executes, the "Task Execute Package2" lights up red and Package1 finishes with a result of Failure. In order to get around this, I have created an OnError Event Handler on "Task Execute Package2" which has its Propagate value set to False.
Does anyone know if this behavior is by design or by accident??... or is it user error?
View 1 Replies
View Related
May 3, 2006
We have a third party process that runs and updated several SQL tables.
Is there any way to find out what tables are being updated and store it in another table?
View 4 Replies
View Related
May 14, 2008
With the new features of SQL Server 2005 for error handling (TRY...CATCH blocks), how are you propagating errors back to the caller? For example, lets say we have 3 stored procedures:
dbo.usp_UpdateSomeTable1
dbo.usp_UpdateSomeTable2
dbo.usp_UpdateSomeTable3
Let say some application calls dbo.usp_UpdateSomeTable1, in turn dbo.usp_UpdateSomeTable1 calls dbo.usp_UpdateSomeTable2 and in turn dbo.usp_UpdateSomeTable2 calls dbo.usp_UpdateSomeTable3.
Now if dbo.usp_UpdateSomeTable3 generates an error, how do you handle propagating this back to the caller?
I envision encapsulating the contents of each procedure in a TRY...CATCH block like so:
BEGIN TRY
...do some stuff
END TRY
BEGIN CATCH
...handle errors - whether generated from our own RAISERROR statements or by the database engine.
END CATCH
Now my problem is I would like to capture all the error variables and toss them back to the caller and keep sending that information up the stack. So far my attempts have been pretty unreadable and end up being just a cluster of text.
View 1 Replies
View Related
Nov 29, 2005
I have a front end inteface that adds data to tables in a SQL database.My question is:Is there an easy way of finding out what tables are affected by the update? Is there a sp_ or DBCC command that would give me the update or altered tables?
View 2 Replies
View Related
Apr 9, 2007
Dear All,
I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2000 as a back End.
Actually I am fetching data from other database(named as retailexcel but in same server). I have wriiten a view (in retailexcel database) to get required data from four table of other database. My problem is when I fetch those data(about 40000 to 50000 record) It taking to much time. I tried catch feature of asp.net2.0. Time reduced but not significantly. So I am trying to import those tables to my database (named Inventory) from that retailexcel.
Now problem is every day or two, record of those tables changes. How can I keep update my tables (which are importing from retailexcel)
Please suggest me some idea.
Thanks
View 1 Replies
View Related
Jan 4, 2006
Hello, I need some guidance in the best method to accomplish this task. I have a network with a SBS 2003 server and a SQL 2000 member server in the SBS domain. I have a remotely hosted website at discountasp.net with a SQL 2000 database. The website will host a modified e-commerce kit where corporate clients can order parts. I need to keep the products table on the remotely hosted site as updated as possible. The website orders are placed via email from the commerce kit and the fulfillment department proccesses the order against the SQL server in the SBS domain.
Any ideas on how to keep the data updated on the website?
View 4 Replies
View Related
Nov 23, 2004
How do I insert unrelated statistical data from three tables into another
table that already exist with data using an insert or update stored procedure?
OR...
How do I write an insert/Update stored procedure that has multiple select
and a where something = something statements?
This is what I have so far and it do and insert and does work and I have no idea where to begin to do an update stored procedure like this....
CREATE PROCEDURE AddDrawStats
AS
INSERT Drawing (WinnersWon,TicketsPlayed,Players,RegisterPlayers)
SELECT
WinnersWon = (SELECT Count(*) FROM Winner W INNER JOIN DrawSetting DS ON W.DrawingID = DS.CurrentDrawing WHERE W.DrawingID = DS.CurrentDrawing),
TicketsPlayed = (SELECT Count(*) FROM Ticket T INNER JOIN Student S ON T.AccountID = S.AccountID WHERE T.Active = 1),
Players = (SELECT Count(*) FROM Ticket T INNER JOIN Student S ON T.AccountID = S.AccountID WHERE T.AccountID = S.AccountID ),
RegisterPlayers = (SELECT Count(*) FROM Student S WHERE S.AccountID = S.AccountID )
FROM DrawSetting DS INNER JOIN Drawing D ON DS.CurrentDrawing = D.DrawingID
WHERE D.DrawingID = DS.CurrentDrawing
GO
View 6 Replies
View Related
May 28, 2007
Hi,
I am trying to create a data dictionary for a huge application which has aroung 300 tables in the database....when i perform any operation in the application some tables are updated.... can you help me to find out how can we find out the last updated tables in the database ??
View 1 Replies
View Related
Jun 14, 2006
Hi
I have a requirement like, i need to save all the records from my Flat File on Monthly basis to my database table. In the next month, the flat file may be added with 10-20 records and also some updates happened to my old records. Though the faltfile is same for each month, the changes are occured in some records and also added with few records.
So when i am loading this data in to Database table, i need to just update the changed records and also needs to add the new records. I don't need to touch the remaining records.
How can i do that in SSIS 2005 using different data flow tasks ?
Thanks
Kumaran
View 3 Replies
View Related
Apr 17, 2008
Hello,
I have an application written in Visual Basic 2008, using a SQL Express 2008 database. This application runs in several locations on stand-alone PC's and there is no network connecting them.
I have to maintain a SQL database in a central location an would like to be able to distribute updated tables from that central location by using an USB stick and replace the tables of the same name in the different locations with the updated ones on my USB stick.
This I would like to do using code within my VB2008 application.
Can someone please help me on the way to achieve this. Is it possible to give some concrete code examples, as I am a newbie as a SQL Server user.
Many thanks and greetings,
Michel
View 5 Replies
View Related
Dec 23, 2014
I'm working on databases where statistics of some indexes (tables) are changing too frequently. Once I update them manually, one minute after they get 10-20% change, and five minutes after they get over 100% change. Tables get updated very frequently (multiple times in a second).
When I run a query to read from sys.stats, sys.dm_db_stats_properties and other dynamic views, I see that they were last updated when I did it manually, but the change rate overpassed the 500+20% (tables have multiples of 10K rows). Auto create and update statistics are set to true on all databases, and I don't know why sql server does not do that automatically.
View 2 Replies
View Related
Jun 2, 2015
Recently we migrated our environment to 2012.
We are planning to implement Xevents in all the servers in place of Trace files and everything is working fine.
Is it possible to configure Extended event to trigger a mail whenever any event (example dead lock) occurs.
I have gone through so many websites but i never find.
View 13 Replies
View Related
Apr 6, 2008
Hi,I want to save the last modification date when the row is updated. I have a column called "LastModification" in the table, every time the row is update I want to set the value of this column to the current date. So far all I know is that I need to use a trigger and the GetDate() function, but could any body help me with how to set the value of the column to getdate()? thanks for your help.
View 3 Replies
View Related
Oct 25, 2011
My SQL Server 2005 SP4 on Windows 2008 R2 is flooded with the below errors:-
Date 10/25/2011 10:55:46 AM
Log SQL Server (Current - 10/25/2011 10:55:00 AM)
Source spid
Message
Event Tracing for Windows failed to send an event. Send failures with the same error code may not be reported in the future. Error ID: 0, Event class ID: 54, Cause: (null).
Is there a way I can trace it how it is coming? When I check input buffer for these ids, it looks like it is tracing everything. All the general application DMLs are coming in these spids.
View 2 Replies
View Related
Apr 8, 2008
I have been testing with the WMI Event Watcher Task, so that I can identify a change to a file.
The WQL is thus:
SELECT * FROM __InstanceModificationEvent within 30
WHERE targetinstance isa 'CIM_DataFile'
AND targetinstance.name = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\AdventureWorks.bak'
This polls every 30 secs and in the SSIS Event (ActionAtEvent in the WMI Task is set to fire the SSIS Event) I have a simple script task that runs a message box).
My understanding is that the event polls every 30 s and if there is a change on the AdventureWorks.bak file then the event is triggered and the script task will run producing the message.
However, when I run the package the message is occurring every 30s, meaning the event is continually firing even though there has been NO change to the AdventureWorks.bak file.
Am I correct in my understanding of how this should work and if so why is the event firing when it should not ?
View 2 Replies
View Related
Jun 20, 2007
Hi
I seem to have a strange problem when applying a snapshot when the tables in the publication have been updated while the snapshot was being generated.
Say for example there is a table called RMAReplacedItem in the publication. When the snapshot starts being applied to the subscriber, a stored procedure called sp_MSins_RMAReplacedItem_msrepl_css gets created that handles an insert if the row already exists (ie it updates the row rather than inserting it). However, after all the data has been loaded into the tables, instead of calling this procedure, it tries to call one called sp_MSins_RMAReplacedIte_msrepl_cssm - it takes the last letter of the table name and adds it to the end of the procedure name.
The worst part is that this causes the application of the snapshot to fail, but it doesnt report what the error is, and instead it just tries applying the snapshot again. The only way i have managed to find which call is failing is to run profiler against the subscriber while the snapshot is being applied and see what errors.
I have run sp_broswereplcmds and the data in there is what is applied to the subscriber - ie the wrong procedure name.
All the servers involved are running sql 2005 service pack 2. The publisher and subscriber were both upgraded from sql 2000, but the distribution server is a fresh install of sql 2005.
View 1 Replies
View Related
May 31, 2007
Server 2003 SE SP1 5.2.3790 Sql Server 2000, SP 4, 8.00.2187 (latest hotfix rollup)
We fixed one issue, but it brought up another. the fix we applied stopped the ServicesActive access failure, but now we have a failure on MSSEARCH. The users this is affecting do NOT have admin rights on the machine, they are SQL developers.
We were having
Event Type: Failure Audit
Event Source: Security
Event Category: Object AccessEvent ID: 560
Date: 5/23/2007
Time: 6:27:15 AM
User: domainuser
Computer: MACHINENAME
Description:
Object Open:
Object Server: SC Manager
Object Type: SC_MANAGER OBJECT
Object Name: ServicesActive
Handle ID: -
Operation ID: {0,1623975729}
Process ID: 840
Image File Name: C:WINDOWSsystem32services.exe
Primary User Name: MACHINE$
Primary Domain: Domain
Primary Logon ID: (0x0,0x3E7)
Client User Name: User
Client Domain: Domain
Client Logon ID: (0x0,0x6097C608)
Accesses: READ_CONTROL
Connect to service controller
Enumerate services
Query service database lock state
Privileges: -
Restricted Sid Count: 0
Access Mask: 0x20015
Applied the following fix
http://support.microsoft.com/kb/907460/
Now we are getting
Event Type: Failure Audit
Event Source: Security
Event Category: Object Access
Event ID: 560
Date: 5/23/2007
Time: 10:51:23 AM
User: domainuser
Computer: MACHINE
Description:
Object Open:
Object Server: SC Manager
Object Type: SERVICE OBJECT
Object Name: MSSEARCH
Handle ID: -
Operation ID: {0,1627659603}
Process ID: 840
Image File Name: C:WINDOWSsystem32services.exe
Primary User Name: MACHINE$
Primary Domain: domain
Primary Logon ID: (0x0,0x3E7)
Client User Name: user
Client Domain: domain
Client Logon ID: (0x0,0x60D37C1A)
Accesses: READ_CONTROL
Query service configuration information
Query status of service
Enumerate dependencies of service
Query information from service
Privileges: - Restricted Sid Count: 0 Access Mask: 0x2008D
View 4 Replies
View Related
Nov 2, 2007
Hi all,
Can we get the event properties by using a query?
Are there any extended stored procuder to get the above?
Scenario:
>Desktop>Right Click on My Computer
>Go to Manage and click
>Expand System Tools
>Expand Event Viewer
>Application
click on one event.We can get the log info which is the manual procudure.
But now i want to get the event properties through the Query analyzer...
Any help would be great?
Thanks,
View 4 Replies
View Related
Oct 22, 2007
We recently upgraded to SQL 2005 from SQL 2000. We have most of our issues ironed out however about every 1 minute there is a message in the Application Event log and the SQL log that states:
EVENT ID 18456 Login Failed for the users DOMAIN/ACCOUNT [CLIENT: <local machine>]
This is a state 16 message which I thought meant that the account does not have access to the default database. The account is actually the account that the SQL services run under.
Any ideas? We can't seem to figure this one out. We actually upgraded to 2005 from 2000 and had an error appear after every reboot that prevented the SQL Agent from running(This application has failed to start because GAPI32.dll was not found. Re-installing the application may fix this problem.) We did a full uninstall of SQL and reinstalled fresh and restored the databases from .bak files and that is when the EVENT ID 18546 started occuring every minute.
We don't have any SQL heavy hitters here so please be detailed with any possible solutions. That you very much for any help you can provide!
David
View 5 Replies
View Related
Apr 8, 2004
Morning all!
My SQL server email job notifications have stopped working, but mails sent through the xp_sendmail command still work.
The only thing that has changed recently is the SQL server agent account passwords have been changed, these accounts are normal win2000 domain accounts.
Any ideas cos I am fully stumped?
View 3 Replies
View Related
Jan 2, 2008
Is it possible to set up a Job to send a notification , if a process is blocked for more than a minute on SQL Server 2000.
Thanks for any help on this
View 3 Replies
View Related
Jan 31, 2008
I wish to know if there is anyway to find out if a perticular job on SQL Agent was executed or not. I am not looking for Log History of the job, but, something like a trigger that will fire an email to notify that a perticular job that was scheduled to run at a certain time did not run.
To explain in detail, I have a job that is scheduled to run every 15 min. This job is crutial and I wish to be notified if the job was not run for some reason or other. I already have a program that delivers me the history log of the job each day, but, checking history to see if the job ran or not every 15 min is not possible. Again, I am not talking about the job success or failure, but the fact that the job has run or not - thats it !
If you are suggesting a SMO object, I will appriciate if you provide me with the code or alternatively a source to refer.
Thank you.
View 9 Replies
View Related
Oct 22, 2007
hi all i have found for function as function: SubscriptionEnumeration in API of notification service, i want display myAlert(notifications) in(for example: one day).the Function SubscriptionEnumeration display Subscription of (subscriberId,subscriptionType,nsApplication) it can be made this ?thanksHungN
View 1 Replies
View Related
Jan 9, 2008
Hi,
I want to build sql notification service in my web application and i not know how to build it. Please help me how it possible and any sample code then pls send me else give me link of website. Its very urgent for me, now i am using timer for checking for updation in database and i want to notification service for that because its take many time and timer fire every time even database change or not.
Jaydev Jangid
View 2 Replies
View Related