Viewing Events As They Happen?

Mar 5, 2007

Hi,

I am trying to debug some queries that are being generated by an
external program, and I have no way of finding out what the actual
syntax of the query is from within the program itself. This means that
when 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 the
actual queries that are sent to SQL server as they happen, or if a
real-time solution doesn't exist, then some way I can look back after
the event and see the syntax of the queries?

Ideally, what I would like to do is see the queries in the form they
were sent to the server, ie "SELECT * FROM foo WHERE bar='foobar'", as
this would help me to figure out where the generated queries are going
wrong.

Cheers,

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.

View 5 Replies


ADVERTISEMENT

SQL Server Error Logs: What Events Is It Logging? Can We Edit And Include DDL Events?

Jun 20, 2007

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.

View 1 Replies View Related

Events Calendar Questions: How To Find Events In The Week End

Jan 28, 2006

I have a start date, end date for each event.

I want to list all events between the start and end date comes in Saturday or Sunday.
in SQL server 2005 TSQL statement.

any insights ?

View 1 Replies View Related

Transact SQL :: Emailing Session Events For Extended Events

Feb 3, 2014

I am using this code for LongRunning Queries.

CREATE EVENT SESSION LongRunningQuery
ON SERVER
ADD EVENT sqlserver.sql_statement_completed
(
ACTION (sqlserver.sql_text, sqlserver.tsql_stack)
WHERE sqlserver.sql_statement_completed.duration > 60000

[Code] ...

Here Instead of writing to XML file how can send an EMAIL if a query runs more than 1 minute in my server ?

View 2 Replies View Related

What Will Happen If...

Dec 13, 2007

What would happen if I deleted all the contents of the tables like MSmerge_*.

In case it needs to be known, we have a merge-replication scenario with about 25 servers under SQL 2000 SP3.

Cheers,

Kias

View 13 Replies View Related

How Long Ago Did Something Happen

Jan 7, 2008

Hey, ive got a listof events that have occured on my site, updates etc. and Im trying to show how long ago the updates happened. For instance, say the date of an update is : 16/10/2007 15:16:03 I want the Label to say "Happened over 2 months ago" etc.Now ive tryed to use an IF statment but I cant seem to get it right :         DateTime dt = Convert.ToDateTime("16/10/2007 15:16:03");        if(dt.ToShortDateString() == DateTime.Now.ToShortDateString())        {   //happened today            if(dt.ToShortTimeString() == DateTime.Now.ToShortTimeString()||dt.ToShortTimeString() < DateTime.Now.AddMinutes(-1).ToShortTimeString())            {   //happened within a minute                UpdateLabel.Text = "About A Minute Ago";            }        }        else if (dt.ToShortTimeString() == DateTime.Now.AddDays(-1).ToShortTimeString())        {   //happened yesturday            UpdateLabel.Text = "Updated Yesturday";        }        else if (dt.ToShortDateString() == DateTime.Now.ToShortDateString() || dt.ToShortDateString <= DateTime.Now.AddDays(-7).ToShortDateString())        {            UpdateLabel.Text = "Updated Last Week";        }Any ideas where Im going wrong? Im probally staring it straight in the face, but I cant see it. Thanks in advance John 

View 1 Replies View Related

What Will Happen -- ROLLBACK Or NONE?

Jul 14, 1999

Hi,

what will happen in the following occasion?

checkpoint --> begin tran --> system failure

In MOC (SQL 7.0 Implemetation), it says there will be rollback, but in my humbel opinion, there should be nothing happened.

I think there was no dirty writing in this case. No data pages written, no log
pages written to disk. Am I right? Then, there might be nothing happened
instead of ROLLBACK.

If I am wrong, would you please let me know what is wrong in my thougt?

Thanks in advance,

View 2 Replies View Related

It Can&#39;t Happen, SQL Locks Up

Dec 26, 1999

I am using SQL Server 6.5, when two or more independent applications put transactions through SQL, it locks up. Example of locks up.

When the OrderLines table is locked, then I put the following (Select * from OrderLines) then the query does not return any values, the world goes round and round, the only way out is to shut down and cross my fingers whilst SQL goes into recovery mode.

I have read through some of the documentation, such as deadlocks, livelocks and lock starvation but it say none of these will lock the whole machine. But somehow simultaneous transactions can, and the current activity dialog goes red, bright red.

Any ideas?

View 1 Replies View Related

Serious SQL Problem - Anyone Had This Happen?

Nov 22, 2002

I have a SQL 2000 server(sp2) on Win2000 SP2. My largest database is about 5 gig. Log shipping went astray and had to reinitialize. WHen I did the part where it actually backups the init db to disk failed with the following

3041 :
BACKUP failed to complete the command BACKUP DATABASE [Development] TO DISK = N'G:SQLBACKUPdevlog' WITH INIT , NOUNLOAD , NAME = N'Development backup', NOSKIP , STATS = 10, NOFORMAT

In the NT event log I got the following

{Lost Delayed-Write Data} The system was attempting to transfer file data from buffers to DeviceLanmanRedirector. The write operation failed, and only some of the data may have been written to the file.

MS had an article on this

http://support.microsoft.com/default.aspx?scid=kb;en-us;293842.

There solution is Win2000 SP3. Has anyone had these errors before.

View 1 Replies View Related

Move LDF -Has Anyone Seen This Happen?

Jul 20, 2005

HiWe have a SQL 2000 (sp3) server with a database that I set up to have theMDF on D: and the LDF on E:. All was going along fine for several months andone day the server rebooted. The SQL log says something like "Service isshutting down due to server shutdown."When it came back up the LDF File was on D: (in the same folder as the MDF).The original LDF was gone from E:The SQL Log doesn't ever say anything like "Recreating LDF in defaultlocation." or any anything else that would explain what happened.I assume the change happened during the reboot (actually I didn't notice ituntil a week and a half later). I am relatively sure no human did anythingthat caused the log file to move.So has anyone seen this happen before.?TIA-Dick

View 1 Replies View Related

Just Where Does The Work Happen?

Feb 27, 2008

Hi everyone,

I'm relatively new to SSIS - i've played with the technology a little and i've created some DTS packages previously.

I'm in a scenario where I have 3 servers with an instance of SQL 2005 installed. Server A is a live server with lots of statistical data, Server B is a backend server specifically provided for handling heavy data processing. Server C is another live server, but it's essentially empty.

I would like to transfer some data from Server A, summarise it using the processing power of Server B and then store the resulting summary data in Server C. One of my main requirements is to have minimum processing performed on Server A and C.

I created an SSIS package which produces the required results, but I've no real idea where the hard work is being performed. For example, in my SSIS i have an OLEDB data source which uses a select statement with a couple of parameters to determine which data to return from Server A, i then have an aggregate transformation on the output before an OLEDB data destination for Server C. So where does the aggregation get performed?

Im hoping because i'm running my SSIS package on Server B that in the above instance, all the source data is pulled onto Server B (maybe into a tempdb?) and then aggregated by Server B before then being transferred onto Server C.

Please let me apologise in advance for the lengthy post - but just trying to explain this to others may help me work it out in my head (at the very least)

thanks,
Andrew

View 5 Replies View Related

What Happen To My Sql Server 2000

Apr 9, 2008

 im using Vb2005 and Sql server 2000.when i open enterprise manager n try to make the connection, then i got error msg like this" A connection could not be established to (LOCAL)Reason: SQL server does not exists or access denied.ConnectionOpen (Connect()) ..Please verify SQL Server is running and check your SQK Server registration properties (by right-clicking on the (LOCAL) node) and try again" When i open sql server service manager and try to start my sql, its do not change from stop to start.. and one more thing is, if  i plan to use sql server 2005..do i need to uninstall sql server 2000? 

View 6 Replies View Related

When Does Transaction Doom Happen.

Aug 23, 2006

I got the following message..What does it mean and where it happens? By reading few articles it seems that if the Rollback is not the first statement within the catch block, then this error might occur. However I want to know why it happens? I am not using any trigger in my app.

Transaction doomed in trigger

View 4 Replies View Related

Required Field Empty - How Could This Happen?

Feb 21, 2008

Hello! I have a web form in VB.NET & ASP.NET 1.1, with data being saved to a SQL 2005 database with multiple tables. The primary key on all these tables is a unique identifying number that the user enters. However, one record in this database (across all tables) has no identifier. All other information seems to have saved without problem, but there's no identifier, which is very wierd for several reasons: 1) the form should not allow the user to proceed without it; 2) all the tables in the database do not allow nulls for the column, and 3) it's the primary key!
Any thoughts on how this might have happened?
Thanks!
Kaiti

View 2 Replies View Related

What Will Happen When The Databases Reach 4gb Limitation

Jun 19, 2007



Hi,



I would like to know what problems will occur when I try to create a database that exceed the size limit of 4GB ?



Thanks

View 1 Replies View Related

What Happen To The Data Mining Site

Aug 21, 2007

Hi There,

I cannot access http://www.sqlserverdatamining.com any more in the past couple of days, what is going on?

Thanks

View 3 Replies View Related

How To Make Sure No Other Table Writes Happen Between 2 SQL Statements ?

Nov 25, 2007

Ok, here is my situation.....
When someone navigates to a user's profile page on my site, I present them with a slideshow of the user's photos using the AJAX slideshow extender.  I obtain the querystring value in the URL (to determine which user's page I'm on) and feed that into a webservice via a context value where an array of photos is created for the slideshow.  Now, in order to create the array's size, I do a COUNT of all of that specific user's photos.  Then, I run another SQL statement to obtain the path of those photos in the file system.  However, during the time of that first SQL query's execution (the COUNT statement) to the time of the second SQL query (getting the paths of the photos), the owner of that profile may upload or delete a photo from his profile.  I understand this would be a very rare occurrence since SQL statements 1 and 2 will be executed within milliseconds of each other, but it is still possible I suppose.  When this happens, when I try to populate the array, either the array will be too small or too large.  I'm using SqlDataReader for this as it seems to be less memory and resource intensive than datasets, but I could be wrong since I'm a relative beginner and newbie.   This is what I have in my vb file for the webservice.....Public Function GetSlides(ByVal contextKey As String) As AjaxControlToolkit.Slide()     Dim dbConnection As New SqlConnection("string for the data source, etc.")     Try          dbConnection.Open()          Dim memberId = CInt(contextKey)          Dim photoCountLookupCmd As New SqlCommand _               ("SELECT COUNT(*) FROM Photo WHERE memberId = " & memberId, dbConnection)          Dim thisReader As SqlDataReader = photoCountLookupCmd.ExecuteReader()          Dim photoCount As Integer          While (thisReader.Read())               photoCount = thisReader.GetInt32(0)          End While          thisReader.Close()          Dim MySlides(photoCount - 1) As AjaxControlToolkit.Slide          Dim photoLookupCmd As New SqlCommand _               ("SELECT fullPath FROM Photo WHERE memberId = " & memberId, dbConnection)          thisReader = photoLookupCmd.ExecuteReader()
          Dim i As Integer          For i = 0 To 2               thisReader.Read()               Dim photoUrl As String = thisReader.GetString(0)               MySlides(i) = New AjaxControlToolkit.Slide(photoUrl, "", "")          Next i          thisReader.Close()          Return MySlides     Catch ex As SqlException     Finally          dbConnection.Close()
     End Try
End FunctionI'm trying to use the most efficient method to interact with the database since I don't have unlimited hardware and there may be moderate traffic on the site.  Is SqlDataReader the way to go or do I use something else?  If I do use SqlDataReader, can someone show me how I can run those 2 SQL statements in best practice?  Would I have to somehow lock writing to that table when I start the first SQL statement, then release the lock after I execute the second SQL statement?  What's the best practice in this kind of scenario.
Thanks in advance.

View 3 Replies View Related

What Will Happen If I Change Startup Service Account?

Jan 15, 2008

Hello, everyone:

I want to change Startup Service Account of an instance on SQL Server 2000 from System Account to a Domain Account from Enterprise Manager. What impact maybe bring up on database and frond end?

Thanks

ZYT

View 2 Replies View Related

What Will Happen If I Choose RecoveryModel Is Simple In SQL 2005

Aug 14, 2007

We are using SQL 2005 for maintaing the Poerplant database,for that we have to run reports to get the data from the database.We have selected "RecoveryModel" is Simple.but if we select recovery model "Simple" we cannot get the full Database backup.And if we select the Recovery Model is "Full" the size of transaction log files for historical database is growing like anyway.So what i think that if we choose recovery model as "Simple" the size of transaction log files will be in controlable size.But if select Recovery model is"Full" then the size of transaction logfiles are growing.

Plz give ur valueable suggestion.

thanks,
Amit

View 1 Replies View Related

SQL Query Automatically Count Month Events B4 Today; Count Events Today + Balance Of Month

Mar 20, 2004

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.

Thank you for your assistance in advance.

Joel

View 1 Replies View Related

Odd: Inserts And Updates Happen Before Running Code In Debugger

Aug 15, 2006

Hi,Before stepping into ado.net code to perform an insert or update, the insert / update has already taken place, just on starting the debugger. I use VS 2005 on SQL Server 2000. This did not happen with VS 2003 and SQL Server 2000.Anyone else encountered this?

View 2 Replies View Related

What Will Happen In Target Database When Publishing Profile File Is Not Being Used

Sep 18, 2015

I'm exploring using VS2013, TFS 2013 and Release Management for DB projects.In VS 2013 the deployment configuration is stored in the publishing profile, which is not necessarily being used by deployment tools. (Release Management for example, while it's supporting the profiles, it does not require them) So, the question is how to control what will happen in the target database when the publishing profile file is not being used?

Is there any way to store the deployment configuration with project so it will be applied by default?For example, if I want to control the following settings: Block incremental deployment if data loss may occur...Drop objects in the target DB that are not in the DB project, e.t.c.

View 6 Replies View Related

What Will Happen When A New Row Inserted In A Table Where A Cluster Index Is Defined

Sep 7, 2007

As we all know that cluster index physically sort the table. Now what will happen if I insert a new row in the table which voilating the sort rule of table.
Will it inserte at the end of table or table is reordered as cluster index always keep table in physically sorted . Please cleaar my doubt.

View 3 Replies View Related

Our Report Servers Are Constantly Getting The Symmetric Key Error - Why Does This Happen.

Feb 6, 2007

Our report server are constantly getting the below error.

What causes this - I know how to fix it, in fact, I've automated it but why does it constantly happen on some servers? I guess I'd like to know what causes it to try and fix it at those points instead of having to fix it here. Proactively.



Reporting Services Error



The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled) (rsRPCError) Get Online Help



The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled)



The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled)



Bad Data. (Exception from HRESULT: 0x800900



Why

View 3 Replies View Related

Checkpoints: FTP Task Download FTP Files Fails In Between Then What Will Happen?

Feb 13, 2007

Hi,

I have a FTP task in my control flow that download files from a FTP server. This ftp task is inside a foreach container that loops over a ADO recordset for the file name. The files that the ftp task pulls are huge. If the FTP task fails then I want the FTP task to restart and only download those files that have not been downloaded. Is this possible?

What possible configurations do I have to make to the foreach container and the filetask?

Thanks a lot in advance for your help and time.

Regards,

$wapnil

View 2 Replies View Related

There Is Nothing Happen After Click Finish Checkout On My Shopping Cart Assignment

Mar 16, 2008

Hi all,
There is nothing happen when I finished my checkout process, I expect the data will be saved to order and orderitem table in my SQL database, but no data found on order and orderitem table and no error messages display during operation!!!
Below is my checkout.aspx.vb code, the whole code line number around 138, I captured the part from 1~ 64 line number, I suspect line 35 - 48 have a problem, can somebody help me, many thanks.
 1 Imports System
2 Imports System.Data.SqlClient
3 Imports SW.Commerce
4 Partial Class CheckOut
5 Inherits System.Web.UI.Page
6 Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
7 If Not Page.IsPostBack Then
8 If Profile.Cart Is Nothing Then
9 NoCartlabel.Visible = True
10 Wizard1.Visible = False
11 End If
12 If User.Identity.IsAuthenticated Then
13 Wizard1.ActiveStepIndex = 1
14 Else
15 Wizard1.ActiveStepIndex = 0
16 End If
17 End If
18 End Sub
19 Sub chkUseProfileAddress_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs)
20
21 ' fill the delivery address from the profile, but only if it’s empty
22 ' we don’t want to overwrite the values
23
24 If chkUseProfileAddress.Checked AndAlso txtName.Text.Trim() = "" Then
25 txtName.Text = Profile.Name
26 txtAddress.Text = Profile.Address
27 txtcity.Text = Profile.City
28 txtCountry.Text = Profile.Country
29 End If
30 End Sub
31 Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs)
32
33 ' Insert the order and order lines into the database
34
35 Dim conn As SqlConnection = Nothing
36 Dim trans As SqlTransaction = Nothing
37 Dim cmd As SqlCommand
38 Try
39 conn = New SqlConnection(ConfigurationManager.ConnectionStrings("swshop").connectionstring)
40 conn.Open()
41 trans = conn.BeginTransaction
42 cmd = New SqlCommand()
43 cmd.Connection = conn
44 cmd.Transaction = trans
45
46 ' set the order details
47
48 cmd.CommandText = "INSERT INTO Order(MemberName, OrderDate, Name, Address1, Address2, Country, Total) VALUES (@MemberName, @OrderDate, @Name, @Address, @city, @Country, @Total)"
49 cmd.Parameters.Add("@MemberName", Data.SqlDbType.VarChar, 50)
50 cmd.Parameters.Add("@OrderDate", Data.SqlDbType.DateTime)
51 cmd.Parameters.Add("@Name", Data.SqlDbType.VarChar, 50)
52 cmd.Parameters.Add("@Address", Data.SqlDbType.VarChar, 255)
53 cmd.Parameters.Add("@City", Data.SqlDbType.VarChar, 15)
54 cmd.Parameters.Add("@Country", Data.SqlDbType.VarChar, 50)
55 cmd.Parameters.Add("@Total", Data.SqlDbType.Money)
56 cmd.Parameters("@MemberName").Value = User.Identity.Name
57 cmd.Parameters("@OrderDate").Value = DateTime.Now()
58 cmd.Parameters("@Name").Value = CType(Wizard1.FindControl("txtName"), TextBox).Text
59 cmd.Parameters("@Address").Value = CType(Wizard1.FindControl("txtAddress"), TextBox).Text
60 cmd.Parameters("@City").Value = CType(Wizard1.FindControl("txtCity"), TextBox).Text
61 cmd.Parameters("@Country").Value = CType(Wizard1.FindControl("txtCountry"), TextBox).Text
62 cmd.Parameters("@Total").Value = Profile.Cart.Total
63 Dim OrderID As Integer
64 OrderID = Convert.ToInt32(cmd.ExecuteScalar())

 Below is checkout.aspx1 <%@ Import Namespace ="System.Data.SqlClient"%>
2 <%@ Import Namespace ="SW.Commerce"%>
3 <%@ Page Language="VB" MasterPageFile="~/SWSHOP.master" AutoEventWireup="false" CodeFile="CheckOut.aspx.vb" Inherits="CheckOut" title="Untitled Page" %>
4
5 <%@ Register Src="SWShoppingCart.ascx" TagName="SWShoppingCart" TagPrefix="uc1" %>
6 <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
7
8 <asp:Label id="NoCartlabel" runat="server" visible="false">
9 There are no items in your cart. Visit the shop to buy items.
10 </asp:Label>
11
12 <div style="float:right">
13  </div>
14
15
16 <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="1" Width="274px">
17 <WizardSteps>
18 <asp:WizardStep runat="server" Title="Login">
19 <asp:Login ID="Login1" runat="server">
20 </asp:Login>
21 </asp:WizardStep>
22 <asp:WizardStep runat="server" Title="Delievery Address">
23 <asp:checkbox id="chkUseProfileAddress" runat="server" autopostback="True"
24 text="Use membership address"
25 OnCheckedChanged="chkUseProfileAddress_CheckedChanged"></asp:checkbox><br />
26 <table border=�0�>
27 <tr><td>Name</td><td><asp:textbox id="txtName" runat="server" /></td></tr>
28 <tr><td>Address</td><td><asp:textbox id="txtAddress" runat="server" /></td></tr>
29 <tr><td>City</td><td><asp:textbox id="txtcity" runat="server" /></td></tr>
30 <tr><td>
31 Country</td><td><asp:textbox id="txtCountry" runat="server" /></td></tr>
32 </table>
33 </asp:WizardStep>
34 <asp:WizardStep runat="server" Title="Payment">
35 <asp:DropDownList id="lstCardType" runat="server">
36 <asp:ListItem>MasterCard</asp:ListItem>
37 <asp:ListItem>Visa</asp:ListItem>
38 </asp:DropDownList>
39 <br />
40 Card Number: <asp:Textbox id="txtNumber" runat="server" Text="0123456789" ReadOnly="True"/>
41 <br />
42 Expires: <asp:textbox id="txtExpiresMonth" runat="server" columns="2" />
43 /
44 <asp:textbox id="txtExpiresYear" runat="server" columns="4" />
45 </asp:WizardStep>
46 <asp:WizardStep runat="server" Title="confirmation">
47 <uc1:SWShoppingCart ID="SWShoppingCart1" runat="server" />
48 <br />
49 <br />
50 Please confirm amount you wish to have deduct from your credit card.
51 </asp:WizardStep>
52 <asp:WizardStep runat="server" Title="Complete">
53 Thank you for your order.</asp:WizardStep>
54 </WizardSteps>
55 </asp:Wizard>
56 </asp:Content>
57 <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
58 <asp:LoginView ID="LoginView1" Runat="server">
59 <AnonymousTemplate>
60 <asp:passwordrecovery id="PasswordRecovery1" runat="server" />
61 </AnonymousTemplate>
62 </asp:LoginView>
63 </asp:Content>
 

View 2 Replies View Related

Northwind Database In SQL Server Express Is Busted And Gone,after SqlCommand Fails In VB2005Express-How To Prevent It Happen?

Aug 21, 2007

Hi all,

I tried to use dbo.tables of Northwind database in SQL Server Express to do SqlCommand to populate a DataTable in DataSet. The SqlCommand failed in the project execution and I found that Northwind database in SQL Server Express is busted and gone (just the name "Northwind" remained in the SQL Server Management Studio Express). How can I prevent it from happening in my "SqlCommand-SqlConnection" project? Please help and advise.

I tried to repair my "Northwind" database by using the SQL2000SampleDb.msi of Northwind and pubs Sample Databases for SQL Server 2000 downloaded from the http://www.microsoft.com/downloads. My "pubs" database is still in my SQL Server Management Studio Express. How can I just repair my "Northwind" database by using the Microsoft SQL2000SampleDb.msi program? Please help and advise this matter too.

Thanks in advance,
Scott Chang

View 7 Replies View Related

Viewing SQL Currently Being Ran

Apr 2, 2008

Hi all,

I'm very new to SQL Server having previously worked with Oracle 10g for the last couple of years.

Anyway, in Oracle there is a view called V$SQL that provides information about SQL that is or has recently been executed. I'm trying to find a similar sort of functionality in SQL Server.

Basically, what I'd like to do is list all of the SQL statements that are running at a given moment. Or even better would be a way of listing all statements that have run in the last 10 minutes.

Appreciate any help for a newbie.

We're on SQL Server 2000 8.00.194

Cheers
Kloid

View 8 Replies View Related

SQL Trigger Events

May 29, 1999

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?

View 1 Replies View Related

Reg Delegates And Events

May 16, 2008

as asap pl give the detailed and clear description reg differences between delegates and events

vedavathi zend

View 3 Replies View Related

Reacting To DB Events

Dec 16, 2005

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

View 3 Replies View Related

PackageStart/End Events

Aug 30, 2006

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

View 5 Replies View Related

Catching Events

Aug 30, 2007

Hi,

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?

Thanks

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved