<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Enterprise Database Management Musings</title>
	<atom:link href="http://blogs.sybase.com/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.sybase.com/database</link>
	<description>The Database Blog at Sybase where we can share our thoughts and musings with our community.</description>
	<lastBuildDate>Sat, 17 Dec 2011 02:31:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>So what does an ASE database look like in SAP ERP?</title>
		<link>http://blogs.sybase.com/database/2011/12/so-what-does-an-ase-database-look-like-in-sap-erp/</link>
		<comments>http://blogs.sybase.com/database/2011/12/so-what-does-an-ase-database-look-like-in-sap-erp/#comments</comments>
		<pubDate>Sat, 17 Dec 2011 02:00:37 +0000</pubDate>
		<dc:creator>Rob Verschoor, Technical Director, Data Management Evangelism</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[Business Suite]]></category>
		<category><![CDATA[SAP]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=708</guid>
		<description><![CDATA[Unless you&#8217;ve been living in a cave with no internet connection, it will not be news that SAP and Sybase have been working on making SAP Business Suite run on Sybase ASE. Engineering teams from the two companies (well, we&#8217;re really one company now, but you&#8217;ll get my meaning) have spent a lot of effort [...]]]></description>
			<content:encoded><![CDATA[<p>Unless you&#8217;ve been living in a cave with no internet connection, it will not be news that SAP and Sybase have been working on making SAP Business Suite run on Sybase ASE. Engineering teams from <span id="more-708"></span>the two companies (well, we&#8217;re really one company now, but you&#8217;ll get my meaning) have spent a lot of effort over the past 1.5 years or so, porting SAP&#8217;s Business Suite to Sybase ASE.<br />
A question I&#8217;ve been asked a lot over the past months -by non-SAP ASE users- is what sort of ASE features are used by SAP Business Suite.<br />
We&#8217;ll look at that, but first let&#8217;s clarify some of the terminology. SAP Business Suite consists of five main parts which a SAP customer may or may not all buy. These are:</p>
<ul>
<li>ERP (Enterprise Resource Planning)</li>
<li>CRM (Customer Relationship Management)</li>
<li>SRM (Supplier Relationship Management)</li>
<li>SCM (Supply Chain Management)</li>
<li>PLM (Product Lifecycle Management)</li>
</ul>
<p>Now back to Sybase ASE: I had a look at an ASE database for SAP ERP.<br />
Buckle up, here we go:</p>
<ul>
<li>SAP will be releasing Business Suite on ASE version 15.7.</li>
<li>All SAP application data resides in a single ASE database. There is another small database for use by SAP tools.</li>
<li>The ASE database uses a 16KB page size.</li>
<li>For ERP only (i.e. not counting CRM and the other Business Suite modules), the database contains about 80,000 tables and 170,000 indexes. This is because SAP ERP has many features and functions, all with their own set of tables. SAP customers typically run only a subset of all those functions so in practice a large part of those 80,000 tables will always remain empty. </li>
<li>All SAP tables use datarows locking (there is an interesting historical dimension here: <a href="http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/24275">check out the last big paragraph on this pag</a>e)</li>
<li>All tables names are in uppercase; some table names contain special characters, like the slash character in <strong>&#8220;/BCV/C_QATTR&#8221;</strong> (I don&#8217;t have a clue what that name means, BTW)</li>
<li>Apart from the tables, there are also about 10,000 views. No stored procedures or triggers are used.</li>
<li>SAP makes heavy use of dynamic SQL (also known as &#8220;prepared statements&#8221;).</li>
<li>Many tables have a <strong>text </strong>or <strong>image </strong>column.</li>
<li>All tables are owned by one database user (and that&#8217;s not the <strong>dbo </strong>user).</li>
<li>The ASE database is accessed through ODBC.</li>
<li>
SAP makes frequent use of the built-in ASE Job Scheduler (originally added in ASE 12.5.1).</li>
<li>The ASE server uses Unicode with the <strong>utf8 </strong>character set.</li>
</ul>
<p>An architectural aspect worth mentioning is that the database is completely encapsulated in a SAP system; it runs as an embedded component.<br />
Also, the database is always accessed through SAP tools, specifically SAP&#8217;s &#8216;DBA Cockpit&#8217;. DBA Cockpit is pretty much what the name suggests, namely the central management tool for an SAP system.<br />
In principle, you would never access the database in the SAP system manually outside of DBA Cockpit. In ASE parlance: you wouldn&#8217;t use &#8216;isql&#8217; in an SAP system. Things like looking at query plans or MDA tables is all done through DBA Cockpit.<br />
In fact, I have to say that SAP&#8217;s DBA Cockpit is a really nice management and monitoring tool. Because SAP controls the application and the middleware, they have been able to build pretty nice monitoring features into it, allowing the kind of detail and drill-down that every ASE user would like to have (before you ask: yes, DBA Cockpit is specifically designed for SAP Business Suite; and no, DBA Cockpit is not available as a separate tool outside the Business Suite context). </p>
<p>Another question that has been asked frequently is if existing ASE DBAs will be able to help SAP customers with the implementation of Business Suite-on-ASE. My best guess is that this is will probably not be a very common sight. The primary skill needed to work with SAP customers is knowledge of the SAP application and systems architecture. Installation and creation of the ASE database is all handled by the SAP tools.<br />
Having said that, Sybase ASE skills will definitely be needed somewhere. Customers who run SAP systems on Sybase ASE, especially for large installations, will need some DBAs with ASE knowledge.<br />
I&#8217;ve said it before: with the SAP acquisition, having Sybase skills (ASE, IQ, Replication Server) will eventually turn out to be a Good Thing. With SAP&#8217;s recently stated ambition to become the #2 database company in a few years time (<a href="http://www.informationweek.com/news/software/enterprise_apps/232300472">read more about that here</a>), that&#8217;s another reason to keep your ASE skills up to date &#8212; and to migrate to ASE 15.7. </p>
<p><img src="http://www.sypron.nl/cgi/test5.pl?xxx=" width="1" height="1"></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2011/12/so-what-does-an-ase-database-look-like-in-sap-erp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Big &amp; small stuff in ASE 15.7, and a note for &#8216;Peter&#8217;</title>
		<link>http://blogs.sybase.com/database/2011/10/big-small-stuff-in-ase-15-7-and-a-note-for-peter/</link>
		<comments>http://blogs.sybase.com/database/2011/10/big-small-stuff-in-ase-15-7-and-a-note-for-peter/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 22:43:29 +0000</pubDate>
		<dc:creator>Rob Verschoor, Technical Director, Data Management Evangelism</dc:creator>
				<category><![CDATA[Adaptive Server Enterprise]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=691</guid>
		<description><![CDATA[Last week I did my part in a 5-episode webcast series about Sybase ASE 15.7 &#8211; the latest and greatest incarnation of your favorite OLTP DBMS (and not just yours: ASE is also SAP&#8217;s preferred OLTP DBMS; see here for more).
In case you missed it: ASE 15.7 was released on September 28th, and can now [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I did my part in a 5-episode webcast series about Sybase ASE 15.7 &#8211; the latest and greatest incarnation of your favorite OLTP DBMS (and not just yours: ASE is also<span id="more-691"></span> SAP&#8217;s preferred OLTP DBMS; <a href="http://blogs.sybase.com/database/2011/07/saps-preferred-erp-database-sybase-ase/">see here for more</a>).<br />
In case you missed it: ASE 15.7 was released on September 28th, and can now be downloaded by anyone with a Sybase support contract. For everyone else, the Developer Edition and the Express Edition for ASE 15.7 are also available now.<br />
Specifically for a guy named Peter, I can now finally shed some light on a tech question he brought up &#8212; so Peter, since I did not have your email address, keep reading&#8230;</p>
<p>ASE 15.7 is packed with new functionality. I cannot actually remember an ASE release with so many new features as ASE 15.7. I guess that&#8217;s the reason <a href="http://response.sybase.com/forms/NAO11Q3ASEWBCST157Series">why the webcast comes in 5 installments</a>.<br />
My part of the webcast was about application development features. This means: enhancements to SQL functionality or syntax whose focus is to deliver better (or more) functionality &#8211; as opposed to better performance or shorter maintenance downtime, for example (which ASE 15.7 also has, but that&#8217;s the topic of <a href="http://response.sybase.com/forms/NAO11Q3ASEWBCST157Series">subsequent webcasts</a>). You can listen to the webcast recording <a href="http://www.sybase.com/detail?id=1095121">here</a>.</p>
<p>Let me just briefly recap the highlights of these application-developer-oriented features in ASE 15.7.<br />
First, there have been enhancements to handling of text/image data (collectively known as LOB data). For as long as I can remember, customers have asked for the ability to declare SQL variables and parameters of the text or image datatype. In ASE 15.7, that is now possible. This can be particularly handy when doing XML processing on mature XML documents, which can easily exceed the maximum length of 16KB for a varchar variable.<br />
Another LOB enhancement is known as &#8220;LOB locators&#8221;. This is best described as a &#8220;pointer&#8221; to a LOB variable. When a client application wants to operate on a LOB value (like truncating/overwriting/concatenating it, etc.), ASE 15.7 can send the LOB locator to the client rather than the full LOB value, which may be big. The client app then operates on the locator with new (and existing) T-SQL statements which are sent back to the ASE server where the operation on the LOB value is effectuated. This improves efficiency since no big LOB values need to be exchanged between client and server, but only the small (24 bytes) LOB locator values instead.<br />
If this all sounds a bit cryptic, <a href="http://www.sybase.com/detail?id=1095121">check out the webcast slides</a> for more detail and examples.</p>
<p>Another enhancement in ASE 15.7 is the MERGE statement. <a href="http://blogs.sybase.com/database/2011/05/peeking-ahead-to-ase-15-7-the-merge-statement/">I have blogged about this before, so see there for more details</a>. Suffice to say here that MERGE is a more efficient way of inserting-or-updating a bunch of rows into another table than you could ever code yourself with separate insert an update steps.<br />
This is the point where Peter comes in. At the end of the webcast one listener with that name asked a question which I was unable to answer at the time. His question was whether you can force an index in the MERGE statement in the same way as for other types of query. After consulting with the responsible engineering team, the answer has to be that, unfortunately, this is currently not supported; the same applies to other query plan forcings (I/O size etc) as well as to specifying an abstract query plan. Should you try this, you may find that it actually works fine. However, be warned: it may also just as well not work, since there is currently a number of known issues when using these clauses for MERGE. For that reason, we recommend you do not try to use any query plan forcings around the MERGE statement for now. </p>
<p>There is also a new feature that is perhaps less about app development and more about performance after all. In a nutshell, by enabling the config parameter &#8217;streamlined dynamic SQL&#8217; (disabled by default), a series of internal optimizations around query processing becomes active (not just for dynamic SQL, but for many other types of queries too). This should translate into better performance although it is -as always- hard to predict how much gain you may see in your system. So I&#8217;m not going to speculate. Instead, please let me know what you find. There is no reason not to use this optimization, so please give it a try&#8230;</p>
<p>Lastly, there are some features that qualify as &#8217;small&#8217; in comparison to the other topics discussed. These include syntax enhancements; for example, certain constructs are now allowed in subqueries that previously caused an error.<br />
As it happens, my favorite new ASE feature falls actually in this category. If you want to convert the number 123 to a 6-character string, and pad the result with leading &#8216;0&#8242; characters (i.e. &#8216;000123&#8242;) in pre-15.7 you had to use the following expression (figuring out how this works is left as an exercise to you, reader):</p>
<p><code>select right(replicate('0',6) + convert(varchar,123),6) </code></p>
<p>In ASE 15.7, you can now simply specify the padding character as a third argument to the <code>str() </code>function, so the following is now sufficient: </p>
<p><code>select str(123, 6, '0')</code></p>
<p>Any padding character can be specified (a &#8216;*&#8217; would result in &#8216;***123&#8242;).<br />
Admittedly, it did probably not require a major effort by Sybase&#8217;s most talented engineers to implement this enhancement. But I always really like such little features that make my life easier when coding SQL. Small can certainly be beautiful. </p>
<p>(Coming up in the next webcasts: some ASE new features and enhancements that are really big. Those are cool too. <a href="http://response.sybase.com/forms/NAO11Q3ASEWBCST157Series">Stay tuned</a>.)</p>
<p><a href="http://www.twitter.com/rob_verschoor" target="_blank"><img src="http://twitter-badges.s3.amazonaws.com/follow_me-a.png" alt="Follow rob_verschoor on Twitter" border="0/"></a><br />
<img src="http://www.sypron.nl/cgi/test5.pl?xxx=" width="1" height="1"></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2011/10/big-small-stuff-in-ase-15-7-and-a-note-for-peter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally: here&#039;s how to use ASE in-memory databases with replication</title>
		<link>http://blogs.sybase.com/database/2011/08/finally-heres-how-to-use-ase-in-memory-databases-with-replication/</link>
		<comments>http://blogs.sybase.com/database/2011/08/finally-heres-how-to-use-ase-in-memory-databases-with-replication/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 14:51:05 +0000</pubDate>
		<dc:creator>Rob Verschoor, Technical Director, Data Management Evangelism</dc:creator>
				<category><![CDATA[Adaptive Server Enterprise]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[ASE]]></category>
		<category><![CDATA[in-memory database]]></category>
		<category><![CDATA[Replication Server]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=678</guid>
		<description><![CDATA[Over the past 2 years, I&#8217;ve talked to lots of customers about the ASE in-memory database (IMDB) feature that was introduced in ASE 15.5.
One of the questions I got most often was whether replication was supported with ASE IMDB. Up till now, the not-so-clear answer was both &#8216;yes&#8217; and &#8216;no&#8217;. But as of July 2011, [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past 2 years, I&#8217;ve talked to lots of customers about the ASE in-memory database (IMDB) feature that was introduced in ASE 15.5.<br />
One of the questions I got most often was whether replication was supported with ASE IMDB. Up till now, the not-so-clear answer was both &#8216;yes&#8217; and &#8216;no&#8217;. <span id="more-678"></span>But as of July 2011, with ASE 15.5 ESD#4 and RepServer 15.6 ESD#1 released, the answer is now just &#8216;yes&#8217; : replication is supported. I thought some explanation would be helpful as to what this all means&#8230;</p>
<p>First, a quick IMDB recap: the virtue of the ASE IMDB is that there is no persistent storage: an IMDB database lives entirely in cache (=memory). If there&#8217;s no disk, then there&#8217;s no disk I/O either. Since the contents of an IMDB are lost after an ASE reboot, there is no need to do a transaction logging for the purpose of recovering the database when ASE start up again. This allows all sorts of internal optimizations around disk I/O and buffer cache management, as well as around transaction logging. Otherwise, an ASE IMDB is pretty much identical to a fully cached classic ASE database.<br />
This all means that if you run workload that performs heavy disk write activity, and/or has many concurrent transactions, then the ASE IMDB may deliver better performance since these two areas were optimized. For other workload (like select statements), you should not expect significant performance gains from an IMDB. </p>
<p>Sybase&#8217;s message has always been that an ASE IMDB is functionally equivalent to any other ASE database, except that its transactions are not durable (i.e. not retained over an ASE reboot due to absence of persistent storage. This was usually the point where the question came up whether you could use ASE IMDBs with Replication Server.<br />
As RepServer users know, replication involves a number of things in each primary or replicate database, such as: the ASE RepAgent configuration for that database, the secondary truncation point in the transaction log, the maintenance user and the rs_lastcommit table. RepServer expects these items to always be present, also when the ASE server containing the primary or replicate ASE database has been shut down and rebooted.</p>
<p>So far it&#8217;s all pretty obvious, but now we&#8217;ve gotten to the point where the subtleties start to kick in.</p>
<p>To use an IMDB database as a replication source, its secondary truncation point, rs_lastcommit table etc. need to be still present after an ASE reboot. But since we don&#8217;t have any persistent storage in an IMDB, that information will be gone after ASE restarts; consequently replication will then no longer work. To make replication to or from an IMDB possible, some non-standard setup steps are required. In addition, some internals had to be changed for use with IMDBs, both in ASE and in RepServer.<br />
With ASE version 15.5 ESD#4 and Replication Server version 15.6 ESD#1, which were both released in July 2011, the situation is now that replicating to and from IMDBs is supported (note: you need both the ASE ESD and the RepServer ESD).  Those non-standard setup steps are still required &#8212; basically this involves using a template database for the IMDB in which the truncation point, rs_lastcommit etc. are stored. This template database gets copied into the IMDB, thus providing it with the maintenance user etc. (details are described in a whitepaper; see below). </p>
<p>So, before ASE 15.5 ESD#4 and Replication Server 15.6 ESD#1, did replication work for IMDBs? As I mentioned earlier, the answer is both &#8216;yes&#8217; and &#8216;no&#8217;.<br />
The answer is &#8216;yes&#8217; because when you set up the replication system, everything will keep working fine as long as ASE is not rebooted. The answer is &#8216;no&#8217; because after an ASE reboot, you will need to setup the replication configuration for the IMDBs in that ASE server all over again, which is hardly how most customers would qualify as &#8216;replication works&#8217;.<br />
Another &#8216;yes&#8217; lies in the fact that prior to ASE 15.5 ESD#4 + RS 15.6 ESD#1, you could also use the template database to contain the truncation point etc. But, there&#8217;s another &#8216;no&#8217; as well: in certain -rather specific- situations, replication from an IMDB might not always work as you would expect, and could for example cause significant delays in replicating data out of an IMDB (for internal technical reasons). </p>
<p>This mix of &#8220;yes, it works&#8221; and &#8220;no, it doesn&#8217;t quite work&#8221; is just a different way of saying that you really need ASE 15.5 ESD#4 as well as Replication Server 15.6 ESD#1 in order to use IMDBs in a replication system.<br />
The details of how to set up replication for IMDBs, including actual code examples, are described in a technical whitepaper that was just published at sybase.com at this location: <a href="http://www.sybase.com/detail?id=1094415" target="_blank">http://www.sybase.com/detail?id=1094415</a>.</p>
<p>With that, all questions on IMDB and replication are now answered, I hope&#8230;</p>
<p><a href="http://www.twitter.com/rob_verschoor" target="_blank"><img src="http://twitter-badges.s3.amazonaws.com/follow_me-a.png" alt="Follow rob_verschoor on Twitter" border="0/"></a><br />
<img src="http://www.sypron.nl/cgi/test5.pl?xxx=" width="1" height="1"></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2011/08/finally-heres-how-to-use-ase-in-memory-databases-with-replication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP&#039;s preferred ERP database: Sybase ASE</title>
		<link>http://blogs.sybase.com/database/2011/07/saps-preferred-erp-database-sybase-ase/</link>
		<comments>http://blogs.sybase.com/database/2011/07/saps-preferred-erp-database-sybase-ase/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 21:45:09 +0000</pubDate>
		<dc:creator>Rob Verschoor, Technical Director, Data Management Evangelism</dc:creator>
				<category><![CDATA[Adaptive Server Enterprise]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[ASE]]></category>
		<category><![CDATA[SAP ERP]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=673</guid>
		<description><![CDATA[Earlier this year, I blogged that things were looking great for Sybase ASE, among other databases. About half a year later, this looks ever more true.
Now, I may rightly be accused of being somewhat biased towards ASE, but in this case I&#8217;m taking my cues from sources with significant credibility of their own.
First, IDC analyst [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this year, <a href="http://blogs.sybase.com/database/2011/02/2011-an-interesting-year-for-sybase-databases/">I blogged that things were looking great for Sybase ASE</a>, among other databases. About half a year later, this looks ever more true.<br />
Now, I may rightly be accused of being <span id="more-673"></span>somewhat biased towards ASE, but in this case I&#8217;m taking my cues from sources with significant credibility of their own.</p>
<p>First, IDC analyst Carl Olofson published a report titled <a href="http://www.sybase.com/detail?id=1093641">&#8220;SAP and Sybase: A Marriage Made in Database Heaven&#8221;</a>. Indeed, Mr. Olofson sees some very compelling value-adds around database technology now that SAP and Sybase are the same company.<br />
(in the interest of full disclosure, I should point out that this IDC report is an independent IDC publication, and was not sponsored by SAP or Sybase)</p>
<p>The IDC report points out the value of Sybase ASE as SAP&#8217;s ERP database, and therefore as a major weapon against Oracle&#8217;s dominance of the SAP database tier. This has been pointed out before, but what is interesting is to see IDC describe ASE as SAP&#8217;s &#8216;preferred&#8217; database for ERP &#8211; that&#8217;s music to the ears of everyone with a stake in ASE (more on that &#8216;preferred&#8217; status below).<br />
Furthermore, Sybase IQ is seen as the preferred database to power BusinessObjects as well as non-100%-SAP enterprise data warehouses. Sybase Replication Server could be a key technology to move data into IQ as well as into HANA. That&#8217;s all good news when you have Sybase skills today.<br />
Perhaps the most fascinating thought in the IDC report is that SAP&#8217;s in-memory HANA technology could make its way into ASE as well as IQ, thus making ASE and IQ stronger database platforms of their own. That would indeed be an enrichment for ASE and IQ.<br />
Mr. Olofson also makes an interesting non-technical point. SAP, primarily an application-oriented company, is good at selling on business level, whereas Sybase -more an infrastructure-oriented technology company- has always been best at selling to technologists. Combining these two approaches could result in significant market power.<br />
The IDC report <a href="http://www.sybase.com/detail?id=1093641">is available here</a>. </p>
<p>Coming back to Sybase ASE: indeed, SAP&#8217;s message is that &#8220;ASE will be SAP&#8217;s preferred database for transaction environments&#8221; (here, &#8216;transaction environments&#8217; means: SAP ERP). These aren&#8217;t my words, but those of Chris McClain who is SAP&#8217;s General Manager of Mobility and Sybase Solutions. This quote comes from his SAP ERP-on-ASE presentation at the recent SAPPHIRE conference (at <a href="http://www.sapphirenow.com/sessiondetails.aspx?sId=106">http://www.sapphirenow.com/sessiondetails.aspx?sId=106</a>; jump to 02:10 should you want to hear it for yourself).<br />
This is no small endorsement of ASE by SAP. Of course, SAP still supports all those other databases too, but now that SAP owns ASE, this brings unprecedented opportunities to optimally integrate SAP ERP with ASE. In addition, ASE is being positioned as a more cost-efficient database for ERP customers. For a business-oriented customer base like SAP&#8217;s, that is perhaps the most important selling point of all. </p>
<p>For me, SAP&#8217;s statements about ASE being the preferred ERP database, echoed by the IDC report, is another confirmation that the core Sybase database products enjoy fantastic opportunities as part of SAP. The future does look great indeed. </p>
<p><a href="http://www.twitter.com/rob_verschoor" target="_blank"><img src="http://twitter-badges.s3.amazonaws.com/follow_me-a.png" alt="Follow rob_verschoor on Twitter" border="0/"></a></p>
<p><img src="http://www.sypron.nl/cgi/test5.pl?xxx=" width="1" height="1"></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2011/07/saps-preferred-erp-database-sybase-ase/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Peeking ahead to ASE 15.7: the MERGE statement</title>
		<link>http://blogs.sybase.com/database/2011/05/peeking-ahead-to-ase-15-7-the-merge-statement/</link>
		<comments>http://blogs.sybase.com/database/2011/05/peeking-ahead-to-ase-15-7-the-merge-statement/#comments</comments>
		<pubDate>Fri, 27 May 2011 21:13:15 +0000</pubDate>
		<dc:creator>Rob Verschoor, Technical Director, Data Management Evangelism</dc:creator>
				<category><![CDATA[Adaptive Server Enterprise]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Sybase ASE]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=646</guid>
		<description><![CDATA[In the second half of 2011, the release of the next version of ASE is expected: ASE 15.7.
(on the version number: the previous version was ASE 15.5, so, indeed, we&#8217;re skipping 15.6. Why? Well, because sometimes you just have to&#8230;)
I&#8217;ve been on a road show last week (the EMEA TechDays) and on a transatlantic flight [...]]]></description>
			<content:encoded><![CDATA[<p>In the second half of 2011, the release of the next version of ASE is expected: ASE 15.7.<br />
(on the version number: the previous version was ASE 15.5, so, indeed, we&#8217;re skipping 15.6. Why? Well, because sometimes you just have to&#8230;)<span id="more-646"></span></p>
<p>I&#8217;ve been on a road show last week (the EMEA TechDays) and on a transatlantic flight this week, and that always brings lots of wasted time at airports and on planes.<br />
Putting some of that time to good use got me to dig into the many, many new features that will be part of ASE 15.7.<br />
In this blog I&#8217;d just like to put the spotlight on a new feature that I really like: the MERGE SQL statement.</p>
<p>MERGE appeared in the ANSI SQL 2003 standard. Its can be described as &#8220;insert rows into a table, except when they already exist in that table, in which case the existing rows should be updated&#8221;.<br />
The requirement to implement such functionality occurs more often in database systems, and is often referred to as &#8220;upsert&#8221;,  i.e. &#8220;update+insert&#8221; (though, as I&#8217;ll explain later, that&#8217;s actually not a good term to use).</p>
<p>Here&#8217;s an example of using MERGE. We have a central table Customers that contains customer data, and we need to process a weekly set of updates. These updates are rows in the table Cust_updates_week_10 (for simplicity, the updates only concern the address and phone number in this example):</p>
<pre><strong>
1    merge into Customers as c
2    using Cust_updates_week_10 as u
3    on c.CustID = u.CustID
4    when not matched then
5         insert (CustID,Addr,Phone) values(u.CustID,u.Addr,u.Phone)
6    when matched then
7         update set Addr=u.Addr, Phone=u.Phone
</strong></pre>
<p>Let&#8217;s walk down the various lines:<br />
Lines 1/2 specifies that the target is the table (or view) Customers, and the rows from Cust_updates_week_10 should be inserted or updated here.<br />
Line 3 specifies the condition that determines whether a row exists or not. This example shows just one predicate, but you can specify more. Under the covers, ASE performs a left outer join between Cust_updates_week_10 and Customers, using this on-clause (why an outer join? Because all rows in Cust_updates_week_10 must be processed).<br />
Line 4/5 indicate that when a row from Cust_updates_week_10 does not exist in Customers (according to the on-clause on line 3), then it is apparently a &#8216;new&#8217; customer and it must be inserted.<br />
If the row does exist already (line 6), then the non-key columns of the existing row must be updated (line 7 &#8212; again, this example restricts itself to address and phone number columns only)</p>
<p>The basic idea of the MERGE syntax can be extended. For example, there can be multiple &#8220;when matched&#8221; and &#8220;when not matched&#8221; clauses, and these can specify additional predicates.<br />
In the example below, there are two &#8220;when matched&#8221; clauses, with the first one testing for an empty address &#8212; meaning that when the row&#8217;s key already exists, but the new address is empty, then the existing row must be deleted from the Customers table:</p>
<pre><strong>
merge into Customers as c
using Cust_updates_week_10 as u
on c.CustID = u.CustID
when not matched then
  insert (CustID,Addr,Phone) values(u.CustID,u.Addr,u.Phone)
when matched and u.Addr = NULL then
  delete
when matched then
  update set Addr=u.Addr, Phone=u.Phone
</strong></pre>
<p>Note that the order of multiple &#8220;when matched&#8221; or &#8220;when not matched&#8221; clauses is important: for the first clause where all conditions are true, the action is executed, and subsequent clauses of the same &#8220;when [not] matched&#8221; type, will be ignored. </p>
<p>This last example shows why &#8220;upsert&#8221; is too restricted a summary of what MERGE can do: not just insert-or-otherwise-update, but it can also delete. So &#8220;updelsert&#8221; would do more justice to the functionality of MERGE, but somehow that sounds less catch than &#8220;upsert&#8221;. </p>
<p>The attraction or MERGE is that you can pack quite a bit of functionality into one statement. Not only does that let you write more compact SQL code, but it can also deliver better performance. The MERGE statement makes only one pass over the source table (Cust_updates_week_10), and directly processes every row it finds. If you were to write the same functionality with individual insert, update and delete statements, you would need at least three passes over the data. </p>
<p>MERGE is flexible: instead of using a source table, a derived table can be specified as follows:</p>
<pre><strong>
merge into Customers as c
using (select CustID, Addr, Phone from Cust_updates_week_10
       where Phone is not NULL) as u
on c.CustID = u.CustID
when not matched then
  insert (CustID,Addr,Phone) values(u.CustID,u.Addr,u.Phone
when matched then
  update set Addr=u.Addr, Phone=u.Phone
</strong></pre>
<p>Note that there are some restrictions around using MERGE. For example, the key columns on line 3 cannot be updated. There may be some other restrictions too; we&#8217;ll see how far things got once 15.7 is released. </p>
<p>Stay tuned for more information about ASE 15.7!</p>
<p><img src="http://www.sypron.nl/cgi/test5.pl?xxx=" width="1" height="1"></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2011/05/peeking-ahead-to-ase-15-7-the-merge-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2011: an interesting year for Sybase databases</title>
		<link>http://blogs.sybase.com/database/2011/02/2011-an-interesting-year-for-sybase-databases/</link>
		<comments>http://blogs.sybase.com/database/2011/02/2011-an-interesting-year-for-sybase-databases/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 02:17:15 +0000</pubDate>
		<dc:creator>Rob Verschoor, Technical Director, Data Management Evangelism</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Sybase IQ]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=630</guid>
		<description><![CDATA[Gravity sucks.
An unfortunate fall (or rather, an unfortunate landing) caused me to break a shoulder bone a few weeks ago, greatly complicating any activity requiring active involvement of my right arm or shoulder. Turns out there’s a lot more of those activities than you’re normally aware of&#8230; Anyway, things have improved a bit by now [...]]]></description>
			<content:encoded><![CDATA[<p>Gravity sucks.<br />
An unfortunate fall (or rather, an unfortunate landing) caused me to break <span id="more-630"></span>a shoulder bone a few weeks ago, greatly complicating any activity requiring active involvement of my right arm or shoulder. Turns out there’s a lot more of those activities than you’re normally aware of&#8230; Anyway, things have improved a bit by now (thanks for asking) although I&#8217;ve been forced to learn more about ruptured muscles and ligaments than I ever desired. <!-- it's an avulsion fracture of the tuberculum majus, which has healed now, and a rupture of the inferior glenohumeraal ligament, which hasn't, should you care--><br />
(there&#8217;s an upside in every downside though , and in the process, I discovered the <a href="http://bodybrowser.googlelabs.com/">Google BodyBrowser</a> &#8211; quite an interesting tool to figure out what body component is keeping you awake with pain signals in the middle of the night. Even if you&#8217;re healthy it&#8217;s still pretty cool. Check it out at <a href="http://bodybrowser.googlelabs.com/">http://bodybrowser.googlelabs.com/</a>. But I digress.) </p>
<p>Making the best of my somewhat handicapped situation got me to focus more on reading than on anything else for the past month. (I have this mail folder labelled &#8220;MUST-READ&#8221; for interesting stuff I come across that I really need to read, but somehow that folder just keeps filling up. The information age is great with all that interesting and highly relevant material you can find quickly, but digesting it still takes old-fashioned time. Why do I never hear about a solution for that problem? But I digress again.)</p>
<p>Anyway, after catching up on some outstanding material I realised that 2011 promises to see quite some interesting stuff happening in the Sybase database arena. </p>
<p>First, ASE (Adaptive Server Enterprise, Sybase&#8217;s mission-critical OLTP database) will be making its debut as the database powering SAP&#8217;s Business Suite (formerly known as R/3) later this year. This should be great news for everyone with a stake or interest in ASE, as this constitutes a major endorsement of ASE. It also validates ASE&#8217;s long-standing approach towards resource-efficiency, low TCO, and high OLTP performance. In my opinion, SAP&#8217;s embracing of ASE as the database engine for their main product can only strengthen ASE as a platform. Hopefully, at some point this translates into a richer ecosystem around ASE, more ISVs certifying their applications on ASE, and more demand for ASE skills.<br />
Furthermore, a fresh ASE release will likely appear somewhere in 2011, featuring an interesting range of new features and functionality. Stay tuned for more details. </p>
<p>Another bright spot in the sky is the upcoming version 15.3 of Sybase IQ, our analytics database. As <a href="http://blogs.sybase.com/sybaseiq/2010/11/redifining-mpp/">you may have heard</a>, the beta version of IQ 15.3 was released a while ago. Loosely put, IQ 15.3 can use multiple cluster nodes to process a single query. Previously, when an IQ cluster node received a query, it had to process it entirely by itself. However, in IQ 15.3, capacity from other cluster nodes can also be used to process that query. This allows IQ to put the hardware&#8217;s computing power to maximum use, making IQ a more flexible, powerful and efficient analytics engine. I must admit I didn&#8217;t get round to trying out IQ 15.3 myself yet (an issue temporarily inhibiting my typing ability, which I may have mentioned), but I&#8217;m certainly eager.<br />
Other good news around IQ are the announced plans to provide closer integration between Business Objects (also an SAP company) and IQ. While no specifics have yet been announced, the prospect of BOBJ specifically optimised for IQ (or the other way around) feels quite compelling: this combination would really deliver on the promise to extract value from data in less time. </p>
<p>Interesting smells are coming out of the SQL Anywhere kitchen, too. <a href="http://iablog.sybase.com/kleisath/">Some recent blog posts</a> indicate some interesting ideas around cloud-enabled database processing. While I&#8217;m usually not much into SQL Anywhere (I&#8217;m really an ASE guy), this did attract my attention. I&#8217;ll be closely following what the SQL Anywhere folks will be serving up, and I recommend you do the same. </p>
<p>And finally, another recommendation: be careful with that gravity stuff. It can pull you down really hard.</p>
<p><a href="http://www.twitter.com/rob_verschoor" target="_blank"><img src="http://twitter-badges.s3.amazonaws.com/follow_me-a.png" alt="Follow rob_verschoor on Twitter" border="0/"></a></p>
<p><img src="http://www.sypron.nl/cgi/test5.pl?xxx=" width="1" height="1"></p>
<p><em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2011/02/2011-an-interesting-year-for-sybase-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Impressions from SAP TechEd 2010</title>
		<link>http://blogs.sybase.com/database/2010/10/impressions-from-sap-teched-2010/</link>
		<comments>http://blogs.sybase.com/database/2010/10/impressions-from-sap-teched-2010/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 23:55:45 +0000</pubDate>
		<dc:creator>Rob Verschoor, Technical Director, Data Management Evangelism</dc:creator>
				<category><![CDATA[Event]]></category>
		<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[Database Strategy]]></category>
		<category><![CDATA[Replication Server]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Sybase]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=615</guid>
		<description><![CDATA[Even if you&#8217;ve only loosely followed developments around Sybase, it&#8217;s still pretty likely that you noticed Sybase being acquired by SAP recently.
Yes, Sybase is now part of the largest application software company in the world.  
Even though I&#8217;ve gotten used to it now (and I even have an SAP email address in addition to [...]]]></description>
			<content:encoded><![CDATA[<p>Even if you&#8217;ve only loosely followed developments around Sybase, it&#8217;s still pretty likely that you noticed <a href="http://www.google.com/search?q=sybase+sap+acquisition">Sybase being acquired by SAP recently</a>.<br />
Yes, Sybase is now part of the largest application software company in the world.  </p>
<p>Even though I&#8217;ve gotten used to it now (and I even have an SAP email address in addition to my Sybase email) I must say I&#8217;m still pretty excited about the acquisition, and I see lots of opportunities for the Sybase infrastructure products <span id="more-615"></span>making their way into the SAP technology stack.<br />
Some of the things known so far:</p>
<ul>
<li>SAP Business Suite (formerly known as R/3, the classic SAP ERP system) will run on Sybase ASE sometime in 2011</li>
<li>there will be closer integration between IQ and Business Objects (which was also acquired by SAP a few years ago)</li>
<li>the Sybase mobility products will be used to mobilize various SAP applications</li>
</ul>
<p>No doubt there will be more on these and other projects in the future &#8212; as I write this, the acquisition is less than 3 months old, so it is still early with respect to the details of how the two companies&#8217; technologies will come together.  </p>
<p>Anyway, last week I attended the SAP TechEd conference in Berlin (Germany). My objective was to deliver a number of presentations on ASE and IQ, but while there I was naturally interested in getting an idea of what the SAP community thought about Sybase. After all, many or most attendees would likely not have much experience with Sybase products, or perhaps would not even have heard of Sybase. </p>
<p>I was therefore pleasantly surprised to see &#8220;Sybase technology&#8221; prominently mentioned as one of the highlights of the conference at the top of page 1 of the conference agenda booklet.<br />
Sybase sure got exposure during the big-hall opening session: In the pre-keynote, some metrics were shown about TechEd (e.g. 4000 attendees here; 15000 over the joint 4 TechEd locations). Among these, the text &#8216;17 Sybase sessions&#8217; was highlighted, which put Sybase in the spotlight from the start. </p>
<p>During the subsequent keynote by Vishal Sikka (the SAP CTO), I counted the word &#8216;Sybase&#8217; 22 times; &#8216;ASE&#8217;: 3 times, &#8216;CEP&#8217;: 2 times; &#8216;Replication Server&#8217;: 1 time (and also played a role in a live keynote demo). &#8216;Mobility&#8217; was mentioned all over the keynote and Vishal Sikka said that &#8220;with Sybase, SAP is the #1 business mobility company&#8221;. </p>
<p>I could tell SAP operates in different market segments than where Sybase is traditionally active: the SAP promo video at the start or the keynote looked like a flashy TV commercial, featuring anything from Harley Davidson motorcycles to 27 different kinds of ladies&#8217; high heels&#8230; Quite a different emphasis from the Wall Street-type images you&#8217;ll typically see at a Sybase event. Again, I see lots of opportunities for Sybase&#8217;s products to find their way into places that were not really reachable before. </p>
<p>For my presentation &#8220;Overview of Sybase IQ&#8221; I had seriously counted with the prospect of zero attendees, this being a potentially Sybase-unaware audience. So when facing ~90 folks at the start of my talk, I felt compelled to verify we were all coming for the same topic &#8212; and apparently we were, since nobody then walked out. Interestingly, only 3 of the attendees were actually having some knowledge of Sybase products; the rest left the session convinced that IQ is great (or so I hope; haven&#8217;t seen any evaluation forms yet).<br />
Similar patterns occurred during the other sessions about Sybase data management products (IQ, ASE, RepServer, CEP). The general feedback I got from the TechEd attendees I spoke to was that they were quite happy with SAP having taken Sybase on board, as this would inject some great technology into the SAP world. I couldn&#8217;t agree more.</p>
<p>So, lots of happy moments. However, there were some awkward moments as well &#8212; and I&#8217;m not making this up. When trying to strike up a conversation in the exhibit hall with folks in the IBM and Oracle booths<br />
(&#8217;hey, can we chat about the underlying database in a SAP Business Suite installation?&#8217;) I got some very reserved looks when they spotted &#8216;Sybase&#8217; on my badge (Sybase keeps operating under its own name while being part of SAP). The arrival of Sybase ASE as a competitor in the SAP database arena had clearly not been lost on them &#8212; which may also explain why both conversations took sudden turns towards football.</p>
<p>In summary, there was much more &#8220;Sybase&#8221; in TechEd 2010 than I had dared to hope. That feels great!</p>
<p><a href="http://www.twitter.com/rob_verschoor" target="_blank"><img src="http://twitter-badges.s3.amazonaws.com/follow_me-a.png" alt="Follow rob_verschoor on Twitter" border="0/"></a><br />
<img src="http://www.sypron.nl/cgi/test5.pl?xxx=" width="1" height="1"></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2010/10/impressions-from-sap-teched-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preventing Data Breaches with Sybase ASE</title>
		<link>http://blogs.sybase.com/database/2010/09/preventing-data-breaches-with-sybase-ase/</link>
		<comments>http://blogs.sybase.com/database/2010/09/preventing-data-breaches-with-sybase-ase/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 19:29:22 +0000</pubDate>
		<dc:creator>Jeff Pryslak, Senior Manager</dc:creator>
				<category><![CDATA[Sybase ASE]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=594</guid>
		<description><![CDATA[At this weeks security session on Preventing Data Breaches, we asked a Polling question, so I though the results should be shared.  They are very interesting in that all attendees are aware of sensitive data within their systems and that basic need to protect even personal information is a critical concept in today&#8217;s world. [...]]]></description>
			<content:encoded><![CDATA[<p>At this weeks security session on Preventing Data Breaches, we asked a Polling question, so I though the results should be shared.  They are very interesting in that all attendees are aware of sensitive data within their systems and that basic need to protect even personal information is a critical concept in today&#8217;s world.  <div id="attachment_595" class="wp-caption aligncenter" style="width: 410px"><a href=http://blogs.sybase.com/database/wp-content/uploads/2010/09/InfoSecWebcastPollTypeOfData.JPG rel="attachment wp-att-595"><img src="http://blogs.sybase.com/database/wp-content/uploads/2010/09/InfoSecWebcastPollTypeOfData.JPG" alt="This is the Poll results from my recent online security seminar." title="Types Of Sensitive Data Poll" width="400" height="110" class="size-full wp-image-595" /></a><p class="wp-caption-text">This is the Poll results from my recent online security seminar.</p></div></p>
<p>So, these results show a clear need to store both personal and customer information, which also needs to be secured.  I was pleasantly surprised by the number, 18%, of systems that store Credit Card information, since that is closely governed by VISA and Mastercard.</p>
<p>Thank you to everyone that showed up, and I will update this post, or create another one when the OnDemand URL becomes available.</p>
<p>EDIT:<br />
Here are the two links for the <a href="http://www.sybase.com/detail?id=1084601&#038;contentOnly=true">OnDemand webcast</a> and the whitepaper that covers a discussion around <a href="http://www.sybase.com/detail?id=1084831&#038;contentOnly=true ">data breaches and sybase options.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2010/09/preventing-data-breaches-with-sybase-ase/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Another great Techwave comes to a close</title>
		<link>http://blogs.sybase.com/database/2010/08/another-great-techwave-comes-to-a-close/</link>
		<comments>http://blogs.sybase.com/database/2010/08/another-great-techwave-comes-to-a-close/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 18:41:15 +0000</pubDate>
		<dc:creator>Jeff Pryslak, Senior Manager</dc:creator>
				<category><![CDATA[Sybase ASE]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=588</guid>
		<description><![CDATA[Thank you to all the people that made this years techwave such a great success. From customers to partners to employees there was an air of excitement about or continued commitment to the products in our portfolio even after the SAP acquisition. The roadmap sessions held on Wednesday afternoon were all well attended with good [...]]]></description>
			<content:encoded><![CDATA[<p>Thank you to all the people that made this years techwave such a great success. From customers to partners to employees there was an air of excitement about or continued commitment to the products in our portfolio even after the SAP acquisition. The roadmap sessions held on Wednesday afternoon were all well attended with good questions from the audience answered by the product managers.  In the IQ roadmap session Yiwen lead us through the next three years of product direction, while Raj in the ASE session showed a clear commitment to fulfill outstanding customer requests in the upcoming releases. </p>
<p>All in all these releases lookto keep us a great market position to continue our double digit growth. </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2010/08/another-great-techwave-comes-to-a-close/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is BCP supported with FIFOs?  (yes, finally)</title>
		<link>http://blogs.sybase.com/database/2010/08/is-bcp-supported-with-fifos-yes-finally/</link>
		<comments>http://blogs.sybase.com/database/2010/08/is-bcp-supported-with-fifos-yes-finally/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 20:45:00 +0000</pubDate>
		<dc:creator>Rob Verschoor, Technical Director, Data Management Evangelism</dc:creator>
				<category><![CDATA[Adaptive Server Enterprise]]></category>
		<category><![CDATA[Operations]]></category>
		<category><![CDATA[Sybase ASE]]></category>
		<category><![CDATA[ASE]]></category>
		<category><![CDATA[bcp]]></category>
		<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://blogs.sybase.com/database/?p=567</guid>
		<description><![CDATA[Many ASE users are familiar with the concept of using Unix/Linux named pipes (FIFOs) in combination with BCP in order to speed up transferring data between ASE servers. These named pipes are the things you create with the Unix/Linux mkfifo command.
Guess what? Despite this having been used by many Sybase users forever, using BCP with [...]]]></description>
			<content:encoded><![CDATA[<p>Many ASE users are familiar with the concept of using Unix/Linux named pipes (FIFOs) in combination with BCP in order to speed up transferring data between ASE servers. These named pipes are the things you create with the Unix/Linux <code>mkfifo</code> command.</p>
<p>Guess what? Despite this having been used by many Sybase users forever, using BCP with FIFOs has formally always been unsupported by Sybase. <span id="more-567"></span></p>
<p>Yes, that&#8217;s right. </p>
<p>That is, until recently. Here&#8217;s the story. </p>
<p>But first, a bit of context.  A common scenario for using BCP+FIFOs involves BCP&#8217;ing a table from server A to server B: when the table is large, you have to wait until the table is fully BCP&#8217;d out to a file before you can start BCP&#8217;ing it into the target server. By BCP&#8217;ing into a named pipe instead) of a file, you can immediately start BCP&#8217;ing into the target server, thus saving time.  This works because a named pipe is a FIFO, to which one user can write and another can read at the same time, and the reader reads the data in the order it was written.<br />
In older years, using this approach was necessary when the operating system could not support files greater than 2Gb, and BCP&#8217;ing out a large table would have exceeded this file size. </p>
<p>Given that this is a pretty standard way of working, and named pipes are a standard Unix mechanism, you&#8217;d expect this to be supported, right? So did I.</p>
<p>Earlier this year, a customer asked me why it was that Sybase did <strong>not</strong> support BCP+FIFO. Having been using FIFOs with BCP for as long as I can remember, I told the customer he was mistaken and Sybase surely supported this combination.<br />
Not willing to give in, the customer then took me to the <a href="http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc30191.1502/html/utility/X14951.htm">Utility Guide manual</a> (scroll down to the &#8220;Usage&#8221; section), and there it said, unmistakably:<br />
<code><br />
	You cannot use named pipes to copy files in or out<br />
</code><br />
That was quite a surprise for me: I had been using this for so many years!<br />
I promised the customer to look into it, and made a mental note not to assume again that a customer is wrong without checking the facts first (a principle I try to hold high, but sometimes you let things slip&#8230;)</p>
<p>My first thought was that in some recent ASE version this restriction had somehow crept into the documentation. So I dug up the oldest version of the Utility Guide manual I could find, which appeared to be for 11.0, dating back to 1995. To my astonishment, that old version of the document included exactly the same restriction. Apparently I had missed something over the years&#8230;</p>
<p>Puzzled, I then embarked on what came to be a journey past many Sybase collegues across various engineering teams.<br />
Almost everyone in Sybase whom I asked about the reason for this restriction were unaware of it, and instead, were pretty certain that BCP+FIFO was fully supported. At least I wasn&#8217;t the only one who had missed something, which made me feel a little better.<br />
However, nobody felt happy to simply remove the restriction from the documentation without a full understanding of what this was all about. It didn&#8217;t exactly help that the documentation provided no details on the technical reasons for this restriction. </p>
<p>On the other hand, some other Sybase collegues immediately agreed that this restriction was correct &#8212; because it mentiones &#8220;named pipes&#8221;. While for most people a &#8220;named pipe&#8221; is a Unix/Linux FIFO, some folks primarily think of &#8220;named pipes&#8221; in Windows. However, Windows named pipes is really a client-server transport protocol, and has nothing to do with the FIFO mechanism (and indeed, has nothing to do with BCP as such). While the documented restriction didn&#8217;t provide any clarification on what a &#8220;named pipe&#8221; really meant in this context, we decided we focus on the Unix/Linux FIFO since that was most relevant to customers.</p>
<p>At this point, the options seemed to be:</p>
<ol>
<li>the documented restriction was simply incorrect, and BCP+FIFO was supported. But in that case, why was the restriction put in the docs?
</li>
<li>the restriction stemmed from an issue in some old ASE version which had been fixed long ago, but the documentation had never been updated
</li>
<li>the restriction was real &#8212; but in what way?
</li>
</ol>
<p>We had to figure out which was the right answer.<br />
Eventually I found someone who had once heard that there could be issues with text/image columns when using BCP+FIFO. But a quick test showed everything to work fine, so this meant that if the restriction was real, it was probably something more complex. Eventually some engineers started digging into source code in search for clarity. </p>
<p>After some time, it was discovered that BCP sometimes performs an lseek() system call, which would work fine on regular files, but could potentially fail on named pipes. As far as the engineer was concerned, that answered the question, but obviously this explanation would be of little use for customers. </p>
<p>After further searching and discussion, it was determined that this lseek() system call would occur only under a very specific set of conditions, all of which must apply:</p>
<ol>
<li>it has to be a BCP-in, i.e. from a named pipe into a database table; BCP-out to a named pipe is unaffected
</li>
<li>the table being copied into has one or more text or image columns (or similarly stored data, like off-row Java classes)
</li>
<li>the BCP-in operation uses a BCP format file
</li>
<li>the BCP format file specifies a non-zero prefix length for a text/image column
</li>
<li>the actual data size of the text/image column being copied is greater than the maximum size copied for such columns by BCP (this size is 32Kb by default and can be overridden by the -T flag)
</li>
</ol>
<p>If all of the above are true, then it could happen that BCP would fail to correctly copy data into the table from the named pipe.<br />
So that&#8217;s what it was all about&#8230;</p>
<p>This restriction is not likely to have a wide impact. Chances are that most ASE users have never used a BCP format file in the first place, let alone with a specification of non-zero prefix lengths (I must admit I had no idea what a &#8220;prefix length&#8221; was; see the BCP documentation for details if you&#8217;re really interested).<br />
It seems therefore safe to conclude that the original restriction was formulated too broadly (to the point of overkill, I&#8217;d say), and that BCP+FIFO are perfectly safe for use in the vast majority of cases. </p>
<p>The question remains why such a very specific situation was covered with such a sweeping restriction. I guess we&#8217;ll never know the reason since the origins date back so many years. It just proves once more that writing documentation is hard, especially if you want it to be correct, useful and informational. </p>
<p>Anyway, you can rest assured now that BCP is safe to use with FIFOs &#8212; the Unix/Linux FIFO mechanisms, that is. </p>
<p>A technote with a short summary of the above has been published at <a href="http://www.sybase.com/detail?id=1080140">http://www.sybase.com/detail?id=1080140</a>. </p>
<p><img src="http://www.sypron.nl/cgi/test5.pl?xxx=" width="1" height="1"></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sybase.com/database/2010/08/is-bcp-supported-with-fifos-yes-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>





