Showing posts with label event. Show all posts
Showing posts with label event. Show all posts

Thursday, March 29, 2012

Can I have multiple tables to gather event data

Hi Guys,

Wondering if I could have two tables with parent child relationship to gather event data. Does NS support such scenario while defining schema in ADF.xml.

Please advice.

Thanks,

Shamir

You can use just about any T-SQL code in the EventRule Action node to

identify and insert new events for the SSNS application, as long as it

produces the appropriate fields as defined in the associated

eventclass.

HTH...

--

Joe Webb

SQL Server MVP

http://www.sqlns.com

~~~

Get up to speed quickly with SQLNS

http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.

(www.sqlpass.org)

On Sun, 23 Jul 2006 03:10:01 -0700,

wrote:

>Hi Guys,

>

>Wondering if I could have two tables with parent child relationship to

>gather event data. Does NS support such scenario while defining schema

>in ADF.xml.

>

>Please advice.

>

>Thanks,

>

>Shamir|||

[again, reposting since my prior attempt didn't seem to render appropriately]

You can use just about any T-SQL code in the EventRule Action node to
identify and insert new events for the SSNS application, as long as it
produces the appropriate fields as defined in the associated
eventclass.

HTH...

--
Joe Webb
SQL Server MVP
http://www.sqlns.com


~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)

|||

Hi Joe,

Thanks for your reply.

Let me give you a clear picture of what I am trying to do ..

I have event data of following structure,

Table 1:

<Transactions>

<Transaction id=1>

<Transaction id=2>

<Transaction id=3>

<Transactions>

Table 2:

<TransactionDetail>

<TId></TId>

<Info></Info>

<TransactionDetail>

"TId" in table 2 references id of transaction element in table 1. Idea is to support unlimited number of rows in table2. How can i go about this.

Thanks,

Shamir

|||

Ahhh...gotcha.

A couple of options come to mind. First you can flatten out the rows into multiple events. In this scenario, you'd have one event row per transaction detail and that row would include information from table 1 and table 2. You'd want to then use the digest delivery to pull it all together into one notification. However, under certain circumstances, I could see how this may lead to an occassional mishap where a user would receive more than one notification, each being somewhat incomplete.

You could also look at submitting only the master events, table 1, and then retrieving the detail information later on in the process - in either the match rule or perhaps in a custom delivery protocol.

HTH...

Joe

Tuesday, March 20, 2012

Can I Clear SQL Event Log

Hi,
Is there a way to clear the SQL Server Event Log without
stopping/starting the SQL service? I am running SQL Server 2000. I am
not talking about the transaction logs.
Thank You.
DanHi Dan
I assume you are talking about the SQL Server error log. You cannot clear
the log, but you can start a new one, by using the procedure
sp_cycle_errorlog.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Dan" <moro0012@.yahoo.com> wrote in message
news:1136338503.760968.10520@.f14g2000cwb.googlegroups.com...
> Hi,
> Is there a way to clear the SQL Server Event Log without
> stopping/starting the SQL service? I am running SQL Server 2000. I am
> not talking about the transaction logs.
> Thank You.
> Dan
>

Friday, February 24, 2012

Can activation SP wake up a thread?

Newbie question, but is there a way for me to set up a thread in my c# code so as it sleeps until it gets woken up by an event fired by an activation SP?

As in queue sits idle, thread sleeps.
Queue receives a message, activation SP gets fired, activation SP raises an event which gets caught by event handler in code, which wakes up thread to do processing?

The activated procedure can be C# code (an assembly in the database). Once activated, your CLR code would be invoked in a thread inside SQL Server and can issue a RECEIVE (using SqlCommand) to retrive the messages from the queue.

If you want your C# code to be in an external application (an .EXE) then you should use external activation instead of internal activation. Have a look at the External Activator sample at http://www.codeplex.com/SQLSrvSrvcBrkr/

Sunday, February 19, 2012

Can a trace slow down a server?

Hi

I was wondering. Can a trace slow down a server? If so, is it significant?

I got a trace that catch about 300-400 event /hour with the filter on that write its result in a .trc file used later to help analyse indexes.

Could this trace slow down a server?

Any sort of monitoring is going to have a performance hit. Unfortunately it is difficult to quantify. I would guess that the more events you capture the more impact it will have.
Try running performance monitor to assess the impact of your trace. Include the usual counters Processor, Memory and Hard disk counters (e.g. Memory : Available MBytes, Memory : Pages/sec, Processor : %Processor time, Process: Page Faults/sec, Hard disk : % Disk time, System : Context switches).
So stop the trace, start Performance monitor with your counters added, wait for a baseline to be established then restart your trace, then assess the impact.
You could use the "Index Tuning Wizard" or "Display Estimated Execution plan" in Query Analyser to analyse the effectiveness of your queries.