Daily Archives: March 11, 2005

BatchUpdate screams in Feb CTP!

holy canoli.

remember when I compared using bulk copy to insert 104,000 records into another database? I compared it to dataadapter update using batch updating with the size set at 100.

The difference in November CTP (VS2005 and SQL Server 2005 full version) was 21 seconds for the bulk copy and 41 minutes for the update.

Out of curiousity, I just ran this again with the Feb CTP versions of vs2005 and sql server 2005.

The bulk copy was about the same. But the update using the same table and the same settings took only 8 minutes!

Wowee kazowee!

update: Pablo Castro recommends: “For maximum perf in batching, make sure you wrap the batched update around a transaction.“


http://www.AcehAid.org

Getting at AdventureWorks from the SQL Server 2005 Feb CTP install (a kludge)

When I uninstalled the November CTP of SQL Server 2005, I inadvertantly deleted my databases as well. When I installed the Feb bits and looked at the instructions for getting AdventureWorks back in there, I didn’t have the right files. So I trolled around the install disk, found the CAB file where the mdf and ldf were, extracted them, trimmed off the extra glob at the end of the files names and then attached. No problem. They are in [DISK]\Setup\Samples.cab.

The files are named AdventureWorks_data.mdf.EE9FA……… and AdventureWorks__Log.ldf.EE9FA…..

http://www.AcehAid.org

ADO.NET 2.0 Problems encoutered with February CTP

1) SqlDependency is throwing a wierd error just after the notification comes back from the sql server to the client: ObjectDisposedException – no stack trace, not happening within a method. This also effects the Web.Cache.SqlCacheDependency which uses the ado.net class (someone at MS is helping me with this one)

2) iXmlSerializable features of DataTable appear to be broken. I only tried two – passing a datatable from a web service (the webmethod that returns a datatable is getting serialized improperly) and DataTable.Merge (it just adds, does not merge)

3) Bulk Copy is throwing a bizarre error nowhere to be found in google. When I run the WriteToServer method it throws an exception quickly that says “Cannot access destination table ‘mytablename'”. I can’t see in the profiler what’s going on. Duh! One second after I posted this I remembered. It’s an INSERT! Previously I was deleting all rows from the destination table and then doing the bulk copy. This time I’m using a different table from AdventureWorks. I have to get the empty table in there first.

This is a bummer – 3 2 of my demos for my ado.net 2 talk are dead for now. But I knew what I was in for…



http://www.AcehAid.org

Demo Demo Demo

I am having a blast working on my ADO.NET 2 demos for the ASPConnections talk (and for Code Camp). It is forcing me to think beyond what I did for my MSDN Mag article. For the article, I have about 50 little tests that I ran from a windows form. Here, not only is everything from ASP.NET, but the idea is to show where the benefit is if you are doing asp.net. It’s a lot of fun. Also I have done so much Windows Forms lately, I’m happy to be focusing on ASP.NET again.

http://www.AcehAid.org

Why does it always snow whenI have to travel

uggh – if it weren’t for the 200 mile drive I wouldn’t be worried about the forecast of snow (heavy at times) all night and tomorrow morning. the plan is to meet up with Laura Blood at 7am or so nearby and then haul a** to Mass. (hey, it rhymes). I was counting on a pedal to the metal 3 hour trip. Good thing my first talk is not till the afternoon. I hate all that time sitting in the car but at least I’ll have company this time! Dave Burke, who is presenting on customizing .Text, has a plan that will help him continue preparing while he drives. He’s smart – going down today. I still have plenty of prep to do today.

http://www.AcehAid.org