Friday, March 30, 2012
raise message from Update Trigger from External App
I can raise this message from an Update Trigger in Query Analyzer when I
update the recordID field of my table:
RAISERROR ('this is a test message from SubDetail Update 7', 16, 10)
Is it possible to raise this message from an external app? How is this
achieved? Actually, I am sure this is possible because I remember doing it.
I just can't remember what I did because I did not document it.
Thanks,
RichWhat is this "external app"? An application that you write yourself? A TSQL
error (which is what you
raise using RAISERROR) is returned to the client application. The client app
lications is connected
to the database using an API, like ADO.NET. And, sure, you can have your dat
abase application
connect to SQL Server and issue a RAISERROR command, and have that error mes
sage be returned to the
same app, but that sounds a bit ... meaningless. If you give us more informa
tion, we can probably
give some suggestion.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:54A80BEF-6285-4F6A-8B60-F06007C1BDEF@.microsoft.com...
> Hello,
> I can raise this message from an Update Trigger in Query Analyzer when I
> update the recordID field of my table:
> RAISERROR ('this is a test message from SubDetail Update 7', 16, 10)
> Is it possible to raise this message from an external app? How is this
> achieved? Actually, I am sure this is possible because I remember doing i
t.
> I just can't remember what I did because I did not document it.
> Thanks,
> Rich|||The external app in this case is an Access ADP. I had to modify a trigger a
few months ago, and I added a raiseerror message at the end to see my result
s
in QA - not error results - just checking what parameter was being used. I
accidentally left the raiseerror message in the trigger, and then I got a
call from an End User stating that this message was coming up all of a sudde
n
when she made updates to the table.
I found the table and reactivated the raiseerror message and I get it when I
updaet a field. The only thing I noticed is that the field I update in this
table (the master table) is not a key field. In the Detail table when I
update the RecordID field this action does not raise the message like in the
Master table. I guess my question is if this is something fundamental that
I
am missing or is it something that I need to dig around to see what is going
on?
"Tibor Karaszi" wrote:
> What is this "external app"? An application that you write yourself? A TSQ
L error (which is what you
> raise using RAISERROR) is returned to the client application. The client a
pplications is connected
> to the database using an API, like ADO.NET. And, sure, you can have your d
atabase application
> connect to SQL Server and issue a RAISERROR command, and have that error m
essage be returned to the
> same app, but that sounds a bit ... meaningless. If you give us more infor
mation, we can probably
> give some suggestion.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:54A80BEF-6285-4F6A-8B60-F06007C1BDEF@.microsoft.com...
>|||Well, I was able to raise that message if I physically update the RecordID -
meaning I go to the live table in the Access ADP which is the same thing tha
t
was going on with the Master table - where the End user was physically
writing to the table through a form. But if I update the table
programmatically from the ADP, then the message does not come up.
While I am at it, I want to alter/replace my raiseerror message. I used the
sp_addmessage sp. Since my message already exists as 50001, I don't want to
add another message. I want to alter this one. But I get an error message
in QA saying that I need to use REPLACE to alter the message for ID 50001.
I
don't know the syntax for this. I have tried variations such as:
USE master
EXEC sp_addmessage 50001, 16,
select replace('This is a test custome message', 'custome', 'custom')
and placing REplace in other locations with no success. Any suggestions how
to do this correctly would be greatly appreciated.
"Rich" wrote:
> The external app in this case is an Access ADP. I had to modify a trigger
a
> few months ago, and I added a raiseerror message at the end to see my resu
lts
> in QA - not error results - just checking what parameter was being used.
I
> accidentally left the raiseerror message in the trigger, and then I got a
> call from an End User stating that this message was coming up all of a sud
den
> when she made updates to the table.
> I found the table and reactivated the raiseerror message and I get it when
I
> updaet a field. The only thing I noticed is that the field I update in th
is
> table (the master table) is not a key field. In the Detail table when I
> update the RecordID field this action does not raise the message like in t
he
> Master table. I guess my question is if this is something fundamental tha
t I
> am missing or is it something that I need to dig around to see what is goi
ng
> on?
> "Tibor Karaszi" wrote:
>|||You more or less lost me on the logic part, but from a technical viewpoint:
If you see the error when executing a statement which will result in the tri
gger being called using
TSQL but not when using ADP, then probably ADP is masking that error and you
should check with an
Access group to see how you can rectify this behavior in Access. Use Profile
r to catch the TSQL
command being submitted from Access just to make sure of what is happening o
n the server level.
Here is how you replace a message text:
EXEC sp_addmessage 50001, 16,
N'Old message text'
GO
EXEC sp_addmessage 50001, 16,
N'NEW message text', @.replace = 'replace'
GO
RAISERROR(50001, -1, 1)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:4B003260-9016-4FE1-B324-F48A24007CD7@.microsoft.com...
> Well, I was able to raise that message if I physically update the RecordID
-
> meaning I go to the live table in the Access ADP which is the same thing t
hat
> was going on with the Master table - where the End user was physically
> writing to the table through a form. But if I update the table
> programmatically from the ADP, then the message does not come up.
> While I am at it, I want to alter/replace my raiseerror message. I used t
he
> sp_addmessage sp. Since my message already exists as 50001, I don't want
to
> add another message. I want to alter this one. But I get an error messag
e
> in QA saying that I need to use REPLACE to alter the message for ID 50001.
I
> don't know the syntax for this. I have tried variations such as:
> USE master
> EXEC sp_addmessage 50001, 16,
> select replace('This is a test custome message', 'custome', 'custom')
> and placing REplace in other locations with no success. Any suggestions h
ow
> to do this correctly would be greatly appreciated.
>
> "Rich" wrote:
>|||Thank you for explaining how to replace a custome message.
"Tibor Karaszi" wrote:
> You more or less lost me on the logic part, but from a technical viewpoint
:
> If you see the error when executing a statement which will result in the t
rigger being called using
> TSQL but not when using ADP, then probably ADP is masking that error and y
ou should check with an
> Access group to see how you can rectify this behavior in Access. Use Profi
ler to catch the TSQL
> command being submitted from Access just to make sure of what is happening
on the server level.
> Here is how you replace a message text:
> EXEC sp_addmessage 50001, 16,
> N'Old message text'
> GO
> EXEC sp_addmessage 50001, 16,
> N'NEW message text', @.replace = 'replace'
> GO
> RAISERROR(50001, -1, 1)
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:4B003260-9016-4FE1-B324-F48A24007CD7@.microsoft.com...
>
Wednesday, March 28, 2012
RAID 10 vs. RAID 5 question
the data of the SQL server, not tran logs, tempdb's etc.
Database Type is OLTP with more then 30% writes then reads
This is my question:
I understand more spindles are better, and I understand RAID 10 is faster
for writes then a RAID5 configuration. Plus both configurations will give me
enough HD space. So on with the question.
Should i use RAID 10 or RAID5?
RAID 10 would give be theoretically faster writes and great protection, but
gives me only 5 disks to write to simultaneously.
RAID 5 gives me around 9 disks but is known to be slower due to the
overhead.
Is the RAID5 really that much slower that it would hinder performance
compared to a RAID 10 with only 5 disks?
So what do you guys think?
-King
yes.
go RAID 1+0
If you have time you can test this with a handful of IOStress test
utilities.
you could also talk directly to your vendor.
As I learned today, you will also want to maximize the WRITE Cache on the
RAID Controller(s).
Cheers
Greg Jackson
PDX, Oregon
|||Hi
Where are the transaction logs going? They are as critical to the Db as the
data files.
RAID-10 wins hands down. RAID-5 has just too much overhead for the parity.
From a safety perspective, on RAID-5, you loose 2 drives, bye bye data.
RAID -10 can lose half it's drives, as long as it is never both pairs of a
mirror.
So performance wins.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
> I have an external RAID with 10 36GB 15K drives. These drives are only
for
> the data of the SQL server, not tran logs, tempdb's etc.
> Database Type is OLTP with more then 30% writes then reads
> This is my question:
> I understand more spindles are better, and I understand RAID 10 is faster
> for writes then a RAID5 configuration. Plus both configurations will give
me
> enough HD space. So on with the question.
> Should i use RAID 10 or RAID5?
> RAID 10 would give be theoretically faster writes and great protection,
but
> gives me only 5 disks to write to simultaneously.
> RAID 5 gives me around 9 disks but is known to be slower due to the
> overhead.
> Is the RAID5 really that much slower that it would hinder performance
> compared to a RAID 10 with only 5 disks?
> So what do you guys think?
>
> -King
>
|||Hi
Yes, have write cache, as long as the RAID card has battery backup. If not,
kiss your data goodbye as you will have some decent corruption.
For us, data security over performance, so write caching is off.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:#62vk86EFHA.1264@.TK2MSFTNGP12.phx.gbl...
> yes.
> go RAID 1+0
> If you have time you can test this with a handful of IOStress test
> utilities.
> you could also talk directly to your vendor.
> As I learned today, you will also want to maximize the WRITE Cache on the
> RAID Controller(s).
>
> Cheers
> Greg Jackson
> PDX, Oregon
>
|||yes....HEAVENS YES.
One needs "battery backed" Cache.
GAJ
|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%23qs9yC7EFHA.2540@.TK2MSFTNGP09.phx.gbl...
> Hi
> Yes, have write cache, as long as the RAID card has battery backup. If
not,
> kiss your data goodbye as you will have some decent corruption.
>
Yes we have a 72-hour backup on all RAID controllers
[vbcol=seagreen]
> For us, data security over performance, so write caching is off.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
> news:#62vk86EFHA.1264@.TK2MSFTNGP12.phx.gbl...
the
>
|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:e4EdmB7EFHA.4004@.tk2msftngp13.phx.gbl...
> Hi
> Where are the transaction logs going? They are as critical to the Db as
the
> data files.
> RAID-10 wins hands down. RAID-5 has just too much overhead for the parity.
> From a safety perspective, on RAID-5, you loose 2 drives, bye bye data.
> RAID -10 can lose half it's drives, as long as it is never both pairs of a
> mirror.
> So performance wins.
Mike,
Thanks! Thats what i thought.. but what puzzled me was the spindols. Since
the RAID5 configuration would have more drives to spread the write acrossed
then the RAID 1+0 i wasn't sure if it mattered. Keep in mind i haven't got
the hardware yet... so no testing has been done. and yes i will do testing.
thanks for your input.
-King
[vbcol=seagreen]
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
> news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
> for
faster[vbcol=seagreen]
give
> me
> but
>
|||In a Raid 1+0 you can't look at it as only x many drives to write to. In
your case you 10 drives that are configured as such. 5 Mirrored pairs that
are striped in a Raid 0 configuration. Yes that means you have to split the
data 5 ways vs. 9 for the Raid 5 but each split goes to a mirrored pair. The
mirrored pair has the option to read from one disk and write to the other,
write to both, read from both etc. It can be smart in how it reads and
writes to the mirrored pair. That plus the fact it doe not have to
calculate parity is a fast combination.
Andrew J. Kelly SQL MVP
"news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
news:%23qHC657EFHA.3672@.TK2MSFTNGP14.phx.gbl...
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:e4EdmB7EFHA.4004@.tk2msftngp13.phx.gbl...
> the
> Mike,
> Thanks! Thats what i thought.. but what puzzled me was the spindols.
> Since
> the RAID5 configuration would have more drives to spread the write
> acrossed
> then the RAID 1+0 i wasn't sure if it mattered. Keep in mind i haven't
> got
> the hardware yet... so no testing has been done. and yes i will do
> testing.
> thanks for your input.
> -King
>
> faster
> give
>
|||This website has great details and arguments why you should not use RAID 5
for a RDBMS implementation
http://www.baarf.com/
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
>I have an external RAID with 10 36GB 15K drives. These drives are only for
> the data of the SQL server, not tran logs, tempdb's etc.
> Database Type is OLTP with more then 30% writes then reads
> This is my question:
> I understand more spindles are better, and I understand RAID 10 is faster
> for writes then a RAID5 configuration. Plus both configurations will give
> me
> enough HD space. So on with the question.
> Should i use RAID 10 or RAID5?
> RAID 10 would give be theoretically faster writes and great protection,
> but
> gives me only 5 disks to write to simultaneously.
> RAID 5 gives me around 9 disks but is known to be slower due to the
> overhead.
> Is the RAID5 really that much slower that it would hinder performance
> compared to a RAID 10 with only 5 disks?
> So what do you guys think?
>
> -King
>
RAID 10 vs. RAID 5 question
the data of the SQL server, not tran logs, tempdb's etc.
Database Type is OLTP with more then 30% writes then reads
This is my question:
I understand more spindles are better, and I understand RAID 10 is faster
for writes then a RAID5 configuration. Plus both configurations will give me
enough HD space. So on with the question.
Should i use RAID 10 or RAID5?
RAID 10 would give be theoretically faster writes and great protection, but
gives me only 5 disks to write to simultaneously.
RAID 5 gives me around 9 disks but is known to be slower due to the
overhead.
Is the RAID5 really that much slower that it would hinder performance
compared to a RAID 10 with only 5 disks?
So what do you guys think?
-Kingyes.
go RAID 1+0
If you have time you can test this with a handful of IOStress test
utilities.
you could also talk directly to your vendor.
As I learned today, you will also want to maximize the WRITE Cache on the
RAID Controller(s).
Cheers
Greg Jackson
PDX, Oregon|||Hi
Where are the transaction logs going? They are as critical to the Db as the
data files.
RAID-10 wins hands down. RAID-5 has just too much overhead for the parity.
From a safety perspective, on RAID-5, you loose 2 drives, bye bye data.
RAID -10 can lose half it's drives, as long as it is never both pairs of a
mirror.
So performance wins.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
> I have an external RAID with 10 36GB 15K drives. These drives are only
for
> the data of the SQL server, not tran logs, tempdb's etc.
> Database Type is OLTP with more then 30% writes then reads
> This is my question:
> I understand more spindles are better, and I understand RAID 10 is faster
> for writes then a RAID5 configuration. Plus both configurations will give
me
> enough HD space. So on with the question.
> Should i use RAID 10 or RAID5?
> RAID 10 would give be theoretically faster writes and great protection,
but
> gives me only 5 disks to write to simultaneously.
> RAID 5 gives me around 9 disks but is known to be slower due to the
> overhead.
> Is the RAID5 really that much slower that it would hinder performance
> compared to a RAID 10 with only 5 disks?
> So what do you guys think?
>
> -King
>|||Hi
Yes, have write cache, as long as the RAID card has battery backup. If not,
kiss your data goodbye as you will have some decent corruption.
For us, data security over performance, so write caching is off.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:#62vk86EFHA.1264@.TK2MSFTNGP12.phx.gbl...
> yes.
> go RAID 1+0
> If you have time you can test this with a handful of IOStress test
> utilities.
> you could also talk directly to your vendor.
> As I learned today, you will also want to maximize the WRITE Cache on the
> RAID Controller(s).
>
> Cheers
> Greg Jackson
> PDX, Oregon
>|||yes....HEAVENS YES.
One needs "battery backed" Cache.
GAJ|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%23qs9yC7EFHA.2540@.TK2MSFTNGP09.phx.gbl...
> Hi
> Yes, have write cache, as long as the RAID card has battery backup. If
not,
> kiss your data goodbye as you will have some decent corruption.
>
Yes we have a 72-hour backup on all RAID controllers
> For us, data security over performance, so write caching is off.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
> news:#62vk86EFHA.1264@.TK2MSFTNGP12.phx.gbl...
the[vbcol=seagreen]
>|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:e4EdmB7EFHA.4004@.tk2msftngp13.phx.gbl...
> Hi
> Where are the transaction logs going? They are as critical to the Db as
the
> data files.
> RAID-10 wins hands down. RAID-5 has just too much overhead for the parity.
> From a safety perspective, on RAID-5, you loose 2 drives, bye bye data.
> RAID -10 can lose half it's drives, as long as it is never both pairs of a
> mirror.
> So performance wins.
Mike,
Thanks! Thats what i thought.. but what puzzled me was the spindols. Since
the RAID5 configuration would have more drives to spread the write acrossed
then the RAID 1+0 i wasn't sure if it mattered. Keep in mind i haven't got
the hardware yet... so no testing has been done. and yes i will do testing.
thanks for your input.
-King
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
> news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
> for
faster[vbcol=seagreen]
give[vbcol=seagreen]
> me
> but
>|||In a Raid 1+0 you can't look at it as only x many drives to write to. In
your case you 10 drives that are configured as such. 5 Mirrored pairs that
are striped in a Raid 0 configuration. Yes that means you have to split the
data 5 ways vs. 9 for the Raid 5 but each split goes to a mirrored pair. The
mirrored pair has the option to read from one disk and write to the other,
write to both, read from both etc. It can be smart in how it reads and
writes to the mirrored pair. That plus the fact it doe not have to
calculate parity is a fast combination.
Andrew J. Kelly SQL MVP
"news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
news:%23qHC657EFHA.3672@.TK2MSFTNGP14.phx.gbl...
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:e4EdmB7EFHA.4004@.tk2msftngp13.phx.gbl...
> the
> Mike,
> Thanks! Thats what i thought.. but what puzzled me was the spindols.
> Since
> the RAID5 configuration would have more drives to spread the write
> acrossed
> then the RAID 1+0 i wasn't sure if it mattered. Keep in mind i haven't
> got
> the hardware yet... so no testing has been done. and yes i will do
> testing.
> thanks for your input.
> -King
>
> faster
> give
>|||This website has great details and arguments why you should not use RAID 5
for a RDBMS implementation
http://www.baarf.com/
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
>I have an external RAID with 10 36GB 15K drives. These drives are only for
> the data of the SQL server, not tran logs, tempdb's etc.
> Database Type is OLTP with more then 30% writes then reads
> This is my question:
> I understand more spindles are better, and I understand RAID 10 is faster
> for writes then a RAID5 configuration. Plus both configurations will give
> me
> enough HD space. So on with the question.
> Should i use RAID 10 or RAID5?
> RAID 10 would give be theoretically faster writes and great protection,
> but
> gives me only 5 disks to write to simultaneously.
> RAID 5 gives me around 9 disks but is known to be slower due to the
> overhead.
> Is the RAID5 really that much slower that it would hinder performance
> compared to a RAID 10 with only 5 disks?
> So what do you guys think?
>
> -King
>
RAID 10 vs. RAID 5 question
the data of the SQL server, not tran logs, tempdb's etc.
Database Type is OLTP with more then 30% writes then reads
This is my question:
I understand more spindles are better, and I understand RAID 10 is faster
for writes then a RAID5 configuration. Plus both configurations will give me
enough HD space. So on with the question.
Should i use RAID 10 or RAID5?
RAID 10 would give be theoretically faster writes and great protection, but
gives me only 5 disks to write to simultaneously.
RAID 5 gives me around 9 disks but is known to be slower due to the
overhead.
Is the RAID5 really that much slower that it would hinder performance
compared to a RAID 10 with only 5 disks?
So what do you guys think?
-Kingyes.
go RAID 1+0
If you have time you can test this with a handful of IOStress test
utilities.
you could also talk directly to your vendor.
As I learned today, you will also want to maximize the WRITE Cache on the
RAID Controller(s).
Cheers
Greg Jackson
PDX, Oregon|||Hi
Where are the transaction logs going? They are as critical to the Db as the
data files.
RAID-10 wins hands down. RAID-5 has just too much overhead for the parity.
From a safety perspective, on RAID-5, you loose 2 drives, bye bye data.
RAID -10 can lose half it's drives, as long as it is never both pairs of a
mirror.
So performance wins.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
> I have an external RAID with 10 36GB 15K drives. These drives are only
for
> the data of the SQL server, not tran logs, tempdb's etc.
> Database Type is OLTP with more then 30% writes then reads
> This is my question:
> I understand more spindles are better, and I understand RAID 10 is faster
> for writes then a RAID5 configuration. Plus both configurations will give
me
> enough HD space. So on with the question.
> Should i use RAID 10 or RAID5?
> RAID 10 would give be theoretically faster writes and great protection,
but
> gives me only 5 disks to write to simultaneously.
> RAID 5 gives me around 9 disks but is known to be slower due to the
> overhead.
> Is the RAID5 really that much slower that it would hinder performance
> compared to a RAID 10 with only 5 disks?
> So what do you guys think?
>
> -King
>|||Hi
Yes, have write cache, as long as the RAID card has battery backup. If not,
kiss your data goodbye as you will have some decent corruption.
For us, data security over performance, so write caching is off.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
news:#62vk86EFHA.1264@.TK2MSFTNGP12.phx.gbl...
> yes.
> go RAID 1+0
> If you have time you can test this with a handful of IOStress test
> utilities.
> you could also talk directly to your vendor.
> As I learned today, you will also want to maximize the WRITE Cache on the
> RAID Controller(s).
>
> Cheers
> Greg Jackson
> PDX, Oregon
>|||yes....HEAVENS YES.
One needs "battery backed" Cache.
GAJ|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%23qs9yC7EFHA.2540@.TK2MSFTNGP09.phx.gbl...
> Hi
> Yes, have write cache, as long as the RAID card has battery backup. If
not,
> kiss your data goodbye as you will have some decent corruption.
>
Yes we have a 72-hour backup on all RAID controllers
> For us, data security over performance, so write caching is off.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "pdxJaxon" <GregoryAJackson@.Hotmail.com> wrote in message
> news:#62vk86EFHA.1264@.TK2MSFTNGP12.phx.gbl...
> > yes.
> >
> > go RAID 1+0
> >
> > If you have time you can test this with a handful of IOStress test
> > utilities.
> >
> > you could also talk directly to your vendor.
> >
> > As I learned today, you will also want to maximize the WRITE Cache on
the
> > RAID Controller(s).
> >
> >
> > Cheers
> >
> > Greg Jackson
> > PDX, Oregon
> >
> >
>|||"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:e4EdmB7EFHA.4004@.tk2msftngp13.phx.gbl...
> Hi
> Where are the transaction logs going? They are as critical to the Db as
the
> data files.
> RAID-10 wins hands down. RAID-5 has just too much overhead for the parity.
> From a safety perspective, on RAID-5, you loose 2 drives, bye bye data.
> RAID -10 can lose half it's drives, as long as it is never both pairs of a
> mirror.
> So performance wins.
Mike,
Thanks! Thats what i thought.. but what puzzled me was the spindols. Since
the RAID5 configuration would have more drives to spread the write acrossed
then the RAID 1+0 i wasn't sure if it mattered. Keep in mind i haven't got
the hardware yet... so no testing has been done. and yes i will do testing.
thanks for your input.
-King
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
> news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
> > I have an external RAID with 10 36GB 15K drives. These drives are only
> for
> > the data of the SQL server, not tran logs, tempdb's etc.
> >
> > Database Type is OLTP with more then 30% writes then reads
> >
> > This is my question:
> >
> > I understand more spindles are better, and I understand RAID 10 is
faster
> > for writes then a RAID5 configuration. Plus both configurations will
give
> me
> > enough HD space. So on with the question.
> >
> > Should i use RAID 10 or RAID5?
> >
> > RAID 10 would give be theoretically faster writes and great protection,
> but
> > gives me only 5 disks to write to simultaneously.
> >
> > RAID 5 gives me around 9 disks but is known to be slower due to the
> > overhead.
> >
> > Is the RAID5 really that much slower that it would hinder performance
> > compared to a RAID 10 with only 5 disks?
> >
> > So what do you guys think?
> >
> >
> > -King
> >
> >
>|||In a Raid 1+0 you can't look at it as only x many drives to write to. In
your case you 10 drives that are configured as such. 5 Mirrored pairs that
are striped in a Raid 0 configuration. Yes that means you have to split the
data 5 ways vs. 9 for the Raid 5 but each split goes to a mirrored pair. The
mirrored pair has the option to read from one disk and write to the other,
write to both, read from both etc. It can be smart in how it reads and
writes to the mirrored pair. That plus the fact it doe not have to
calculate parity is a fast combination.
--
Andrew J. Kelly SQL MVP
"news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
news:%23qHC657EFHA.3672@.TK2MSFTNGP14.phx.gbl...
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:e4EdmB7EFHA.4004@.tk2msftngp13.phx.gbl...
>> Hi
>> Where are the transaction logs going? They are as critical to the Db as
> the
>> data files.
>> RAID-10 wins hands down. RAID-5 has just too much overhead for the
>> parity.
>> From a safety perspective, on RAID-5, you loose 2 drives, bye bye data.
>> RAID -10 can lose half it's drives, as long as it is never both pairs of
>> a
>> mirror.
>> So performance wins.
> Mike,
> Thanks! Thats what i thought.. but what puzzled me was the spindols.
> Since
> the RAID5 configuration would have more drives to spread the write
> acrossed
> then the RAID 1+0 i wasn't sure if it mattered. Keep in mind i haven't
> got
> the hardware yet... so no testing has been done. and yes i will do
> testing.
> thanks for your input.
> -King
>
>> Regards
>> --
>> Mike Epprecht, Microsoft SQL Server MVP
>> Zurich, Switzerland
>> IM: mike@.epprecht.net
>> MVP Program: http://www.microsoft.com/mvp
>> Blog: http://www.msmvps.com/epprecht/
>> "news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
>> news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
>> > I have an external RAID with 10 36GB 15K drives. These drives are only
>> for
>> > the data of the SQL server, not tran logs, tempdb's etc.
>> >
>> > Database Type is OLTP with more then 30% writes then reads
>> >
>> > This is my question:
>> >
>> > I understand more spindles are better, and I understand RAID 10 is
> faster
>> > for writes then a RAID5 configuration. Plus both configurations will
> give
>> me
>> > enough HD space. So on with the question.
>> >
>> > Should i use RAID 10 or RAID5?
>> >
>> > RAID 10 would give be theoretically faster writes and great protection,
>> but
>> > gives me only 5 disks to write to simultaneously.
>> >
>> > RAID 5 gives me around 9 disks but is known to be slower due to the
>> > overhead.
>> >
>> > Is the RAID5 really that much slower that it would hinder performance
>> > compared to a RAID 10 with only 5 disks?
>> >
>> > So what do you guys think?
>> >
>> >
>> > -King
>> >
>> >
>>
>|||This website has great details and arguments why you should not use RAID 5
for a RDBMS implementation
http://www.baarf.com/
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2005 All rights reserved.
"news.microsoft.com" <richk@.bluestreammedia.com> wrote in message
news:OUGbB56EFHA.2176@.TK2MSFTNGP15.phx.gbl...
>I have an external RAID with 10 36GB 15K drives. These drives are only for
> the data of the SQL server, not tran logs, tempdb's etc.
> Database Type is OLTP with more then 30% writes then reads
> This is my question:
> I understand more spindles are better, and I understand RAID 10 is faster
> for writes then a RAID5 configuration. Plus both configurations will give
> me
> enough HD space. So on with the question.
> Should i use RAID 10 or RAID5?
> RAID 10 would give be theoretically faster writes and great protection,
> but
> gives me only 5 disks to write to simultaneously.
> RAID 5 gives me around 9 disks but is known to be slower due to the
> overhead.
> Is the RAID5 really that much slower that it would hinder performance
> compared to a RAID 10 with only 5 disks?
> So what do you guys think?
>
> -King
>sql
Wednesday, March 21, 2012
Quotes and ImageURL/External behavour
Can anyone explain this weirdness? If I have an Image set to External
with a URL of http://localhost/myimagepage.asp?MediaID=82 I can see the
image in the designer and also at run time. This is without an equals
sign at the front as well, so just the plain string starting with http.
But...
If I then add an equals sign to the start of the string and put quotes
around it so that it reads;
="http://localhost/myimagepage.asp?MediaID=82"
Then broken images abound (red crosses), in the report design and at
run time.
My thoughts are that;
a) I have a broken version of reporting services (I have checked the
version and I have RS SP2 installed).
b) The report server is taking the string data as the image data, not
the URL of the image data.
Am I missing something obvious, it seems as if everyone else has this
figured.
Thanks in advanceWell, I found this one, a small flaw in Reporting Services and a
problem with Internet Explorer/Firefox.
There were two problems;
1) IE sometimes uploads files as mime type image/pjpeg, RS does not
like these.
2) The response object writing the HTTP headers from ASP.net required
the following code;
Response.Charset = ""
To fix point 1, I just checked for pjpeg and jpg and returned jpeg
instead, all works well.
The problem with RS is that it will let you stare at these things for
ages and not give you any detail on why it won't render. Additional
feedback (possibly via error images) would be great in the next
version.
Ryansql
Friday, March 9, 2012
Quick question on VB
Hey folks,
I am trying to run a batchfile or a external process ( exe ) from within a Script Task and read the process status returned by the process. Is there a sample VB script code that does this that you guys can share ? What modules do I have to Import ?
Thanks
-chiraj
This should do the trick. To test this, create a batch file in C:\temp called test.bat. Simply put "foobar" or something invalid in the batch file to create an errorlevel. Copy the code into a script task, run the package. It will show you the errorlevel in a message box.
Imports System
Imports System.Data
Imports System.Math
Imports System.Windows.Forms
Imports Microsoft.SqlServer.Dts.Runtime
Public Class ScriptMain
Public Sub Main()
Dim stat As Integer = ExecProc("C:\\temp\\test.bat")
MessageBox.Show("The exit status was : " + stat.ToString())
Dts.TaskResult = Dts.Results.Success
End Sub
Public Function ExecProc(ByVal Path As String) As Integer
Dim objProc As System.Diagnostics.Process
Dim status As Integer
Try
objProc = New System.Diagnostics.Process()
objProc.StartInfo.FileName = Path
objProc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
objProc.Start()
'Wait until the process passes back an exit code
objProc.WaitForExit()
status = objProc.ExitCode
Catch Ex As Exception
MessageBox.Show(Ex.Message)
Finally
'Release the objProc resources
objProc.Close()
End Try
Return status
End Function
End Class
HTH,
Kirk Haselden
Author "SQL Server Integration Services"