Showing posts with label sql2k. Show all posts
Showing posts with label sql2k. Show all posts

Friday, March 30, 2012

Recently Rebuilt SQL2K Cluster

I have recently had to rebuild my SQL Server 2000 sp3a 2 node active/passive
cluster running on Windows 2000 AS SP4. We ran into issues about two weeks
ago after a SAN migration (I'll spare all the gory details). When my
previous cluster died, I used one of the nodes as a stand alone instance of
SQL Server (to run our production database). On the other former node, I
removed the OS clustering software and had to manually remove SQL Server. I
eventually (with the assistance of Donna L. at MS) was able to get a single
node cluster of SQL2K running on physical server PRODSQL01 (the virtual
server name is PRODSQLCL01). While the cluster was running as a single node
cluster, I applied sp3a and the 818 hotfix. I then migrated the data from
the stand alone instance to PRODSQLCL01 and started to use it for production.
I turned my attention to the other box and removed and reinstalled the
Windows 2000 cluster software. This box is now called PRODSQL02. I was able
to add PRODSQL02 to the windows cluster, and the successfully added it via
SQL Server setup to the virtual server. My issue now is that PRODSQL02 has
the RTM versions of the binaries. I am not sure if I have a setup issue or I
misunderstand point 3.10 of the sp3a readme. Currently the virtual server is
running on PRODSQL01. If I attempt follow the steps under "If you need to
rebuild a node in the failover cluster..." from PRODSQL02 I am only able to
select the Virtual Server, and if I continue setup I get this error "all
cluster disks available to this virtual server are owned by other node(s)"
and then "Setup was unable to verify the state of the server for an upgrade.
Verify the server is able to start and that you provided a valid sa password
and restart setup". I understand that the virtual resources are only
available on the currently active node, but the way I read the instructions I
should be able to run the service pack installation on the inactive node. Do
I need to rerun the SP (and hotfix) setup on SQL01 (since the virtual server
is running there)? Do I need to move the resources to SQL02 and run the SP
setup there? I just need clarification of where to run the SP setup since I
just added SQL02 to this cluster.
You should be able to run setup on the non-host node and it will upgrade the
local binaries. Try rebooting the newly added RTM node and see if it helps.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
"Justin Hoffmann" <Justin Hoffmann@.discussions.microsoft.com> wrote in
message news:A214ED19-F6CD-4D25-90CE-0A1D456750BD@.microsoft.com...
>I have recently had to rebuild my SQL Server 2000 sp3a 2 node
>active/passive
> cluster running on Windows 2000 AS SP4. We ran into issues about two
> weeks
> ago after a SAN migration (I'll spare all the gory details). When my
> previous cluster died, I used one of the nodes as a stand alone instance
> of
> SQL Server (to run our production database). On the other former node, I
> removed the OS clustering software and had to manually remove SQL Server.
> I
> eventually (with the assistance of Donna L. at MS) was able to get a
> single
> node cluster of SQL2K running on physical server PRODSQL01 (the virtual
> server name is PRODSQLCL01). While the cluster was running as a single
> node
> cluster, I applied sp3a and the 818 hotfix. I then migrated the data from
> the stand alone instance to PRODSQLCL01 and started to use it for
> production.
> I turned my attention to the other box and removed and reinstalled the
> Windows 2000 cluster software. This box is now called PRODSQL02. I was
> able
> to add PRODSQL02 to the windows cluster, and the successfully added it via
> SQL Server setup to the virtual server. My issue now is that PRODSQL02
> has
> the RTM versions of the binaries. I am not sure if I have a setup issue
> or I
> misunderstand point 3.10 of the sp3a readme. Currently the virtual server
> is
> running on PRODSQL01. If I attempt follow the steps under "If you need to
> rebuild a node in the failover cluster..." from PRODSQL02 I am only able
> to
> select the Virtual Server, and if I continue setup I get this error "all
> cluster disks available to this virtual server are owned by other node(s)"
> and then "Setup was unable to verify the state of the server for an
> upgrade.
> Verify the server is able to start and that you provided a valid sa
> password
> and restart setup". I understand that the virtual resources are only
> available on the currently active node, but the way I read the
> instructions I
> should be able to run the service pack installation on the inactive node.
> Do
> I need to rerun the SP (and hotfix) setup on SQL01 (since the virtual
> server
> is running there)? Do I need to move the resources to SQL02 and run the
> SP
> setup there? I just need clarification of where to run the SP setup since
> I
> just added SQL02 to this cluster.
>
|||Geoff:
I've rebooted the newly added RTM node several times and it doesn't seem to
help. When I launch SP3 setup (via setup.bat in the local sql2ksp3
directory) on the newly added RTM node I get to the screen that says Computer
Name. Local Computer is grayed out, there is a box for the existing Virtual
Server name. When I type the virtual server name in the box and press next,
I get the error messages I mentioned in my original post. Is there anything
else you can recommend?
Thanks,
Justin
"Geoff N. Hiten" wrote:

> You should be able to run setup on the non-host node and it will upgrade the
> local binaries. Try rebooting the newly added RTM node and see if it helps.
>
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
>
|||This is how I wound up fixing this:
I ran sp3a setup from PRODSQL01, which was the machine in control of the SQL
Virtual server at the time. It updated the binaries on PRODSQL02, but in
order to do so, the SQL Server service was stopped. Once sp3a setup
completed, I had to reboot PRODSQL02. When it was back up, I verified the
version of the sqlservr.exe file, and it was 8.00.760 (right click,
properties, version). Once I established that sp3a took on the newly added
node, I started the setup for the 8.00.818 security hotfix. SQL Server went
down briefly again, and then the binaries on the newly added box were
updated. I then installed MDAC 2.8 on this node and rebooted. Once
PRODSQL02 was running again I tested moving the cluster resources from 01 to
02. It succeeded. While SQL was running on 02 I ran throught setting up
Imceda SQL Lite Speed (again, it was on 01 but not 02). Once that completed,
I was able to verify that my normally scheduled transaction log backups
completed successfully. Both machines run SQL Server and perform the
backups correctly. I am not sure about the root cause of the issue I
encountered with not being able to run the sp and hotfix on the newly added
node when it wasn't running the Virtual SQL Server (the sp3a readme seems to
indicate that you can), but I finally have a 2 node active passive cluster
running again.
|||Just to clarify, it is active passive, so only one node runs the Virtual SQL
Server at any time. I was trying to say that each node is able to run SQL
Server, and each node is able to run the SQL Lite Speed backups. I had been
concerned that somehow I would get PRODSQL02 all patched but then failing
over would not work correctly. Everything is working OK.
"Justin Hoffmann" wrote:

> This is how I wound up fixing this:
> I ran sp3a setup from PRODSQL01, which was the machine in control of the SQL
> Virtual server at the time. It updated the binaries on PRODSQL02, but in
> order to do so, the SQL Server service was stopped. Once sp3a setup
> completed, I had to reboot PRODSQL02. When it was back up, I verified the
> version of the sqlservr.exe file, and it was 8.00.760 (right click,
> properties, version). Once I established that sp3a took on the newly added
> node, I started the setup for the 8.00.818 security hotfix. SQL Server went
> down briefly again, and then the binaries on the newly added box were
> updated. I then installed MDAC 2.8 on this node and rebooted. Once
> PRODSQL02 was running again I tested moving the cluster resources from 01 to
> 02. It succeeded. While SQL was running on 02 I ran throught setting up
> Imceda SQL Lite Speed (again, it was on 01 but not 02). Once that completed,
> I was able to verify that my normally scheduled transaction log backups
> completed successfully. Both machines run SQL Server and perform the
> backups correctly. I am not sure about the root cause of the issue I
> encountered with not being able to run the sp and hotfix on the newly added
> node when it wasn't running the Virtual SQL Server (the sp3a readme seems to
> indicate that you can), but I finally have a 2 node active passive cluster
> running again.
|||The current correct term is "Single-Instance". "Active-Active" and its
cousins all refer to technology used specifically in SQL server 7.0 only.
Sometimes the binary only upgrade doesn't work right. Your solution is the
fallback solution but it does have the obvious downside of taking the SQL
server offline for a short time during the upgrade.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Adminstrator
"Justin Hoffmann" <JustinHoffmann@.discussions.microsoft.com> wrote in
message news:DA3E156A-EAFD-45D9-B72E-AB4A657D53A0@.microsoft.com...[vbcol=seagreen]
> Just to clarify, it is active passive, so only one node runs the Virtual
> SQL
> Server at any time. I was trying to say that each node is able to run SQL
> Server, and each node is able to run the SQL Lite Speed backups. I had
> been
> concerned that somehow I would get PRODSQL02 all patched but then failing
> over would not work correctly. Everything is working OK.
> "Justin Hoffmann" wrote:

Tuesday, March 20, 2012

Rebuild fulltext

Hi!
I have a problem with a 4-node cluster. It was a 2-node sql2k on w2k.
We installed new hw with w2k3 and installed the old instances there
(restore). After that we added 2 more w2k3 nodes and installed the
original 2 instances on all 4 nodes. We also set up 2 new instances to
be a total of 4.
The problem is that when we put in the new hw (node 3 and 4) we saw
that we lost the control of the fulltext resource on the first 2
instances. It started failing and then failback, sometimes it started,
sometimes not. This started before we actually joined node 3-4 to the
clustrer. Since we don't use fulltext we took away the resource from
the cluster on these 2 instances. On the new instances (3 and 4) there
has newer been a problem. All nodes can run all 4 instances. There is
no problem with any other resource.
I have seen kb 812666 and I think that I should try rebuildning
fulltext. I think it looks very complex, is there anyone that have
done this?
/Peter
Peter,
Yes, KB article 812666 "How to recover a failed full-text search resource on
a clustered instance of SQL Server 2000" at
http://support.microsoft.com/default.aspx?kbid=812666 is complex, but since
you don't use the MSSearch (Fulltext ) service, and have already removed the
fulltext (Microsoft Search) service from the cluster resource, rebuilding
this service is not necessary/
Note, you can also post FTS related questions to the newsgroup:
microsoft.public.sqlserver.fulltext
Regards,
John
"Peter Lindberg" <peter.lindbergTAKE@.AWAYmartinsson.se> wrote in message
news:415bfda4.4507871@.msnews.microsoft.com...
> Hi!
> I have a problem with a 4-node cluster. It was a 2-node sql2k on w2k.
> We installed new hw with w2k3 and installed the old instances there
> (restore). After that we added 2 more w2k3 nodes and installed the
> original 2 instances on all 4 nodes. We also set up 2 new instances to
> be a total of 4.
> The problem is that when we put in the new hw (node 3 and 4) we saw
> that we lost the control of the fulltext resource on the first 2
> instances. It started failing and then failback, sometimes it started,
> sometimes not. This started before we actually joined node 3-4 to the
> clustrer. Since we don't use fulltext we took away the resource from
> the cluster on these 2 instances. On the new instances (3 and 4) there
> has newer been a problem. All nodes can run all 4 instances. There is
> no problem with any other resource.
> I have seen kb 812666 and I think that I should try rebuildning
> fulltext. I think it looks very complex, is there anyone that have
> done this?
> /Peter
|||John,
thanks for the reply. My intention is to get all 4 nodes equal setup.
We want to be able to run new databases where it's best suitet and
don't depend on differenses between instances. That's way I want to do
this. I have to set up my test environment so I can test it before I
go in the production.
Have you done this in a cluster?
/Peter
On Thu, 30 Sep 2004 11:19:01 -0700, "John Kane" <jt-kane@.comcast.net>
wrotc:

>Peter,
>Yes, KB article 812666 "How to recover a failed full-text search resource on
>a clustered instance of SQL Server 2000" at
>http://support.microsoft.com/default.aspx?kbid=812666 is complex, but since
>you don't use the MSSearch (Fulltext ) service, and have already removed the
>fulltext (Microsoft Search) service from the cluster resource, rebuilding
>this service is not necessary/
>Note, you can also post FTS related questions to the newsgroup:
>microsoft.public.sqlserver.fulltext
>Regards,
>John
>
>
>"Peter Lindberg" <peter.lindbergTAKE@.AWAYmartinsson.se> wrote in message
>news:415bfda4.4507871@.msnews.microsoft.com...
>
|||You're welcome, Peter,
Unfortunately, I do not have a clustered environment to test this KB
article, as I have only one home server and a laptop... ;-(
If you do have a test clustered environment, even one with just two nodes,
I'd recommend that you test using that environment.
Regards,
John
"Peter Lindberg" <peter.lindbergTAKE@.AWAYmartinsson.se> wrote in message
news:415d70eb.31078308@.msnews.microsoft.com...[vbcol=seagreen]
> John,
> thanks for the reply. My intention is to get all 4 nodes equal setup.
> We want to be able to run new databases where it's best suitet and
> don't depend on differenses between instances. That's way I want to do
> this. I have to set up my test environment so I can test it before I
> go in the production.
> Have you done this in a cluster?
> /Peter
> On Thu, 30 Sep 2004 11:19:01 -0700, "John Kane" <jt-kane@.comcast.net>
> wrotc:
on[vbcol=seagreen]
since[vbcol=seagreen]
the
>
|||I'll definitive test it. It will be under vmware gsx.
/Peter
On Mon, 4 Oct 2004 10:57:02 -0700, "John Kane" <jt-kane@.comcast.net>
wrotc:

>You're welcome, Peter,
>Unfortunately, I do not have a clustered environment to test this KB
>article, as I have only one home server and a laptop... ;-(
>If you do have a test clustered environment, even one with just two nodes,
>I'd recommend that you test using that environment.
>Regards,
>John
>
>"Peter Lindberg" <peter.lindbergTAKE@.AWAYmartinsson.se> wrote in message
>news:415d70eb.31078308@.msnews.microsoft.com...
>on
>since
>the
>

Friday, March 9, 2012

Reason for multiple filegroups/ files?

SQL2K
SP4
If my data is spread accross a Raid array, is there any real reason to use
multiple filegroups/ files? Will I see any performance benefit? Will I only
see it on VLDB's. If I do use them, is there a good way to group them
logically?
TIA, ChrisRChrisR
>Will I see any performance benefit?
Probably, if you put the filegroup on another PHYSICAL disk
>Will I only
> see it on VLDB's. If I do use them, is there a good way to group them
> logically?
Yes , it makes sence only for VLDB
Look, you will have to investigate it carefuly, I mean how you are going
to restore in case of failure or somethinmg like that , it is not so easy
to maintain and I have my doubt that nowadays we can really gain
perfiomance benefit from creating a new file group . Perhaps you might
think about adding a new datafile .NDF and seeing how it works
"ChrisR" <noFudgingWay@.NoEmail.com> wrote in message
news:%23hGlHLPKHHA.1912@.TK2MSFTNGP03.phx.gbl...
> SQL2K
> SP4
> If my data is spread accross a Raid array, is there any real reason to use
> multiple filegroups/ files? Will I see any performance benefit? Will I
> only
> see it on VLDB's. If I do use them, is there a good way to group them
> logically?
> TIA, ChrisR
>|||Add on ; please take a look into below URL's. But to make use of the full
advantage you may need multiple disk controller as Uri suggested.
http://www.databasejournal.com/features/mssql/article.php/1439801
http://www.informit.com/guides/content.asp?g=sqlserver&seqNum=42&rl=1
Thanks
Hari
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:u4aAfSPKHHA.3936@.TK2MSFTNGP02.phx.gbl...
> ChrisR
>>Will I see any performance benefit?
> Probably, if you put the filegroup on another PHYSICAL disk
>>Will I only
>> see it on VLDB's. If I do use them, is there a good way to group them
>> logically?
> Yes , it makes sence only for VLDB
>
> Look, you will have to investigate it carefuly, I mean how you are going
> to restore in case of failure or somethinmg like that , it is not so easy
> to maintain and I have my doubt that nowadays we can really gain
> perfiomance benefit from creating a new file group . Perhaps you might
> think about adding a new datafile .NDF and seeing how it works
>
>
> "ChrisR" <noFudgingWay@.NoEmail.com> wrote in message
> news:%23hGlHLPKHHA.1912@.TK2MSFTNGP03.phx.gbl...
>> SQL2K
>> SP4
>> If my data is spread accross a Raid array, is there any real reason to
>> use
>> multiple filegroups/ files? Will I see any performance benefit? Will I
>> only
>> see it on VLDB's. If I do use them, is there a good way to group them
>> logically?
>> TIA, ChrisR
>>
>|||At the very least I always recommend creating one secondary filegroup to
place all the user objects and leave just the system objects in the primary
filegroup. This makes it cleaner and easier to do piecemeal restores if
needed. From there it depends on how you use your data and what your
hardware config is like. If you want to separate different groups of objects
such as Non-clustered indexes from the Clustered / tables onto different
drive arrays you need at least two filegroups. If you know this is something
you may do in the future but aren't now it still may make sense to separate
them into multiple FG's to make the move easier down the road. If the db is
relatively small, your hardware is decent you may never see any advantages
of multiple files or filegroups.
--
Andrew J. Kelly SQL MVP
"ChrisR" <noFudgingWay@.NoEmail.com> wrote in message
news:%23hGlHLPKHHA.1912@.TK2MSFTNGP03.phx.gbl...
> SQL2K
> SP4
> If my data is spread accross a Raid array, is there any real reason to use
> multiple filegroups/ files? Will I see any performance benefit? Will I
> only
> see it on VLDB's. If I do use them, is there a good way to group them
> logically?
> TIA, ChrisR
>|||Thanks everyone, this is all as I suspected.
"ChrisR" <noFudgingWay@.NoEmail.com> wrote in message
news:%23hGlHLPKHHA.1912@.TK2MSFTNGP03.phx.gbl...
> SQL2K
> SP4
> If my data is spread accross a Raid array, is there any real reason to use
> multiple filegroups/ files? Will I see any performance benefit? Will I
only
> see it on VLDB's. If I do use them, is there a good way to group them
> logically?
> TIA, ChrisR
>

Wednesday, March 7, 2012

Really weird problems

Hi

Quite recently we have moved ourdatabase from SQL 6.5 to SQL2k. Since then we are experiencing very rare but extremely weird problems -- typically they are look like at one point zero appears instead of valid value. So far I have caught 4 such cases.
Here is the configuration:
- access -- through DBLib (ntwdblib.dll v2000.80.2039.0)
- connection string is DBMSSOCN,address,port
- server/client is Win2003 Server SP1 (server and client are different boxes)
- 2-processor systems with HT enabled

Case #1:
we have a C appliation that recalculates some data and updates two different tables simultaneously with almost the same set of data. It looks like this:

// prepare three data structures
...
// send data to DB
swInsFxSumPlTable(pData, 3, pDbProc);
swInsFxTradeExpoTable(pData, 3, pDbProc);

every function looks like:

for ( usCount=0; usCount<3; usCount++ )
{
sprintf (
szQuery+strlen(szQuery),
"exec sp_swFxedrq_Add_fx_sum_pl \n"
"'%s', '%s', '%s', \n"
"%f, %f, %f, %f \n",
pData[usCount].szPcId,
pData[usCount].szCcyPairId,
pData[usCount].szCcyLen,
pData[usCount].rfNpvTodPl,
pData[usCount].rfMtdPl,
pData[usCount].rfNomPos,
pData[usCount].rfShaPipHdg
);
}

fReturn = imExecMultiQuery (pDbproc, szQuery);

(no buffer overruns happen). The only difference between them is the name of called procedure and set of parameters. Both stored procedures are simple inserts, both tables are truncated beforehand. imExecMultiQuery is equivalent to:

dbcancel( dbproc );
dbfcmd ( dbproc, "%s", pszQuery );
dbsqlexec ( dbproc )
while ( dbresults ( dbproc ) != NO_MORE_RESULTS ) dbcanquery(dbproc);

(error handling is omitted for clarity). Problem: rfNomPos is different in only one row in resulting tables. I could not believe my eyes, I have checked extract from transaction log:

"INSERT","pc_id","ccy_pair_id","ccy_code_len","npv_tod_pl","mtd_pl","nom_nop","sha_plp_hdg"
"INSERTED","CRINST"," FJD ","3","0","0","0","0"
"INSERT","pc_id","ccy_pair_id","npv_tod_pl","mtd_pl","nom_nop","sha_plp_hdg","usd_eq_nop"
"INSERTED","CRINST","FJD ","0","0","-1.38099e+008","0","-7.92688e+007"

Red-marked values should be the same, I simply can't see any way for them to be different (except of bugs in ntwdblib.dll or SQL2k). Table and stored procedure uses type float, C code uses DBFLT8. Repeated execution produces correct results.

Case #2:
we have SQR report running every day (this is script language for report generation). It uses ODBC to connect to DB. It simply reads the table and dumps all values to text file. One row has value 0 instead of correct value. Happened only once, repeated calls produced correct results. No comments, I simply dropped my jaw when I saw it. We have zillions of SQR scripts running every day, we never had such problem before. I have checked this specific row -- nobody was touching it for ages.

Bad thing that this happens randomly in various parts of our (quite big) system, and every time we find the 'magic' place after costly and time consuming reconciliation process. Every time (whether it is reading or writing) we have similar behavior -- one column's value was replaced by 0.

I do really appreciate any suggestions, because I ran out of ideas. I do suspect bug in ntwdblib.dll related to multithreading. It is impossible to reproduce it so far... I'll try to get most fresh ntwdblib.dll, if it won't help -- I'll try one shipped with SQL6.5.

Bye.
Sincerely yours, Michael.

P.S. Sorry for font size -- looks like forum is buggy too... It looks fine in editor
Update. Problem happened again :-( . Here is the excerpt from DB tranlog (altered for readability):

"fxed_sum_pl_report","CRINST|XAUD/DEM|7","INSERT","pc_id","ccy_pair_id","ccy_code_len","npv_tod_pl","mtd_pl","nom_nop","sha_plp_hdg"
"INSERTED","CRINST","XAUD/DEM","7","249051","2.64878e+006","0","0"
"fxed_sum_pl_report","CRINST| DEM |3", "INSERT","pc_id","ccy_pair_id","ccy_code_len","npv_tod_pl","mtd_pl","nom_nop","sha_plp_hdg"
"INSERTED","CRINST"," DEM ","3","0","0","-1.59396e+008","0"
"fxed_trade_expo_report","CRINST|AUD/DEM","INSERT","pc_id","ccy_pair_id","npv_tod_pl","mtd_pl","nom_nop","sha_plp_hdg","usd_eq_nop"
"INSERTED","CRINST","AUD/DEM","249051","2.64878e+006","0","0","0"
"fxed_trade_expo_report","CRINST|AUD ","UPDATE","nom_nop","usd_eq_nop"
"UPDATED FROM","4.22946e+008","3.25015e+008"
"UPDATED TO","5.40672e+008","4.14675e+008"
"fxed_trade_expo_report","CRINST|DEM ","INSERT","pc_id","ccy_pair_id","npv_tod_pl","mtd_pl","nom_nop","sha_plp_hdg","usd_eq_nop"
"INSERTED","CRINST","DEM ","0","0","-1.59396e+008","0","-1.02418e+008"

There is no update for "fxed_sum_pl_report","CRINST| AUD |3". It is simply not there. Program is supposed to do 3 updates to fxed_sum_pl_report table and then almost the same updates are going to fxed_trade_expo_report table. Thje same data is used for both calls. Each call looks like:

dbfcmd("exec sp_swFxedrq_Add_fx_sum_pl <par1>, ... \n"
"exec sp_swFxedrq_Add_fx_sum_pl <par1>, ... \n"
"exec sp_swFxedrq_Add_fx_sum_pl <par1>, ... \n"

);

dbsqlexec ( dbproc );
while ( dbresults ( dbproc ) != NO_MORE_RESULTS ) dbcanquery(dbproc);

Somehow, middle 'exec' call did not leave any trace in the transaction log... no errors or messages were produced. :-(

Here is the code of sp_swFxedrq_Add_fx_sum_pl:

/****************************************************************************/

create procedure sp_swFxedrq_Add_fx_sum_pl
@.pc_id char(6),
@.ccy_pair_id char(8),
@.ccy_code_len char(1),
@.npv_tod_pl float,
@.mtd_pl float,
@.nom_nop float,
@.sha_plp_hdg float

as
if (@.ccy_code_len = '7')
begin
select @.ccy_pair_id = 'X'+@.ccy_pair_id
end
else
begin
select @.ccy_pair_id = ' '+@.ccy_pair_id
end

if (( select count(*)
from fxed_sum_pl_report
where pc_id = @.pc_id
and ccy_pair_id = @.ccy_pair_id
and ccy_code_len = @.ccy_code_len ) > 0 )
begin
update fxed_sum_pl_report
set npv_tod_pl = npv_tod_pl + @.npv_tod_pl,
mtd_pl = mtd_pl + @.mtd_pl,
nom_nop = nom_nop + @.nom_nop,
sha_plp_hdg = sha_plp_hdg+ @.sha_plp_hdg
where pc_id = @.pc_id
and ccy_pair_id = @.ccy_pair_id
and ccy_code_len = @.ccy_code_len
end
else
begin
insert into fxed_sum_pl_report
values(
@.pc_id,
@.ccy_pair_id,
@.ccy_code_len,
@.npv_tod_pl,
@.mtd_pl,
@.nom_nop,
@.sha_plp_hdg
)
end

So, possible ways to get this behaviour:
1. DBLib somehow lost middle 'exec' call and did not transfer it to SQL server
2. select count(*) returned smth >0 (as it should be -- insert happened quite a while before), but update fxed_sum_pl_report failed to update
3. Due to mysterious error in sprintf every float argument was 0 and update did not produce any entry in tranlog. Which is strange because I have quite a lot of entries in tranlog that state: "UPDATE","NO CHANGES DETECTED"
4. tranlog extraction utility is buggy and generates ***.

Any ideas? I am really stuck.
I am going to downgrade ntwdblib.dll soon, we'll see if it will help.

Bye.
Sincerely yours, Michael.