显示标签为“commands”的博文。显示所有博文
显示标签为“commands”的博文。显示所有博文

2012年3月22日星期四

Disk Configuration

Are there any scripts or commands, or GUI interfaces that let you know if
your disk drives are configured for RAID 1, RAID 5, etc.? How is one to walk
into a shop and find this knowledge if the network admin is unavailable?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200604/1
Usually you can find out this type of information on the box. Compaq
servers that I have worked on have the Array Configuration Utility. I am
guessing that other vendors have their own version of a utility to
administer (or look at) an array from within Windows. You can also boot the
box and watch the BIOS screens as they appear (assuming that this is not a
production box and can be rebooted during the day).
Keith Kratochvil
"cbrichards via droptable.com" <u3288@.uwe> wrote in message
news:5e54ab7a96d03@.uwe...
> Are there any scripts or commands, or GUI interfaces that let you know if
> your disk drives are configured for RAID 1, RAID 5, etc.? How is one to
> walk
> into a shop and find this knowledge if the network admin is unavailable?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200604/1
sql

Disk Configuration

Are there any scripts or commands, or GUI interfaces that let you know if
your disk drives are configured for RAID 1, RAID 5, etc.? How is one to walk
into a shop and find this knowledge if the network admin is unavailable?
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200604/1Usually you can find out this type of information on the box. Compaq
servers that I have worked on have the Array Configuration Utility. I am
guessing that other vendors have their own version of a utility to
administer (or look at) an array from within Windows. You can also boot the
box and watch the BIOS screens as they appear (assuming that this is not a
production box and can be rebooted during the day).
--
Keith Kratochvil
"cbrichards via SQLMonster.com" <u3288@.uwe> wrote in message
news:5e54ab7a96d03@.uwe...
> Are there any scripts or commands, or GUI interfaces that let you know if
> your disk drives are configured for RAID 1, RAID 5, etc.? How is one to
> walk
> into a shop and find this knowledge if the network admin is unavailable?
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200604/1

Disk Configuration

Are there any scripts or commands, or GUI interfaces that let you know if
your disk drives are configured for RAID 1, RAID 5, etc.? How is one to walk
into a shop and find this knowledge if the network admin is unavailable?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200604/1Usually you can find out this type of information on the box. Compaq
servers that I have worked on have the Array Configuration Utility. I am
guessing that other vendors have their own version of a utility to
administer (or look at) an array from within Windows. You can also boot the
box and watch the BIOS screens as they appear (assuming that this is not a
production box and can be rebooted during the day).
Keith Kratochvil
"cbrichards via droptable.com" <u3288@.uwe> wrote in message
news:5e54ab7a96d03@.uwe...
> Are there any scripts or commands, or GUI interfaces that let you know if
> your disk drives are configured for RAID 1, RAID 5, etc.? How is one to
> walk
> into a shop and find this knowledge if the network admin is unavailable?
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200604/1

2012年2月24日星期五

Disabling constraints

Hi,
I need to disable all the foreign key and primary key constraints in a table
and reenable them at the end of my commands. I can use ALTER TABLE to do
this but I was wondering if it is a good practise. It is not maintenance
code but production code. Everything is done in a transaction but can I be
sure there is no incidence with concurent accesses ? What about the rights
for the db user ?
Thanks.
FredFrdric Mayot wrote:
> Hi,
> I need to disable all the foreign key and primary key constraints in
> a table and reenable them at the end of my commands. I can use ALTER
> TABLE to do this but I was wondering if it is a good practise. It is
> not maintenance code but production code. Everything is done in a
> transaction but can I be sure there is no incidence with concurent
> accesses ? What about the rights for the db user ?
> Thanks.
> Fred
Why would you need to disable constraints in production code?
David Gugick
Quest Software
www.imceda.com
www.quest.com|||The reason is quite simple.
Assume we have the tables
A(pkA <PK> )
B(pkfkA <PK,FK>, pkfkC <PK,FK> )
C(pkC <PK> )
with the data
A = {1}
C = {11, 12}
B = {(1, 11), (1, 12)}
Now, I want to update the two rows in B in the following manner :
(1, 11) -> (1, 12) and (1, 12) -> (1, 11).
This operation is supposed to be atomic (that's to say in a transaction)
"David Gugick" <david.gugick-nospam@.quest.com> a crit dans le message de
news: %23$J$Y0pbFHA.3040@.TK2MSFTNGP14.phx.gbl...
> Frdric Mayot wrote:
> Why would you need to disable constraints in production code?
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||Have you tried this?
UPDATE B
SET pkfkC = CASE pkfkC
WHEN 11 THEN 12
WHEN 12 THEN 11
END
WHERE pkfkA = 1 AND pkfkC IN (11, 12)
This update is atomic and as such doesn't cause a constraint violation error
.
"Frédéric Mayot" wrote:

> The reason is quite simple.
> Assume we have the tables
> A(pkA <PK> )
> B(pkfkA <PK,FK>, pkfkC <PK,FK> )
> C(pkC <PK> )
> with the data
> A = {1}
> C = {11, 12}
> B = {(1, 11), (1, 12)}
> Now, I want to update the two rows in B in the following manner :
> (1, 11) -> (1, 12) and (1, 12) -> (1, 11).
> This operation is supposed to be atomic (that's to say in a transaction)
>
> "David Gugick" <david.gugick-nospam@.quest.com> a écrit dans le message de
> news: %23$J$Y0pbFHA.3040@.TK2MSFTNGP14.phx.gbl...
>
>