Tuesday, March 27, 2012
duplicate RPC:Completed events in trace file
I've got several rows in which the colum values are the exact same. I
was guessing this might be parallel execution, but its just a guess...
thx,
--oj.Hi
I have not seen duplicated events. What version of SQL Server are you using?
What columns/filters are using? Are you logging to screen/file or table?
John
"seraph" wrote:
> Has anyone ever seen duplicate RPC:Completed events in a trace file?
> I've got several rows in which the colum values are the exact same. I
> was guessing this might be parallel execution, but its just a guess...
> thx,
> --oj.
>
duplicate RPC:Completed events in trace file
I've got several rows in which the colum values are the exact same. I
was guessing this might be parallel execution, but its just a guess...
thx,
--oj.
Hi
I have not seen duplicated events. What version of SQL Server are you using?
What columns/filters are using? Are you logging to screen/file or table?
John
"seraph" wrote:
> Has anyone ever seen duplicate RPC:Completed events in a trace file?
> I've got several rows in which the colum values are the exact same. I
> was guessing this might be parallel execution, but its just a guess...
> thx,
> --oj.
>
duplicate RPC:Completed events in trace file
I've got several rows in which the colum values are the exact same. I
was guessing this might be parallel execution, but its just a guess...
thx,
--oj.Hi
I have not seen duplicated events. What version of SQL Server are you using?
What columns/filters are using? Are you logging to screen/file or table?
John
"seraph" wrote:
> Has anyone ever seen duplicate RPC:Completed events in a trace file?
> I've got several rows in which the colum values are the exact same. I
> was guessing this might be parallel execution, but its just a guess...
> thx,
> --oj.
>
duplicate rows - how to?
I have first_name field and i want to display duplicated rows only, i mean when the same exact name was there more than one time, like John and John...
Code Snippet
select first_name
from MyTable
groupby first_name
havingcount(*)>1
|||Try:
select first_name
from dbo.t1
group by first_name
having count(*) > 1
AMB
|||Using SQL Server 2005,
Code Snippet
;With CTE
as
(
Select First_Name,Row_Number() OVER (Partition By First_Name Order By First_Name) RowId From Table
)
Select Distinct First_Name from CTE Where RowId > 1
Thursday, March 22, 2012
Duplicate Events
The nature of the event provider for my SQLNS application is to produce
exact duplicate rows into the event table. Obviously, I am not
interested in receiving duplicate notifications. What are some
strategies for having SQLNS produce one notification for several exact
rows being sent to the events table.
I have an event chronicle that retrieves distinct rows from the event
table and puts them into the chronicle. My thoughts were that I could
use the chronicle table in my matching statement. But the timing
doesn't seem to be working out. The matching is apparently done before
the chronicle is updated.
Any thoughts on strategies for having SQLNS produce one notification
for several exact rows being sent to the events table.
There is probably a more direct method to accomplish your goals. I'd suggest you really consider filtering the duplicate events in the event provider before they ever get to the events table.
However, if that's the route you want to take, the matching rule is
really just a T-SQL statement. Version 2.0 uses a UDF to create the
resultset while v2005 uses a new view to do the same. So you can try using a combination of the chronicle table with the distinct keyword to filter out the dups.
BTW - matching rules are processed in the following order:
- Event chronicle rules
- Subscription event rules
- Subscription scheduled rules
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)
Duplicate Events
The nature of the event provider for my SQLNS application is to produce
exact duplicate rows into the event table. Obviously, I am not
interested in receiving duplicate notifications. What are some
strategies for having SQLNS produce one notification for several exact
rows being sent to the events table.
I have an event chronicle that retrieves distinct rows from the event
table and puts them into the chronicle. My thoughts were that I could
use the chronicle table in my matching statement. But the timing
doesn't seem to be working out. The matching is apparently done before
the chronicle is updated.
Any thoughts on strategies for having SQLNS produce one notification
for several exact rows being sent to the events table.
There is probably a more direct method to accomplish your goals. I'd suggest you really consider filtering the duplicate events in the event provider before they ever get to the events table.
However, if that's the route you want to take, the matching rule is
really just a T-SQL statement. Version 2.0 uses a UDF to create the
resultset while v2005 uses a new view to do the same. So you can try using a combination of the chronicle table with the distinct keyword to filter out the dups.
BTW - matching rules are processed in the following order:
- Event chronicle rules
- Subscription event rules
- Subscription scheduled rules
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)
Duplicate Database
Server 2000; seems like it should be easy, but i'm stuck ...
Can anyone point me in the right direction on this ?
TIA
Liz
Liz wrote:
> I need to make an exact duplicate of a database on the same instance of SQL
> Server 2000; seems like it should be easy, but i'm stuck ...
> Can anyone point me in the right direction on this ?
> TIA
>
> Liz
>
Backup/restore, using the WITH MOVE option to create a new set of data
files.
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||In case you need more detailed information about Tracy's suggestion, see
this article:
Using WITH MOVE in a Restore
http://www.support.microsoft.com/?id=221465
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:456F4BDE.5030604@.realsqlguy.com...
> Liz wrote:
> Backup/restore, using the WITH MOVE option to create a new set of data
> files.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
|||"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:456F4BDE.5030604@.realsqlguy.com...
[vbcol=seagreen]
> Liz wrote:
> Backup/restore, using the WITH MOVE option to create a new set of data
> files.
sounds great ... but I don't see a "WITH MOVE" option in EM or in the T-SQL
docs; is this available on SQL 2000 ?
thanks ...
Liz
|||Yes, look up RESTORE in Books Online.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Liz" <liz@.tiredofspam.com> wrote in message
news:udImlbMFHHA.1232@.TK2MSFTNGP05.phx.gbl...
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
> news:456F4BDE.5030604@.realsqlguy.com...
>
>
> sounds great ... but I don't see a "WITH MOVE" option in EM or in the
> T-SQL docs; is this available on SQL 2000 ?
> thanks ...
> Liz
>
|||"Arnie Rowland" <arnie@.1568.com> wrote in message
news:OaT8oZMFHHA.4712@.TK2MSFTNGP04.phx.gbl...
> In case you need more detailed information about Tracy's suggestion, see
> this article:
> Using WITH MOVE in a Restore
> http://www.support.microsoft.com/?id=221465
Thanks Arnie, Tracy ... got it; didn't realize it was a RESTORE option at
first ..
L
|||From Query Analyzer,execute below:-
1. Using Restore filelistonly command identify the logical file names of the
database backup file
RESTORE FILELISTONLY from disk='c:\x.bak'
2. With the output of the above query use RESTORE database
RESTORE DATABASE <newdbname> from disk='c:\backup\x.bak'
WITH move 'logical_mdf_filename' to 'new physical name with path',
move 'logical_ldf_filename' to 'new physical log name with
Path'
Change the database name and file names based on the backup and database
name you have.
Thanks
Hari
"Liz" <liz@.tiredofspam.com> wrote in message
news:udImlbMFHHA.1232@.TK2MSFTNGP05.phx.gbl...
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
> news:456F4BDE.5030604@.realsqlguy.com...
>
>
> sounds great ... but I don't see a "WITH MOVE" option in EM or in the
> T-SQL docs; is this available on SQL 2000 ?
> thanks ...
> Liz
>
sql
Duplicate Database
Server 2000; seems like it should be easy, but i'm stuck ...
Can anyone point me in the right direction on this ?
TIA
LizLiz wrote:
> I need to make an exact duplicate of a database on the same instance of SQL
> Server 2000; seems like it should be easy, but i'm stuck ...
> Can anyone point me in the right direction on this ?
> TIA
>
> Liz
>
Backup/restore, using the WITH MOVE option to create a new set of data
files.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||In case you need more detailed information about Tracy's suggestion, see
this article:
Using WITH MOVE in a Restore
http://www.support.microsoft.com/?id=221465
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:456F4BDE.5030604@.realsqlguy.com...
> Liz wrote:
>> I need to make an exact duplicate of a database on the same instance of
>> SQL Server 2000; seems like it should be easy, but i'm stuck ...
>> Can anyone point me in the right direction on this ?
>> TIA
>>
>> Liz
>>
> Backup/restore, using the WITH MOVE option to create a new set of data
> files.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:456F4BDE.5030604@.realsqlguy.com...
> Liz wrote:
>> I need to make an exact duplicate of a database on the same instance of
>> SQL Server 2000; seems like it should be easy, but i'm stuck ...
>> Can anyone point me in the right direction on this ?
> Backup/restore, using the WITH MOVE option to create a new set of data
> files.
sounds great ... but I don't see a "WITH MOVE" option in EM or in the T-SQL
docs; is this available on SQL 2000 ?
thanks ...
Liz|||> sounds great ... but I don't see a "WITH MOVE" option in EM or in the T-SQL docs; is this
> available on SQL 2000 ?
Yes. It is indeed documented in BOL, RESTORE DATBASE. In EM restore dialog, you have it in the left
tab, where you can specify the desired physical filename for each file.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Liz" <liz@.tiredofspam.com> wrote in message news:udImlbMFHHA.1232@.TK2MSFTNGP05.phx.gbl...
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:456F4BDE.5030604@.realsqlguy.com...
>> Liz wrote:
>> I need to make an exact duplicate of a database on the same instance of SQL Server 2000; seems
>> like it should be easy, but i'm stuck ...
>> Can anyone point me in the right direction on this ?
>
>> Backup/restore, using the WITH MOVE option to create a new set of data files.
>
> sounds great ... but I don't see a "WITH MOVE" option in EM or in the T-SQL docs; is this
> available on SQL 2000 ?
> thanks ...
> Liz
>|||Yes, look up RESTORE in Books Online.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Liz" <liz@.tiredofspam.com> wrote in message
news:udImlbMFHHA.1232@.TK2MSFTNGP05.phx.gbl...
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
> news:456F4BDE.5030604@.realsqlguy.com...
>> Liz wrote:
>> I need to make an exact duplicate of a database on the same instance of
>> SQL Server 2000; seems like it should be easy, but i'm stuck ...
>> Can anyone point me in the right direction on this ?
>
>> Backup/restore, using the WITH MOVE option to create a new set of data
>> files.
>
> sounds great ... but I don't see a "WITH MOVE" option in EM or in the
> T-SQL docs; is this available on SQL 2000 ?
> thanks ...
> Liz
>|||"Arnie Rowland" <arnie@.1568.com> wrote in message
news:OaT8oZMFHHA.4712@.TK2MSFTNGP04.phx.gbl...
> In case you need more detailed information about Tracy's suggestion, see
> this article:
> Using WITH MOVE in a Restore
> http://www.support.microsoft.com/?id=221465
Thanks Arnie, Tracy ... got it; didn't realize it was a RESTORE option at
first ..
L|||From Query Analyzer,execute below:-
1. Using Restore filelistonly command identify the logical file names of the
database backup file
RESTORE FILELISTONLY from disk='c:\x.bak'
2. With the output of the above query use RESTORE database
RESTORE DATABASE <newdbname> from disk='c:\backup\x.bak'
WITH move 'logical_mdf_filename' to 'new physical name with path',
move 'logical_ldf_filename' to 'new physical log name with
Path'
Change the database name and file names based on the backup and database
name you have.
Thanks
Hari
"Liz" <liz@.tiredofspam.com> wrote in message
news:udImlbMFHHA.1232@.TK2MSFTNGP05.phx.gbl...
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
> news:456F4BDE.5030604@.realsqlguy.com...
>> Liz wrote:
>> I need to make an exact duplicate of a database on the same instance of
>> SQL Server 2000; seems like it should be easy, but i'm stuck ...
>> Can anyone point me in the right direction on this ?
>
>> Backup/restore, using the WITH MOVE option to create a new set of data
>> files.
>
> sounds great ... but I don't see a "WITH MOVE" option in EM or in the
> T-SQL docs; is this available on SQL 2000 ?
> thanks ...
> Liz
>
Duplicate Database
Server 2000; seems like it should be easy, but i'm stuck ...
Can anyone point me in the right direction on this ?
TIA
LizLiz wrote:
> I need to make an exact duplicate of a database on the same instance of SQ
L
> Server 2000; seems like it should be easy, but i'm stuck ...
> Can anyone point me in the right direction on this ?
> TIA
>
> Liz
>
Backup/restore, using the WITH MOVE option to create a new set of data
files.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||In case you need more detailed information about Tracy's suggestion, see
this article:
Using WITH MOVE in a Restore
http://www.support.microsoft.com/?id=221465
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:456F4BDE.5030604@.realsqlguy.com...
> Liz wrote:
> Backup/restore, using the WITH MOVE option to create a new set of data
> files.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:456F4BDE.5030604@.realsqlguy.com...
> Liz wrote:
[vbcol=seagreen]
> Backup/restore, using the WITH MOVE option to create a new set of data
> files.
sounds great ... but I don't see a "WITH MOVE" option in EM or in the T-SQL
docs; is this available on SQL 2000 ?
thanks ...
Liz|||> sounds great ... but I don't see a "WITH MOVE" option in EM or in the T-SQL docs; is this
> available on SQL 2000 ?
Yes. It is indeed documented in BOL, RESTORE DATBASE. In EM restore dialog,
you have it in the left
tab, where you can specify the desired physical filename for each file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Liz" <liz@.tiredofspam.com> wrote in message news:udImlbMFHHA.1232@.TK2MSFTNGP05.phx.gbl...[v
bcol=seagreen]
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:456F4BDE.503
0604@.realsqlguy.com...
>
>
>
> sounds great ... but I don't see a "WITH MOVE" option in EM or in the T-SQ
L docs; is this
> available on SQL 2000 ?
> thanks ...
> Liz
>[/vbcol]|||Yes, look up RESTORE in Books Online.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Liz" <liz@.tiredofspam.com> wrote in message
news:udImlbMFHHA.1232@.TK2MSFTNGP05.phx.gbl...
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
> news:456F4BDE.5030604@.realsqlguy.com...
>
>
>
> sounds great ... but I don't see a "WITH MOVE" option in EM or in the
> T-SQL docs; is this available on SQL 2000 ?
> thanks ...
> Liz
>|||"Arnie Rowland" <arnie@.1568.com> wrote in message
news:OaT8oZMFHHA.4712@.TK2MSFTNGP04.phx.gbl...
> In case you need more detailed information about Tracy's suggestion, see
> this article:
> Using WITH MOVE in a Restore
> http://www.support.microsoft.com/?id=221465
Thanks Arnie, Tracy ... got it; didn't realize it was a RESTORE option at
first ..
L|||From Query Analyzer,execute below:-
1. Using Restore filelistonly command identify the logical file names of the
database backup file
RESTORE FILELISTONLY from disk='c:\x.bak'
2. With the output of the above query use RESTORE database
RESTORE DATABASE <newdbname> from disk='c:\backup\x.bak'
WITH move 'logical_mdf_filename' to 'new physical name with path',
move 'logical_ldf_filename' to 'new physical log name with
Path'
Change the database name and file names based on the backup and database
name you have.
Thanks
Hari
"Liz" <liz@.tiredofspam.com> wrote in message
news:udImlbMFHHA.1232@.TK2MSFTNGP05.phx.gbl...
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
> news:456F4BDE.5030604@.realsqlguy.com...
>
>
>
> sounds great ... but I don't see a "WITH MOVE" option in EM or in the
> T-SQL docs; is this available on SQL 2000 ?
> thanks ...
> Liz
>