Hello all,
Windows 2000 Log shipping Qu.
I have successfully set up log shipping but would like the monitor server to
send an email if the servers become out of sync. It seems that the default
is only to log the event in the app log does anyone know how to set up an
email alert?
Thanks in advance foir the help, Simon.If you do not have SQL mail setup, one easy alternative is to use
xp_smtp_mail. All the required information you needed regarding this can be
found at:
http://www.sqldev.net/xp/xpsmtp.htm
Anith|||Thanks for the advice - I can use SQL mail but I'm not sure how to fire the
event:
Do the monitor server jobs (listed below) fail when there is a problem or do
they simply log the event in app log?
Log Shipping Alert Job - Backup &
Log Shipping Alert Job - Restore
Thanks again.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:Olz9OPbHFHA.2420@.TK2MSFTNGP14.phx.gbl...
> If you do not have SQL mail setup, one easy alternative is to use
> xp_smtp_mail. All the required information you needed regarding this can
> be found at:
> http://www.sqldev.net/xp/xpsmtp.htm
> --
> Anith
>|||In your job, create a new step ( say step 2 ) with the functionality to
email required addressee. On the initial step, set the "on failure action"
to goto step 2. Make sure set the "on success action" as Quit with success.
Anith
Showing posts with label monitor. Show all posts
Showing posts with label monitor. Show all posts
Sunday, March 11, 2012
email alert log shipping out of sync?
Hello all,
Windows 2000 Log shipping Qu.
I have successfully set up log shipping but would like the monitor server to
send an email if the servers become out of sync. It seems that the default
is only to log the event in the app log does anyone know how to set up an
email alert?
Thanks in advance foir the help, Simon.
If you do not have SQL mail setup, one easy alternative is to use
xp_smtp_mail. All the required information you needed regarding this can be
found at:
http://www.sqldev.net/xp/xpsmtp.htm
Anith
|||Thanks for the advice - I can use SQL mail but I'm not sure how to fire the
event:
Do the monitor server jobs (listed below) fail when there is a problem or do
they simply log the event in app log?
Log Shipping Alert Job - Backup &
Log Shipping Alert Job - Restore
Thanks again.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:Olz9OPbHFHA.2420@.TK2MSFTNGP14.phx.gbl...
> If you do not have SQL mail setup, one easy alternative is to use
> xp_smtp_mail. All the required information you needed regarding this can
> be found at:
> http://www.sqldev.net/xp/xpsmtp.htm
> --
> Anith
>
|||In your job, create a new step ( say step 2 ) with the functionality to
email required addressee. On the initial step, set the "on failure action"
to goto step 2. Make sure set the "on success action" as Quit with success.
Anith
Windows 2000 Log shipping Qu.
I have successfully set up log shipping but would like the monitor server to
send an email if the servers become out of sync. It seems that the default
is only to log the event in the app log does anyone know how to set up an
email alert?
Thanks in advance foir the help, Simon.
If you do not have SQL mail setup, one easy alternative is to use
xp_smtp_mail. All the required information you needed regarding this can be
found at:
http://www.sqldev.net/xp/xpsmtp.htm
Anith
|||Thanks for the advice - I can use SQL mail but I'm not sure how to fire the
event:
Do the monitor server jobs (listed below) fail when there is a problem or do
they simply log the event in app log?
Log Shipping Alert Job - Backup &
Log Shipping Alert Job - Restore
Thanks again.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:Olz9OPbHFHA.2420@.TK2MSFTNGP14.phx.gbl...
> If you do not have SQL mail setup, one easy alternative is to use
> xp_smtp_mail. All the required information you needed regarding this can
> be found at:
> http://www.sqldev.net/xp/xpsmtp.htm
> --
> Anith
>
|||In your job, create a new step ( say step 2 ) with the functionality to
email required addressee. On the initial step, set the "on failure action"
to goto step 2. Make sure set the "on success action" as Quit with success.
Anith
email alert log shipping out of sync?
Hello all,
Windows 2000 Log shipping Qu.
I have successfully set up log shipping but would like the monitor server to
send an email if the servers become out of sync. It seems that the default
is only to log the event in the app log does anyone know how to set up an
email alert?
Thanks in advance foir the help, Simon.If you do not have SQL mail setup, one easy alternative is to use
xp_smtp_mail. All the required information you needed regarding this can be
found at:
http://www.sqldev.net/xp/xpsmtp.htm
--
Anith|||Thanks for the advice - I can use SQL mail but I'm not sure how to fire the
event:
Do the monitor server jobs (listed below) fail when there is a problem or do
they simply log the event in app log?
Log Shipping Alert Job - Backup &
Log Shipping Alert Job - Restore
Thanks again.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:Olz9OPbHFHA.2420@.TK2MSFTNGP14.phx.gbl...
> If you do not have SQL mail setup, one easy alternative is to use
> xp_smtp_mail. All the required information you needed regarding this can
> be found at:
> http://www.sqldev.net/xp/xpsmtp.htm
> --
> Anith
>|||In your job, create a new step ( say step 2 ) with the functionality to
email required addressee. On the initial step, set the "on failure action"
to goto step 2. Make sure set the "on success action" as Quit with success.
--
Anith
Windows 2000 Log shipping Qu.
I have successfully set up log shipping but would like the monitor server to
send an email if the servers become out of sync. It seems that the default
is only to log the event in the app log does anyone know how to set up an
email alert?
Thanks in advance foir the help, Simon.If you do not have SQL mail setup, one easy alternative is to use
xp_smtp_mail. All the required information you needed regarding this can be
found at:
http://www.sqldev.net/xp/xpsmtp.htm
--
Anith|||Thanks for the advice - I can use SQL mail but I'm not sure how to fire the
event:
Do the monitor server jobs (listed below) fail when there is a problem or do
they simply log the event in app log?
Log Shipping Alert Job - Backup &
Log Shipping Alert Job - Restore
Thanks again.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:Olz9OPbHFHA.2420@.TK2MSFTNGP14.phx.gbl...
> If you do not have SQL mail setup, one easy alternative is to use
> xp_smtp_mail. All the required information you needed regarding this can
> be found at:
> http://www.sqldev.net/xp/xpsmtp.htm
> --
> Anith
>|||In your job, create a new step ( say step 2 ) with the functionality to
email required addressee. On the initial step, set the "on failure action"
to goto step 2. Make sure set the "on success action" as Quit with success.
--
Anith
Sunday, February 19, 2012
efficiently creating random numbers in very large table
Hello,
I need to sample data in a very large table in SQL Server 2000 (a gazillion rows of Performance Monitor statitics).
I'd like to take the top 5%, for instance, based upon a column containing random numbers.
Can anyone suggest a highly efficient method of populating a column with random numbers.
Thanks in advance.
Rodselect TOP 5 PERCENT * from [YourTable] order by newid()|||select TOP 5 PERCENT * from [YourTable] order by newid()
Thank you, I'll give that a go.
Regards,
Rod|||that won't populate your table with any random numbers obviously.
it will give you a random 5% slice of the table. a different slice each time you run it.|||Thanks, Good point; maybe I can have another column to set a bit , so that I can reproduce. I'll have to test performance, perhaps someone has some experience with this or have a different technique to propose. Thank you.
Rod|||If you really want a column of random values, then just create a GUID column with a default of NEWID(). But this won't give you a random sample every time, of course.|||If you really want a column of random values, then just create a GUID column with a default of NEWID(). But this won't give you a random sample every time, of course.
That's ok blindman, I just neede something that's efficient in terms populating random values. Regards, Rod|||just create a GUID column with a default of NEWID()
Ofcourse this works but if your table is really that big beware of the time it takes to alter the table! SQL Server has to expand each record so numerous page splits will occur, indexes will have to be rebuild, etc, etc. This could take a couple of hours.|||Ofcourse this works but if your table is really that big beware of the time it takes to alter the table! SQL Server has to expand each record so numerous page splits will occur, indexes will have to be rebuild, etc, etc. This could take a couple of hours.
...ugh.. Thanks. There does not seem to be a really efficient way of doing this...
Thanks for you input. Rod|||how many rows is the table?
also, you can generate random numbers in sql using rand() if you don't like guids. if a random number from 0-255 is sufficient you could store it in a tinyint and less page splits would result.
this code ran in 31 sec on my dev box. not great, but it is what it is:
set nocount on
declare @.t table (RandomColumn tinyint)
declare @.i int
set @.i=0
while @.i < 1000000
begin
insert into @.t select round(rand() * 255, 0)
set @.i = @.i + 1
end|||how many rows is the table?
also, you can generate random numbers in sql using rand() if you don't like guids. if a random number from 0-255 is sufficient you could store it in a tinyint and less page splits would result.
this code ran in 31 sec on my dev box. not great, but it is what it is:
set nocount on
declare @.t table (RandomColumn tinyint)
declare @.i int
set @.i=0
while @.i < 1000000
begin
insert into @.t select round(rand() * 255, 0)
set @.i = @.i + 1
end
That maybe ok, you're right, not great but maybe we can live that. Thanks for your code.
Regards,
Rod
I need to sample data in a very large table in SQL Server 2000 (a gazillion rows of Performance Monitor statitics).
I'd like to take the top 5%, for instance, based upon a column containing random numbers.
Can anyone suggest a highly efficient method of populating a column with random numbers.
Thanks in advance.
Rodselect TOP 5 PERCENT * from [YourTable] order by newid()|||select TOP 5 PERCENT * from [YourTable] order by newid()
Thank you, I'll give that a go.
Regards,
Rod|||that won't populate your table with any random numbers obviously.
it will give you a random 5% slice of the table. a different slice each time you run it.|||Thanks, Good point; maybe I can have another column to set a bit , so that I can reproduce. I'll have to test performance, perhaps someone has some experience with this or have a different technique to propose. Thank you.
Rod|||If you really want a column of random values, then just create a GUID column with a default of NEWID(). But this won't give you a random sample every time, of course.|||If you really want a column of random values, then just create a GUID column with a default of NEWID(). But this won't give you a random sample every time, of course.
That's ok blindman, I just neede something that's efficient in terms populating random values. Regards, Rod|||just create a GUID column with a default of NEWID()
Ofcourse this works but if your table is really that big beware of the time it takes to alter the table! SQL Server has to expand each record so numerous page splits will occur, indexes will have to be rebuild, etc, etc. This could take a couple of hours.|||Ofcourse this works but if your table is really that big beware of the time it takes to alter the table! SQL Server has to expand each record so numerous page splits will occur, indexes will have to be rebuild, etc, etc. This could take a couple of hours.
...ugh.. Thanks. There does not seem to be a really efficient way of doing this...
Thanks for you input. Rod|||how many rows is the table?
also, you can generate random numbers in sql using rand() if you don't like guids. if a random number from 0-255 is sufficient you could store it in a tinyint and less page splits would result.
this code ran in 31 sec on my dev box. not great, but it is what it is:
set nocount on
declare @.t table (RandomColumn tinyint)
declare @.i int
set @.i=0
while @.i < 1000000
begin
insert into @.t select round(rand() * 255, 0)
set @.i = @.i + 1
end|||how many rows is the table?
also, you can generate random numbers in sql using rand() if you don't like guids. if a random number from 0-255 is sufficient you could store it in a tinyint and less page splits would result.
this code ran in 31 sec on my dev box. not great, but it is what it is:
set nocount on
declare @.t table (RandomColumn tinyint)
declare @.i int
set @.i=0
while @.i < 1000000
begin
insert into @.t select round(rand() * 255, 0)
set @.i = @.i + 1
end
That maybe ok, you're right, not great but maybe we can live that. Thanks for your code.
Regards,
Rod
efficient SQL profiling
Hi,
Is there a way to efficiently monitor SQL performance using SQL Profiler,
and my meaning is to see distinct SQL query sent to server (by ignoring
parameter values sent with the queries)
this mean that query like
select * from users where user_id = 10
and
select * from users where user_id = 20
will be shown as the same query counted 2 times, and this way see which
query is performed mostly on the server, and priorities it's performance
tuning.
creative suggestions invited.
thanx.If it is simply the where clause that you are trying to eliminate, then why
not log all your queries to a SQL table and then do a select distinct from
the table, and get the substring of the query that does not include the
where clause?
"z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message
news:Od5S7Gh%23DHA.3032@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is there a way to efficiently monitor SQL performance using SQL Profiler,
> and my meaning is to see distinct SQL query sent to server (by ignoring
> parameter values sent with the queries)
> this mean that query like
> select * from users where user_id = 10
> and
> select * from users where user_id = 20
> will be shown as the same query counted 2 times, and this way see which
> query is performed mostly on the server, and priorities it's performance
> tuning.
> creative suggestions invited.
> thanx.
>
>|||Thanx,
2 points:
1. how do i log all my queries to the database in an encapsulated way?
1.1 can i also log this way the time it took to execute?
2. my buttleneck might also be a execute statement - well, this will go also
with your suggestion, just truncated before the starting '('.
"Aaron Relph" <x@.x.com> wrote in message
news:OAEHgVh%23DHA.3436@.tk2msftngp13.phx.gbl...
> If it is simply the where clause that you are trying to eliminate, then
why
> not log all your queries to a SQL table and then do a select distinct from
> the table, and get the substring of the query that does not include the
> where clause?
> "z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message
> news:Od5S7Gh%23DHA.3032@.TK2MSFTNGP10.phx.gbl...
Profiler,
>|||This may help -
http://www.sql-server-performance.c...ofiler_tips.asp
Ray Higdon MCSE, MCDBA, CCNA
--
"z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message
news:OQuACAi%23DHA.3292@.TK2MSFTNGP11.phx.gbl...
> Thanx,
> 2 points:
> 1. how do i log all my queries to the database in an encapsulated way?
> 1.1 can i also log this way the time it took to execute?
> 2. my buttleneck might also be a execute statement - well, this will go
also
> with your suggestion, just truncated before the starting '('.
>
>
> "Aaron Relph" <x@.x.com> wrote in message
> news:OAEHgVh%23DHA.3436@.tk2msftngp13.phx.gbl...
> why
from
> Profiler,
ignoring
which
performance
>
Is there a way to efficiently monitor SQL performance using SQL Profiler,
and my meaning is to see distinct SQL query sent to server (by ignoring
parameter values sent with the queries)
this mean that query like
select * from users where user_id = 10
and
select * from users where user_id = 20
will be shown as the same query counted 2 times, and this way see which
query is performed mostly on the server, and priorities it's performance
tuning.
creative suggestions invited.
thanx.If it is simply the where clause that you are trying to eliminate, then why
not log all your queries to a SQL table and then do a select distinct from
the table, and get the substring of the query that does not include the
where clause?
"z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message
news:Od5S7Gh%23DHA.3032@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is there a way to efficiently monitor SQL performance using SQL Profiler,
> and my meaning is to see distinct SQL query sent to server (by ignoring
> parameter values sent with the queries)
> this mean that query like
> select * from users where user_id = 10
> and
> select * from users where user_id = 20
> will be shown as the same query counted 2 times, and this way see which
> query is performed mostly on the server, and priorities it's performance
> tuning.
> creative suggestions invited.
> thanx.
>
>|||Thanx,
2 points:
1. how do i log all my queries to the database in an encapsulated way?
1.1 can i also log this way the time it took to execute?
2. my buttleneck might also be a execute statement - well, this will go also
with your suggestion, just truncated before the starting '('.
"Aaron Relph" <x@.x.com> wrote in message
news:OAEHgVh%23DHA.3436@.tk2msftngp13.phx.gbl...
> If it is simply the where clause that you are trying to eliminate, then
why
> not log all your queries to a SQL table and then do a select distinct from
> the table, and get the substring of the query that does not include the
> where clause?
> "z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message
> news:Od5S7Gh%23DHA.3032@.TK2MSFTNGP10.phx.gbl...
Profiler,
>|||This may help -
http://www.sql-server-performance.c...ofiler_tips.asp
Ray Higdon MCSE, MCDBA, CCNA
--
"z. f." <zigi@.info-scopeREMSPAM.co.il> wrote in message
news:OQuACAi%23DHA.3292@.TK2MSFTNGP11.phx.gbl...
> Thanx,
> 2 points:
> 1. how do i log all my queries to the database in an encapsulated way?
> 1.1 can i also log this way the time it took to execute?
> 2. my buttleneck might also be a execute statement - well, this will go
also
> with your suggestion, just truncated before the starting '('.
>
>
> "Aaron Relph" <x@.x.com> wrote in message
> news:OAEHgVh%23DHA.3436@.tk2msftngp13.phx.gbl...
> why
from
> Profiler,
ignoring
which
performance
>
Subscribe to:
Posts (Atom)