Hi,
I have an requirement for doing some custom action in my
application when any SQL server table is modified. One of the ways,
which I think it is achievable is to write an custom application which
listens to SQL queries fired on the particular Database. This will
enable me to do the custom action, when any DML statement is trapped
through my custom SQL profiler. So, more or less, it boils down to
writing/using something similar to the SQL Profiler tool. Any help
would be appreciated.
Thanks in Advance,
Nimesh
Upgrade to SQL Server 2005 and you will have all those features build-in
<nimeshn@.gmail.com> wrote in message
news:1178447651.122809.119940@.q75g2000hsh.googlegr oups.com...
> Hi,
> I have an requirement for doing some custom action in my
> application when any SQL server table is modified. One of the ways,
> which I think it is achievable is to write an custom application which
> listens to SQL queries fired on the particular Database. This will
> enable me to do the custom action, when any DML statement is trapped
> through my custom SQL profiler. So, more or less, it boils down to
> writing/using something similar to the SQL Profiler tool. Any help
> would be appreciated.
> Thanks in Advance,
> Nimesh
>
|||Thanks for the suggestion, Uri. I think you are referring to query
notifications feature in SQL server 2005. But, I got to have this
custom application to work with SQL server 2000 as well.
On May 6, 3:53 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Upgrade toSQLServer2005 and you will have all those features build-in
> <nime...@.gmail.com> wrote in message
> news:1178447651.122809.119940@.q75g2000hsh.googlegr oups.com...
>
>
> - Show quoted text -
Showing posts with label action. Show all posts
Showing posts with label action. Show all posts
Thursday, March 29, 2012
Creating an custom application simulating an SQL Server Profiler.
Hi,
I have an requirement for doing some custom action in my
application when any SQL server table is modified. One of the ways,
which I think it is achievable is to write an custom application which
listens to SQL queries fired on the particular Database. This will
enable me to do the custom action, when any DML statement is trapped
through my custom SQL profiler. So, more or less, it boils down to
writing/using something similar to the SQL Profiler tool. Any help
would be appreciated.
Thanks in Advance,
NimeshUpgrade to SQL Server 2005 and you will have all those features build-in
<nimeshn@.gmail.com> wrote in message
news:1178447651.122809.119940@.q75g2000hsh.googlegroups.com...
> Hi,
> I have an requirement for doing some custom action in my
> application when any SQL server table is modified. One of the ways,
> which I think it is achievable is to write an custom application which
> listens to SQL queries fired on the particular Database. This will
> enable me to do the custom action, when any DML statement is trapped
> through my custom SQL profiler. So, more or less, it boils down to
> writing/using something similar to the SQL Profiler tool. Any help
> would be appreciated.
> Thanks in Advance,
> Nimesh
>|||Thanks for the suggestion, Uri. I think you are referring to query
notifications feature in SQL server 2005. But, I got to have this
custom application to work with SQL server 2000 as well.
On May 6, 3:53 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Upgrade toSQLServer2005 and you will have all those features build-in
> <nime...@.gmail.com> wrote in message
> news:1178447651.122809.119940@.q75g2000hsh.googlegroups.com...
>
> > Hi,
> > I have an requirement for doing somecustomaction in my
> >applicationwhen anySQLservertable is modified. One of the ways,
> > which I think it is achievable is to write ancustomapplicationwhich
> > listens toSQLqueries fired on the particular Database. This will
> > enable me to do thecustomaction, when any DML statement is trapped
> > through mycustomSQLprofiler. So, more or less, it boils down to
> > writing/using something similar to theSQLProfilertool. Any help
> > would be appreciated.
> > Thanks in Advance,
> > Nimesh- Hide quoted text -
> - Show quoted text -
I have an requirement for doing some custom action in my
application when any SQL server table is modified. One of the ways,
which I think it is achievable is to write an custom application which
listens to SQL queries fired on the particular Database. This will
enable me to do the custom action, when any DML statement is trapped
through my custom SQL profiler. So, more or less, it boils down to
writing/using something similar to the SQL Profiler tool. Any help
would be appreciated.
Thanks in Advance,
NimeshUpgrade to SQL Server 2005 and you will have all those features build-in
<nimeshn@.gmail.com> wrote in message
news:1178447651.122809.119940@.q75g2000hsh.googlegroups.com...
> Hi,
> I have an requirement for doing some custom action in my
> application when any SQL server table is modified. One of the ways,
> which I think it is achievable is to write an custom application which
> listens to SQL queries fired on the particular Database. This will
> enable me to do the custom action, when any DML statement is trapped
> through my custom SQL profiler. So, more or less, it boils down to
> writing/using something similar to the SQL Profiler tool. Any help
> would be appreciated.
> Thanks in Advance,
> Nimesh
>|||Thanks for the suggestion, Uri. I think you are referring to query
notifications feature in SQL server 2005. But, I got to have this
custom application to work with SQL server 2000 as well.
On May 6, 3:53 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Upgrade toSQLServer2005 and you will have all those features build-in
> <nime...@.gmail.com> wrote in message
> news:1178447651.122809.119940@.q75g2000hsh.googlegroups.com...
>
> > Hi,
> > I have an requirement for doing somecustomaction in my
> >applicationwhen anySQLservertable is modified. One of the ways,
> > which I think it is achievable is to write ancustomapplicationwhich
> > listens toSQLqueries fired on the particular Database. This will
> > enable me to do thecustomaction, when any DML statement is trapped
> > through mycustomSQLprofiler. So, more or less, it boils down to
> > writing/using something similar to theSQLProfilertool. Any help
> > would be appreciated.
> > Thanks in Advance,
> > Nimesh- Hide quoted text -
> - Show quoted text -
Labels:
action,
application,
creating,
custom,
database,
microsoft,
modified,
mysql,
oracle,
profiler,
requirement,
server,
simulating,
sql,
table
Creating an custom application simulating an SQL Server Profiler.
Hi,
I have an requirement for doing some custom action in my
application when any SQL server table is modified. One of the ways,
which I think it is achievable is to write an custom application which
listens to SQL queries fired on the particular Database. This will
enable me to do the custom action, when any DML statement is trapped
through my custom SQL profiler. So, more or less, it boils down to
writing/using something similar to the SQL Profiler tool. Any help
would be appreciated.
Thanks in Advance,
NimeshUpgrade to SQL Server 2005 and you will have all those features build-in
<nimeshn@.gmail.com> wrote in message
news:1178447651.122809.119940@.q75g2000hsh.googlegroups.com...
> Hi,
> I have an requirement for doing some custom action in my
> application when any SQL server table is modified. One of the ways,
> which I think it is achievable is to write an custom application which
> listens to SQL queries fired on the particular Database. This will
> enable me to do the custom action, when any DML statement is trapped
> through my custom SQL profiler. So, more or less, it boils down to
> writing/using something similar to the SQL Profiler tool. Any help
> would be appreciated.
> Thanks in Advance,
> Nimesh
>|||Thanks for the suggestion, Uri. I think you are referring to query
notifications feature in SQL server 2005. But, I got to have this
custom application to work with SQL server 2000 as well.
On May 6, 3:53 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Upgrade toSQLServer2005 and you will have all those features build-in
> <nime...@.gmail.com> wrote in message
> news:1178447651.122809.119940@.q75g2000hsh.googlegroups.com...
>
>
>
> - Show quoted text -sql
I have an requirement for doing some custom action in my
application when any SQL server table is modified. One of the ways,
which I think it is achievable is to write an custom application which
listens to SQL queries fired on the particular Database. This will
enable me to do the custom action, when any DML statement is trapped
through my custom SQL profiler. So, more or less, it boils down to
writing/using something similar to the SQL Profiler tool. Any help
would be appreciated.
Thanks in Advance,
NimeshUpgrade to SQL Server 2005 and you will have all those features build-in
<nimeshn@.gmail.com> wrote in message
news:1178447651.122809.119940@.q75g2000hsh.googlegroups.com...
> Hi,
> I have an requirement for doing some custom action in my
> application when any SQL server table is modified. One of the ways,
> which I think it is achievable is to write an custom application which
> listens to SQL queries fired on the particular Database. This will
> enable me to do the custom action, when any DML statement is trapped
> through my custom SQL profiler. So, more or less, it boils down to
> writing/using something similar to the SQL Profiler tool. Any help
> would be appreciated.
> Thanks in Advance,
> Nimesh
>|||Thanks for the suggestion, Uri. I think you are referring to query
notifications feature in SQL server 2005. But, I got to have this
custom application to work with SQL server 2000 as well.
On May 6, 3:53 pm, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Upgrade toSQLServer2005 and you will have all those features build-in
> <nime...@.gmail.com> wrote in message
> news:1178447651.122809.119940@.q75g2000hsh.googlegroups.com...
>
>
>
> - Show quoted text -sql
Labels:
action,
application,
creating,
custom,
database,
microsoft,
modified,
myapplication,
mysql,
oracle,
profiler,
requirement,
server,
simulating,
sql,
table
Tuesday, March 27, 2012
Creating a View
I have 2 tables. T1 is for current data. T2 is a audit tracking table for T1. There will be several records in T2 for each 1 in T1. T2 has a Action Field that stores the last action and a auditID to record changes on T1.
What I want to do is create a view that shows the current records in T1 and all the records in the audit tabel T2. I can do the Join but this would duplicate all the fields.
I am looking for something like this:
Select 'AuditID' AuditID,TD.*,'Action' Action from TrakrDetails TD
--Union
Select TDA.* from TrakrDetails_Audit TDA
order by AuditID desc
This craps out because there are 2 additional Fields in T2.
Any Suggestions?
Thanks
JonSorry but you have to list out all of the columns...
If you want to show columns that aren't in the other table you can use a literal like space, or you can use a null
SELECT ' ' AS Col1,
, Null As Col2
, Col3 FROM myTable99
UNION ALL
SELECT Col1
, Col2
, Col3
FROM myTable00|||Thanks Brett
Your way works.
Normally I would have done it this way but it seemed like it was the long way around (thats the way it normally goes for me).
I thought there might be a easy way I was missing.
Thanks Again
Jon|||As an aside NEVER use SELECT *
(Except for analysis, never for code...save yourself a lot of pain)
What I want to do is create a view that shows the current records in T1 and all the records in the audit tabel T2. I can do the Join but this would duplicate all the fields.
I am looking for something like this:
Select 'AuditID' AuditID,TD.*,'Action' Action from TrakrDetails TD
--Union
Select TDA.* from TrakrDetails_Audit TDA
order by AuditID desc
This craps out because there are 2 additional Fields in T2.
Any Suggestions?
Thanks
JonSorry but you have to list out all of the columns...
If you want to show columns that aren't in the other table you can use a literal like space, or you can use a null
SELECT ' ' AS Col1,
, Null As Col2
, Col3 FROM myTable99
UNION ALL
SELECT Col1
, Col2
, Col3
FROM myTable00|||Thanks Brett
Your way works.
Normally I would have done it this way but it seemed like it was the long way around (thats the way it normally goes for me).
I thought there might be a easy way I was missing.
Thanks Again
Jon|||As an aside NEVER use SELECT *
(Except for analysis, never for code...save yourself a lot of pain)
Subscribe to:
Posts (Atom)