Tis the season for book releases
I just got my copy of Programming
SQL Server 2008 – great book, I highly recommend it as the SQL Server 2008 reference
for developers. Great job guys.
Check out my new book on REST.
I just got my copy of Programming
SQL Server 2008 – great book, I highly recommend it as the SQL Server 2008 reference
for developers. Great job guys.
Check out my new book on REST.
Consider a scenario where I want to insert data into two tables in a single transaction. The tables have a field that should be populated using the same sequence – one using SEQUENCE.NEXTVAL, and the other using SEQUENCE.CURRVAL, so that both tables get the same key value in these fields – a typical scenario when inserting into Interface Tables that have a dependency on each other.
The adapter performs all the operations in the Composite Operation in a single transaction and in order – however that does not mean that they are performed in a single session or connection to the Oracle server.
Sequences in Oracle are designed in a way such that their value does not reflect across sessions unless NEXTVAL is called on them. If you put ‘SEQUENCE.NEXTVAL’ in InlineValue for the first table and ‘SEQUENCE.CURRVAL’ in InlineValue for the second table in the Composite Operation, the result will not be what you’d normally expect. To elaborate, I defined a sequence named MYSEQUENCE, and opened two SQL-Plus sessions. I performed the following steps side by side as shown below:
Session 1 | Session 2 |
SELECT MYSEQUENCE.CURRVAL FROM DUAL; ORA-08002: sequence MYSEQUENCE.CURRVAL is not yet defined in this session |
|
| SELECT MYSEQUENCE.CURRVAL FROM DUAL; ORA-08002: sequence MYSEQUENCE.CURRVAL is not yet defined in this session |
SELECT MYSEQUENCE.NEXTVAL FROM DUAL; >>21 |
|
SELECT MYSEQUENCE.CURRVAL FROM DUAL; >>21 |
|
| SELECT MYSEQUENCE.CURRVAL FROM DUAL; ORA-08002: sequence MYSEQUENCE.CURRVAL is not yet defined in this session |
| SELECT MYSEQUENCE.NEXTVAL FROM DUAL; >>22 |
SELECT MYSEQUENCE.CURRVAL FROM DUAL; >>21 |
|
SELECT MYSEQUENCE.NEXTVAL FROM DUAL; >>23 |
|
As you see, the current value of the sequence does not get updated in all the sessions, and so if you need to use sequences in your inserts, straightforward logic does not work. We came up with two workarounds to make this work:
1. Fetch the value of the SEQUENCE.NEXTVAL beforehand (you can use the generic operation ExecuteScalar), and populate the final value in your message – works well if you’re using an orchestration.
2. Create two stored procedures on the Oracle backend – one for NEXTVAL, and another for CURRVAL that store the value of the sequence in a table (see attached sample script), so that the latest value is available across sessions.
In general, if a value that is session dependent needs to be used in various inserts in a composite operation, it should either be pre-fetched, or stored in a temporary table and accessed using functions called from InlineValue.
I have wrote a little about the BRE, and Microsoft is looking for customer experiences also here at this survey.
Today the BizTalk Adapter Development team announced a new whitepaper on troubleshooting the BizTalk Server Soap adapter in BizTalk 2006 and BizTalk 2006 R2 (although a lot of if not all still applies to BizTalk 2004). The download link is here.
The whitepaper goes over the basics of the Soap adapter, several troubleshooting steps, throttling settings, […]
Microsoft%u00ae BizTalk%u00ae Server uses the SOAP adapter and orchestrations to receive and send Web service requests. The SOAP adapter enables orchestrations to be published as Web services and consume external Web services. Because configuring and/or using Web services can be complex, BizTalk Server handles many of these complexities on behalf of the user. Even so, there are still issues arising from time to time. This white paper is designed to highlight common issues and to provide guidance for how to resolve them.
http://www.microsoft.com/downloads/details.aspx?FamilyID=0297745b-7636-4f4d-ab44-62d1abe2330d&DisplayLang=en
I'll be geeking out today on this MSDN Web cast, where I'll be talking about Windows Azure and Microsoft .NET Services, and the impact they'll have on .NET developers in the years ahead. We'll be following the typical geekSpeak formula — all demo, no slides.
MSDN Webcast: geekSpeak: Cloud Services 101 with Aaron Skonnard
12/3/08; 12:00 PM (PST)
http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032397078&Culture=en-US
My copy of RESTful .NET arrived today. In Jon's typical style, he dives right into the meat of the WCF 3.5 REST programming model and doesn't waste much time re-covering the basics. This is a great WCF-specific companion to O'Reilly's RESTful Web Services book. And I love the form factor.
Definitely a must have for .NET developers moving towards REST.
Congrats Jon!
In this screencast, I show you how to host WCF services within traditional Windows services. This is often necessary when you cannot use IIS/ASP.NET hosting for whatever reason or when you don't want to use message-based activation. In certain scenarios you want to ensure that your services are always running and that the host process won't be automatically recycled causing havoc on your underlying resources (think sockets). These are just a few of the reasons why some folks prefer this hosting technique in some cases.
Be sure to check out our growing collection of short screencasts on our screencast landing page.
Previous WCF Screencasts (RSS for all posts in the series)
Thanks to all of you who joined me recently for Shannon & my seminar around Gaining
Efficiencies in SharePoint.
We had a great turn out and I hope you found it useful – we had around 60 mins….the
clock was ticking.
As promised – here’s the PowerPoint slides I used in the presentation.
>
>
Take care and enjoy.
Mick.
Last week I dropped a small teaser video to show a cool way to navigate through a SharePoint site, using jQuery to display a fancy animation. Today I’ve uploaded a beta version of the DockNavigation component to the SmartTools CodePlex project. So if you want to try it out, go ahead and download it! Make sure you let me know any comments, improvements and bugs you may find. Over here you can see a video containing the installation instructions and a small demo. Make sure you install the jQuery component of the SmartTools project as well, since it relies on that one.
SmartTools.DockNavigation from Jan Tielens on Vimeo.