Hi all - so I know how to raise a custom event or information message from a script. It this the only way it can be done. I'd like to throw an informative message when a package starts, grab that in the event handler and send out email message when the package starts and when it finishes. I would like to pass on some of the variables of the package so custom would be the choice. I know if I throw a scipt in there I can send oninformation, onerror, onwarning but can it be done any other way
We have SQL Express installed in our servers used for IntraWeb application. Anyway, we just noticed that the servers are generating tons of Information Event with various types of description. Also we have experienced reboot in one system and we are trying to figure out if these SQL Express Information Events have somehow triggered this. See sample events below.
The web application running on those servers are working fine but maybe someone can give us ideas why these tons of messages are generated. Or is there a way to disable these? Any thoughts, ideas are appreciated.
Thanks, Glenn
Event Type: Information Event Source: MSSQL$SQLEXPRESS Event Category: (2) Event ID: 17896 Date: 4/21/2008 Time: 12:46:24 AM User: N/A Computer: NOVISCM01 Description: The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: e8 45 00 00 0a 00 00 00 èE...... 0008: 15 00 00 00 4e 00 4f 00 ....N.O. 0010: 56 00 49 00 53 00 43 00 V.I.S.C. 0018: 4d 00 30 00 31 00 5c 00 M.0.1.. 0020: 53 00 51 00 4c 00 45 00 S.Q.L.E. 0028: 58 00 50 00 52 00 45 00 X.P.R.E. 0030: 53 00 53 00 00 00 00 00 S.S..... 0038: 00 00 ..
Event Type: Information Event Source: MSSQL$SQLEXPRESS Event Category: (2) Event ID: 17403 Date: 4/21/2008 Time: 12:18:04 AM User: N/A Computer: NOVISCM01 Description: Server resumed execution after being idle 1791 seconds. Reason: timer event.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: fb 43 00 00 0a 00 00 00 ûC...... 0008: 15 00 00 00 4e 00 4f 00 ....N.O. 0010: 56 00 49 00 53 00 43 00 V.I.S.C. 0018: 4d 00 30 00 31 00 5c 00 M.0.1.. 0020: 53 00 51 00 4c 00 45 00 S.Q.L.E. 0028: 58 00 50 00 52 00 45 00 X.P.R.E. 0030: 53 00 53 00 00 00 00 00 S.S..... 0038: 00 00 ..
Event Type: Information Event Source: MSSQL$SQLEXPRESS Event Category: (2) Event ID: 9688 Date: 4/22/2008 Time: 1:12:49 PM User: N/A Computer: OREGONSCM01 Description: Service Broker manager has started.
Event Type: Information Event Source: MSSQL$SQLEXPRESS Event Category: (2) Event ID: 3408 Date: 4/22/2008 Time: 1:12:49 PM User: N/A Computer: OREGONSCM01 Description: Recovery is complete. This is an informational message only. No user action is required.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: f0 42 00 00 0a 00 00 00 ðB...... 0008: 17 00 00 00 4f 00 52 00 ....O.R. 0010: 45 00 47 00 4f 00 4e 00 E.G.O.N. 0018: 53 00 43 00 4d 00 30 00 S.C.M.0. 0020: 31 00 5c 00 53 00 51 00 1..S.Q. 0028: 4c 00 45 00 58 00 50 00 L.E.X.P. 0030: 52 00 45 00 53 00 53 00 R.E.S.S. 0038: 00 00 00 00 00 00 ......
Event Type: Information Event Source: MSSQL$SQLEXPRESS Event Category: (2) Event ID: 3454 Date: 4/22/2008 Time: 1:12:48 PM User: N/A Computer: OREGONSCM01 Description: Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
Event Type: Information Event Source: MSSQL$SQLEXPRESS Event Category: (2) Event ID: 3407 Date: 4/22/2008 Time: 1:12:48 PM User: N/A Computer: OREGONSCM01 Description: 0 transactions rolled back in database 'msdb' (4). This is an informational message only. No user action is required.
Event Type: Information Event Source: MSSQL$SQLEXPRESS Event Category: (2) Event ID: 17126 Date: 4/22/2008 Time: 1:12:48 PM User: N/A Computer: OREGONSCM01 Description: SQL Server is now ready for client connections. This is an informational message; no user action is required.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: e6 42 00 00 0a 00 00 00 æB...... 0008: 17 00 00 00 4f 00 52 00 ....O.R. 0010: 45 00 47 00 4f 00 4e 00 E.G.O.N. 0018: 53 00 43 00 4d 00 30 00 S.C.M.0. 0020: 31 00 5c 00 53 00 51 00 1..S.Q. 0028: 4c 00 45 00 58 00 50 00 L.E.X.P. 0030: 52 00 45 00 53 00 53 00 R.E.S.S. 0038: 00 00 00 00 00 00 ......
Event Type: Information Event Source: MSSQL$SQLEXPRESS Event Category: (2) Event ID: 3406 Date: 4/22/2008 Time: 1:12:48 PM User: N/A Computer: OREGONSCM01 Description: 1 transactions rolled forward in database 'msdb' (4). This is an informational message only. No user action is required.
Event Type: Information Event Source: MSSQL$SQLEXPRESS Event Category: (2) Event ID: 17199 Date: 4/22/2008 Time: 1:12:48 PM User: N/A Computer: OREGONSCM01 Description: Dedicated administrator connection support was not started because it is not available on this edition of SQL Server. This is an informational message only. No user action is required.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 2f 43 00 00 0a 00 00 00 /C...... 0008: 17 00 00 00 4f 00 52 00 ....O.R. 0010: 45 00 47 00 4f 00 4e 00 E.G.O.N. 0018: 53 00 43 00 4d 00 30 00 S.C.M.0. 0020: 31 00 5c 00 53 00 51 00 1..S.Q. 0028: 4c 00 45 00 58 00 50 00 L.E.X.P. 0030: 52 00 45 00 53 00 53 00 R.E.S.S. 0038: 00 00 00 00 00 00 ......
Hi, I am looking to implement a custom event handler that will also retain the original event arguments (in addition to several custom arguments). Specifically, I am looking to pass custom arguments into a SqlDataSourceStatusEventHandler, but also want to be able to access the Command.Parameters. I have implemented a new Event Arguments class (derived from System.EventArgs), new Event class and delegate, but do not know how to retain the SqlDataSourceEventArgs. I would really appreciate your suggestions! Thanks!
I'm relatively new to Reporting Services and .Net development so bear with me if I've missed something obvious. I've set up Reporting Services to run under forms authentication successfully. I want to filter the data (both within Report Builder Models and .rdl files) to the company the user belongs to.
To avoid joining the users table to all other tables on the companyID I'm wondering if it's possible to create a custom funciton which could use the UserID to lookup the companyID and then pass this through as a parameter, and have this "GetCompanyID" function available when building Models and/or reports...???
When building a model the Information Functions available are GETUSERID and GETUSERCULTURE. Is it possible to modify how these work and/or create additional functions here???
Well... As I said in other topics, I'm doing a clustering plugin for text mining. I'm facing many problems and, with your help, solving them one by one.
First of all, thanks a lot again.
Well... I've made a clustering function that is actually working very well. But I'm exporting its results to a log file I use as an algorithm trace for debugging.
My clustering method returns a vector containing information of what cluster each register belongs. For instance:
vector[0] = 1 -> The register of index 0 belongs to cluster 1.
vector[1] = 9 -> The register of index 1 belongs to cluster 9.
vector[2] = 2 -> The register of index 2 belongs to cluster 2.
...
And so on.
But... I know that none of the Navigation methods receives a structure like this one discribed above. I only use it to log the results to debug the algorithm.
But how to pass this information (what register (or test case) belongs to what cluster) to the Navigation ?
Thanks a lot again, and any help will be very appreciated.
Hello experts. I have been searching for anything about this but found very little. What are the events logged in SQL Server Error Logs aside from Successful/Failed Login, Backup/Restore/Recover database and, start/init sql server? Can we configure this to log other events, like CREATE or DBCC events for example? If so, how? Thanks a lot.
I am creating a custom transformation component, and a custom user interface for that component.
In my custom UI, I want to show the custom properties, and allow users to edit these properties similar to how the advanced editor shows the properties.
I know in my UI I need to create a "Property Grid". In the properties of this grid, I can select the object I want to display data for, however, the only objects that appear are the objects that I have already created within this UI, and not the actual component object with the custom properties.
How do I go about getting the properties for my transformation component listed in this property grid?
I would like to AUTOMATICALLY count the event for the month BEFORE today
and
count the events remaining in the month (including those for today).
I can count the events remaining in the month manually with this query (today being March 20):
SELECT Count(EventID) AS [Left for Month], FROM RECalendar WHERE (EventTimeBegin >= DATEADD(DAY, 1, (CONVERT(char(10), GETDATE(), 101))) AND EventTimeBegin < DATEADD(DAY, 12, (CONVERT(char(10), GETDATE(), 101))))
Could anyone provide me with the correct syntax to count the events for the current month before today
and
to count the events remaining in the month, including today.
I have some troubles with IBM WebSphere Application Server using MS SQL Server 2005 JDBC Driver. I always get the error e.g. java.lang.SecurityException: class "com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData"'s signer information does not match signer information of other classes in the same package
I found this Feedback but it seems to be closed.
A temporary solution for me was to delete the meta-inf directory of the JAR-File, but that can't be the solution.
What I want to accomplish is that at design time the designer can enter a value for some custom property on my custom task and that this value is accessed at executing time.
I am writing a custom task that has some custom properties. I would like to parameterize these properties i.e. read from a varaible, so I can change these variables from a config file during runtime.
I read the documentation and it says if we set the ExpressionType to CPET_NOTIFY, it should work, but it does not seem to work. Not sure if I am missing anything. Can someone please help me?
In the Editor of my custom task, under custom properties section, I expected a button with 3 dots, to click & pop-up so we can specify the expression or at least so it evaluates the variables if we give @[User::VaraibleName]
What we are trying to do is watch a table in one database for an insert. If something is inserted into a unique ID column, we want to go to another database, on the same server, and look for that same number and place a value in another column for that record. Any ideas?
I'd like to build an application that will react to specific changes todata in a set of tables in a database. The application would replicatethese data changes to another database. The target database won't beSQLServer. Neither is this simple replication, at times the applicationwill need to get extra data from the source database before the targetis updated.In other DBMS systems I am involved with the DBMS has the facilty towrite to an application message queue so that the monitoring applicationonly has to monitor the queue rather than a database. What I'd like todo is something like this:1. Some application changes data in a table.2. A trigger reacts to the change and writes a message to an applicationqueue.3. A windows service/process monitors the queue and picks up themessage. It then carries out whatever replication/DB actions are necessary.This would mean defining a number of new triggers on existing tables anddeveloping the windows service/process. Existing applications and theexisting tables in the database would remain unchanged. I'm not awindows programmer but I have someone in my team who is and who willbuild the windows service/process.The bit I'm unsure about is how a trigger can write to an applicationqueue or communicate with the windows service/process. I may be usingthe wrong terminology as I have more knowledge of Unix than Windows.Could anyone help with how I can do this or suggest any alternativestrategies.Thanks In Advance.Laurence
Just finishing of a large ETL system and have aquestion about the following:-
We have 164 child packages being called from a single parent package which is setup to perform logging to a SQL Server table. Anything that Errors or has Warnings is logged accordingly, however, how do you trap the PackageStart and PackageEnd events? when the child package knows nothing about logging?
My first thought was to have the Parent call the AddEvent SP with the appropriate values, but thought I may check here in case I missed something
I'm trying to catch an error and trigger a control flow to handle it. I introduce a control flow to catch "OnError" event, but , despite muy package has some errors it doesnt work...
Another issue, if i omit an error on a transformation object ( in order let the flow continue executing), can this error be managed by an event or record it in a log?
I would like to know how I can get hold the text for a service and event notifications. What I need is the ability to get hold of a list of the events I'm currently monitoring.
i.e.
Server or database level
I though I would be able to get hold of this in sys.server_event_notifications but it doesn't seem to have any data although my server level event notifcation service is running.
I have the following code and I'm trying to set an event dynamicly in the foreach statement... SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["BvtQueueConnectString2"]); SqlCommand select = new SqlCommand("select top 100 b.jobid as [Job ID], bq.timesubmitted as [Time Submitted], b.timereceived as [Time Received], bq.requestid as [Request ID], bq.timecompleted as [Time Completed], bq.buginfoid as [Bug Info ID], e.eventid as [Event ID], bq.closingeventid as [Closing Event ID], et.eventtype as [Event Type], e.eventtime as [State Start Time], l.twolettercode as [Language], p.projectname as [Project Name], p.packagedesignation as [Package Designation] from bvtjobs b inner join bvtrequestsnew bq on b.jobid = bq.jobid inner join eventlog e on bq.requestid = e.bvtrequestid inner join eventtypes et on e.eventtype = et.eventtypeid inner join languages l on bq.targetlanguage = l.langid inner join projects p on bq.targetplatform = p.projectid order by b.jobid asc", conn); SqlDataAdapter da = new SqlDataAdapter(select); DataSet ds = new DataSet(); conn.Open(); da.Fill(ds); conn.Close(); Table table = new Table();
foreach (DataRow dr in ds.Tables[0].Rows) { TableRow tr = new TableRow(); for (int i = 0; i < dr.ItemArray.Length; i++) { TableCell tc = new TableCell(); tc.Text = dr.ItemArray.GetValue(i).ToString(); tc.BackColor = Color.White; if (dr.ItemArray.GetValue(8).ToString() == "COMPLETE") { tc.BackColor = Color.BlueViolet; } tr.Cells.Add(tc); } table.Rows.Add(tr); } foreach (TableRow tablerow in table.Rows) { TableCell newtc = new TableCell(); Button mybutton = new Button(); newtc.Controls.Add(mybutton); mybutton.Text = "details"; //set the event here tablerow.Cells.Add(newtc); } Panel1.Controls.Add(table); DataBind();
I know how to get the events that start say on May, and I know how to get the events that end on May, however, How would I get the events that start on January and end in July. The month of May should display that event too. so far, as an example, I have: SELECT Events.startDate, Events.endDate
FROM Events WHERE Events.Active = 1 AND startDate BETWEEN convert(smalldatetime, '5/1/2006') AND convert(smalldatetime, '5/31/2006')
I am not sure if I have posted something about this, but I can't believe there is not a single person out there that is using a procedure written in SQL in order to schedule sending of an email, if data hasn't been submitted. I have had some hits and some help from some people but I am pretty much still stuck.
How is everybody else doing these sorts of thing,scheduling an email to be sent to a user if he/she hasn't submitted data,somebody must be doing it? A sample, help ,anything???
I am tracing a SQL Server 2000 production server that gets a queryabout every second. The Event I chose to watch was "Lock:Timeout". Tomy surprise I see many of these come through the trace. Is this normalbehavior? What is "Lock:Timeout" showing me?Thanks,John
Hi,I am trying to debug some queries that are being generated by anexternal program, and I have no way of finding out what the actualsyntax of the query is from within the program itself. This means thatwhen the query fails I am left with only a very unhelpful message.So what I was wondering, was whether there is a way that I can view theactual queries that are sent to SQL server as they happen, or if areal-time solution doesn't exist, then some way I can look back afterthe event and see the syntax of the queries?Ideally, what I would like to do is see the queries in the form theywere sent to the server, ie "SELECT * FROM foo WHERE bar='foobar'", asthis would help me to figure out where the generated queries are goingwrong.Cheers,--Dylan Parryhttp://electricfreedom.org | http://webpageworkshop.co.ukThe opinions stated above are not necessarily representative ofthose of my cats. All opinions expressed are entirely your own.
Hiwe are considering porting an application from Ingres to SQL Server.Part of the application uses a feature of Ingres called databaseevents. These allow a application to monitor for an event happening inthe database, e.g. a user enters a record meeting certain conditions,the database raises an event including a record ID, and a clientapplication sees the event (without continual explicit polling), readsthe new record and starts processing it.Any idea what the equivalent functionality would be in SQL Server2000, or are applications simply not done that way?TIAChloe CrowderThe British Library
I'm trying to add functionality to a VB 6 application allowingcustomer service to add a customer number to a new customer.Customers are added to the database by sales personnel, and aprospective customer may have multiple rows due to projected ordersfor multiple products. Customer numbers are assigned when a newcustomer makes their first order.I'm using a DataGrid connected to an ADO Data Control. The datacontrol is connected to a view in SQL Server using the 'distinct'directive (I know it's not updatable) to show only one line per newcustomer. What I wish to do is capture the update event (probablythrough the FieldChangeComplete routine of the data control), manuallyassign the newly entered customer number to all appropriate rows inthe database, and cancel the update event with no notifications.I'm having two problems:1. I can't capture the newly entered customer number. The Textproperty of the DataGrid returns the old value of the cell instead ofthe newly entered value. How do I get the edited value?2. Even though I set adStatus = adStatusCancel in theFieldChangeComplete routine, I get a Microsoft DataGrid Control dialogstating 'Operation was Canceled'. How do I avoid this notification?
How is everyone using the logging features of SSIS? What events are relevant to day-to-day operation? Currently we are logging all events except for Diagnostic to a SQL table, and then using event log reporting. What would be the appropriate events used for a production environment?
Need calculating the count of events on each day. I have an event log table as shown below.
DECLARE @EventLog TABLE ( event_id int, status_id varchar(20) , dttm datetime ) INSERT INTO @EventLog SELECT '100','Inplace','01/05/2015 05:00' UNION ALL SELECT '100','Removed','03/05/2015 10:00' UNION ALL SELECT '100','Inplace','05/05/2015 10:41' UNION ALL
[Code] ....
I need an output to look like on each day how many events were in place.
E.g.: for the month on May , Event_id 100 was inplace on 1st and removed on 3rd , so on 1st may 2 event_ids (100, 103) hence 2 .
event_ids - 103 / 104 and inplace the whole month and not removed. so its calculated the count as 2 til towards teh end of the month.
So I need to count of all each event_id in place for each day in may.
Hi, Ive been taking a look at how to consume events from a package when executing programatically.
Ive got some code (copied below) that creates a package programatically, adds a sequence container then within that adds a script task , then executes it using the overloaded method of Package.Execute() that takes an IDtsEvents argument.
My class that implements IDtsEvents simply output a message to the console for each event type.
Weird thing is, when I execute, this is the only output I get:
What I find weird is that I dont get information for loads of other event types. I would at least have expected to see some OnPostExecute events.
Anyone know why i dont see all of the events?
Thanks Jamie
Heres the code:
Code Snippet using System; using System.Collections.Generic; using System.Text; using Microsoft.SqlServer.Dts.Runtime; using Microsoft.SqlServer.Dts.Tasks.ScriptTask; namespace Package_API { class Program { static void Main(string[] args) { Console.WriteLine("Starting..."); Package p = new Package(); p.InteractiveMode = true; p.OfflineMode = true; // Add a Script Task to the package. Sequence s = (Sequence)p.Executables.Add("STOCK:Sequence"); TaskHost taskH = (TaskHost)s.Executables.Add("STOCK:ScriptTask"); // Run the package. DtsEvents events = new DtsEvents(); p.Execute(null,null,events,null,null); //p.Execute(); if (p.ExecutionResult == DTSExecResult.Failure || p.ExecutionStatus == DTSExecStatus.Abend) Console.WriteLine("Package failed or abended"); else Console.WriteLine("Package ran successfully"); Console.ReadLine(); } } }
I am trying to set up a package with a built-in auditing. It has a OnPreExecute, OnPostExecute and OnError event handlers. I am trying to record when the package starts, completes, and the completion status. Each one of these event handlers has a script task that does the logging. I put in debug message boxes into each event handler script to understand what goes on. So here's the sequence of events:
1. When starting the package the OnPreExecute event fires. Right away it fires the second time. I'm guessing what happens here is the script task within the event handler fires its own OnPreExecute event - that's how the first message really pops up. The second message is generated by the actual package-level OnPreExecute event.
2. I have a condition within the OnPreExecute event handler which might set the task status to failure. You would expect the OnError handler to fire, right?.. Wrong! The package dies without firing either OnError or OnPostExecute event....
3. If i remove the condition in step 2, and force an error in the package body, i get an OnError event, and then 2 OnPostExecute events ( i guess for the same reason as in step 1).
What I'm trying to understand is why in the world my OnPreExecute and OnPostExecute events get fired by their own event handlers, yet when i fire other events within these event handlers the appropriate (other) event handler does not run.
I was wondering what kind of events fires when you do a LoadFromSqlServer method??? I've got defined a Events class but debugging with F11 never get in touch with any event (apparently or mabye the problem is that I haven't declared that concrete one)
Let me know if possible or not. I provide you my snippet of code:
Dim pkg As New Microsoft.SqlServer.Dts.Runtime.Package 'Para que no choque con el objeto APPLICATION DE SYSTEM.WINDOWS.FORMS
Dim app As New Microsoft.SqlServer.Dts.Runtime.Application
Dim EventsSSIS As Eventos EventsSSIS = New Eventos() .. ..