Showing posts with label transactions. Show all posts
Showing posts with label transactions. Show all posts

Wednesday, March 28, 2012

Mirror goes down... Affect client transactions?

If the mirror server goes down for any reason, then what happens to client transactions against the principle?

Will any client transactions fail?

Thanks in advance

Quick answer - no, they should not be affected.

However, if you have witness set-up and the principal cannot connect to both the witness and the mirror then it will stop serving the database and the transactions will fail.

Take a look at this article:

http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx#ETPAE

Thanks,

Kaloian.

|||

Thank you. That answers my question.

Monday, March 19, 2012

Min Function Problem

<%
sql="select MIN(psprice)as askBA from transactions where namecompany='BA'and act='Limit sell order'"
set AskBA=server.createobject("adodb.recordset")
AskBA.open sql,conn,1,3%>
<td height="22" width="41"><div align="center">
<% if not AskBA.eof then
response.write AskBA("askBA")
else
response.write "-"
end if
AskBA.close%>

When there is Data which namecompany=BA and act=Limit sell order in table transactions , it's OK. It shows the minimun price.

But the problem is that when there is no Data which namecompany=BA and act=Limit sell order in table transactions, it should show - But it does not show anything.
I don't know why it does not go to condition Else.The query has returned a row, with NULL for askBA. So EOF is not true, instead you need to test the value of askBA.