Friday, May 17, 2013

The fRiDaY File - Is it sap or is it ess-a-pee?

Question: How do I pronounce "SAP"? Is it sap or ess-a-pee?

Before you say "that's a pointless question!" consider this endless thread on the subject.

OK, it's still a pointless question


. . . but I'm asking it anyway.

Back on May 10 I thought it was important to say "ess-a-pee" but now I'm not so sure.

Why not?


Because even though the phrase "an SAP" appears 420 times in the 391-page SAP HANA Developer Guide, most (391) of those references appear in the boilerplate phrase "...an SAP affiliate company. All rights reserved...".

In the same document the phrase "a SAP" appears 25 times, as in "a SAP HANA system" and "adding a SAP Variables clause in your select statement".

That's a score of 25 for sap, versus 30 for ess-a-pee if we count the boilerplate as only one occurrence.

Pretty much a tie, doncha think?


So I'm going with this:

Answer: You pick the pronunciation that sounds right to you, given the context: sometimes sap, sometimes ess-a-pee... or you can use one or the other all the time, your choice.

It's called "English", which in German means "Anarchy".

Dilbert.com 1995-10-11

Wednesday, May 15, 2013

D. I. Y. is more F. U. N.

Question: How do I list the active sessions and the elapsed times they are running?

Answer: The CONNECTION_PROPERTY() function returns a great deal of information about each connection (session). The LoginTime property can be used to calculate the elapsed time; here's the value for the current connection:

SELECT CONNECTION_PROPERTY ( 'LoginTime' );

'2013-05-11 04:49:12.499'
There are many connection properties, and there can be many connections, resulting in hundreds, maybe thousands of values.

The sa_conn_properties() procedure makes it easier to process that "great deal of information":
SELECT Number                                    AS connection_number,
       CONNECTION_PROPERTY ( 'Name',   Number )  AS connection_name,
       CONNECTION_PROPERTY ( 'UserID', Number )  AS user_name,
       Value                                     AS login_time 
  FROM sa_conn_properties() 
 WHERE PropName = 'LoginTime'
 ORDER BY Number;

connection_number,connection_name,user_name,login_time
14,'adhoc-queries','k.delacruz',2013-05-11 04:49:12.499
15,'RRLoadTest','DBA',2013-05-11 04:54:24.016
16,'app','h.barbosa',2013-05-11 04:54:24.232
17,'app','g.mikhailov',2013-05-11 04:54:24.334
18,'app','u.wouters',2013-05-11 04:54:24.448
19,'app','e.reid',2013-05-11 04:54:24.554
20,'app','y.gustavsson',2013-05-11 04:54:24.663
21,'app','n.simpson',2013-05-11 04:54:24.776
22,'app','f.thomson',2013-05-11 04:54:24.890
23,'app','x.wang',2013-05-11 04:54:25.100
24,'app','i.miller',2013-05-11 04:54:25.218
25,'app','c.ryan',2013-05-11 04:54:25.325
You can continue to Do-It-Yourself in ISQL...
  • call DATEDIFF() to turn LoginTime to an elapsed time (milliseconds?) value,

  • study up on other CONNECTION_PROPERTY() values, what they mean, which ones are useful (maybe more useful than LoginTime) and which ones don't work at all, and maybe

  • look at the DB_PROPERTY() and server-level PROPERTY() functions as well, then

  • figure out how to gather the values and save them and summarize them and calculate rates and changes and rankings, and finally

  • build up your query(ies) until you get the information you want.
In other words, you can build your own database performance monitor.

Or you can just use Foxhound.

In Foxhound the "Time Connected" colum is based on the LoginTime property, and you can click on the column title to sort the long-lasting connections to the top.

In THIS particular screenshot, however, the list of connections has been sorted on "CPU %" to sort the most active sessions to the top:



DIY "Internal Use Software" is more fun, of course . . .

... just don't tell Accounting about it unless you count your own time as "free" :)

Dilbert.com 2002-09-27


Monday, May 13, 2013

SQL Anywhere Dead Chickens

In the spirt of the "characteristic errors" listicle here is a list of "dead chickens" associated with SQL Anywhere.

If you have ANY examples of your own, PLEASE post a comment here or SEND me an email: breck dot carter at gmail dot com


To wave a dead chicken is to "perform a ritual in the direction of crashed software or hardware that one believes to be futile but is nevertheless necessary so that others are satisfied that an appropriate degree of effort has been expended. 'I'll wave a dead chicken over the source code, but I really think we've run into an OS bug.'" - The Jargon File
  1. If your remote data access doesn't work, try fiddling with the declared data types; e.g., from char to varchar, or vice versa.

    Example: Error returning bigint from remote server

  2. If your remote data access with Excel doesn't work, try periods, try the magic dollar sign, try NVARCHAR, try Google!

    Example: SELECT FROM Excel Spreadsheets

  3. If your query takes too long, try turning off intra-query parallelism: SET TEMPORARY OPTION MAX_QUERY_TASKS = '1';

    Example: The New MaxBPs=768: Set MAX_QUERY_TASKS = '1'

  4. If your WINDOW query doesn't work try adding RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING.

    Example: Reporting and the Audit Trail

  5. If something goes wrong after installing, try rebooting.

    Example: Try rebooting

  6. If ISQL READ doesn't work, try specifying the code page: READ ENCODING Cp1252 "C:\data\filename.sql";

    Example: Example: OUTPUT TO From VB, Part 2

  7. If you can't connect over TCP/IP, try adding DOBROADCAST=NONE.

    Example: Demonstrating High Availability


If something is wrong on the internet, fix it!

xkcd.com 386



Friday, May 10, 2013

HANA Enterprise Cloud

Did you know that SAP has another database product, besides SQL Anywhere?

Yeah, you're right,

but they don't count because they don't have much of a future.

There's also Sybase IQ and that does have a future, but it's not the one I'm thinking of either.

No, the other SAP database with a future is . . .


... called HANA, brand new, just out.

And it's available for free, for testing, in the cloud.

HANA in the Cloud


Back on May 7 SAP held a "press event" in Palo Alto to introduce something called the "SAP HANA® Enterprise Cloud"; you can watch the whole thing here, all 82 minutes of it:



Caution: This video works in IE 10 but apparently not in Chrome 26. There's another browser I used to use, Fire-something-or-other, I forget, dunno if that works.

But if you'd rather READ than WATCH . . .


... here are my rough notes, with a few comments added:
=====
Jonathan Becher
Chief Marketing Officer

10,000 viewers for the initial presentation

HANA is not limited to SAP applications

pronounced "haw-na"
...not "hanna". HANA is a name, but not a girl's name; HANA doesn't stand for anything. In particular, it does not stand for High Performance ANalytic Appliance, and it most definitely does not stand for HAsso's New Architecture. While we're at it, SAP is pronounced ess-a-pee, not sap, and junior SAP employees are not called saplings.
=====
Hasso Plattner
SAP Founder and Chairman of the SAP Supervisory Board

old-school paper notes

HANA is the redefinition of enterprise software

will lower TCO dramatically

advantages of cloud

1. elasticity

2. innovation - SAP has renovated, recreated

HANA system has a much smaller data footprint - needs on one fifth of the storage capacity 
through compression

response time goals: 8 seconds, 3 seconds, 1 second

3. people - much less DBA work - no indexes, no materialized aggregates - dynamic aggregation

4. harmonization of hardware and system software - 100% standard hardware

should keep 100% of hot data in memory so performance can be calculated

cold data can certainly be kept on disk

faster releases - utilities run 20 times faster

what can we do with a "HANA-based system in the cloud"

1. regain innovation

better performance leads to innovation

120 msec for worldwide data round-trip - communication

no more "programmer test data" - can use copy of production

standard application interfaces are available for HANA

can make SMP use of a 200 core computer

after 41 years of SAP software, this is the way it should have been

=====
Vishal Sikka 
Member of the Executive Board of SAP AG, Technology & Innovation

we call it the "HANA Enterprise Cloud"

using current generation Intel processors 

300 billion scans per second

without virtualization

=====
Wesley Mukai
Vice President of HANA Cloud Computing

data centers are complicated

SAP Cloud Frame Technology

SAP Cloud Frame Monitor - Management Home - Create New HANA Instance

100s of terabytes on in-memory computing

each frame contains physical servers - no virtualization

servers from multiple vendors

=====
Vishal Sikka 

create a 5 terabyte system in minutes

we have been working on this for quite some time

60 customers, some already live

=====
Don Whittington
Florida Crystals Vice President and CIO

What if SAP ran as fast as Excel?

=====
Vishal Sikka 

multiple hardware platforms

Hasso has always been a champion of speed and performance

=====
Andy Bechtolsheim
Founder and Chairman, Arista Networks

The future of networking...

Accepted wisdom was that enterprise systems will be the last thing that moves to the cloud

low latency and high bandwidth is key for the communication network within a cluster

system management has been integrated into the switch

the cloud needs near-zero-time network configuration, not weeks like in the old days

100 Gbit networking will eventually be available.

=====
Vishal Sikka 

The HANA Enterprise Cloud is here.

There are 50,000 enterprise networks out there.

=====
Jonathan Becher 

Peaked at #3 on twitter.

Questions for Hasso and Vishal...

=====
Hasso Plattner

We must educate people in what parallelism means.

HANA can use massive parallelism for a single query.

The more complex the query the more parallelism can be used.

The larger the data volume the more we can split it up and run it in parallel.

We get the parallelism effect automatically through HANA.

Myth: "If everything runs so fast we don't have to write good SQL any more."

It is just the opposite - we have to think more about good algorithms.

There can be a factor of 10,000 between the performance of good and lousy algorithms.

HANA automatically gives a factor of 2 to three improvement over current databases - to get 
real improvements you have to exploit parallelism.

We have to teach people how to write good SQL and not just simple SQL that works.

While people are doing this, they learn more and more about how things can be done differently.

After 40 years of fighting batch, there is no batch any more.

We wanted to kill batch 40 years ago, and it came back and came back.

Now everything will be transactional.

Everything will be on a human time frame even if it involves billions of records.

What is our biggest innovation in SAP?

We now have the capacity to redo the user interface.

We used to build UIs to cover the functionality and to perform well enough - we were always 
watching performance, most of the programming we did was to achieve performance.'

Now we get great performance, the programs are much smaller - we have more time to concentrate 
on the UI.

=====
Vishal Sikka 

HANA has native integration services.

Pricing: You bring your own HANA license and pay for the cloud services separately
It was around this point when the penny finally dropped: they're not just talking about HANA-the-database-product, they're talking about an existing implementation of HANA and all the requisite bits, on existing public cloud services like Amazon, that you can just use... yeah, I'm kinda slow.
HANA One has been running in the cloud for about 7 months.

Even though HANA makes it possible to eliminate current batch processing, you will always have larger amounts of data coming that require batch processing.

=====
Hasso Plattner

Collaboration between Hadoop and HANA is possible.

=====
Vishal Sikka 

What about private clouds?

First of all - the HANA Enterprise Cloud is for HANA only, other relational database products 
are not welcome.

Having said that - it doesn't matter where the pieces run, and the landscape can be heterogeneous.

HANA cloud frames can, and have been, run on private clouds in customer datacenters - but it's 
not part of today's announcement.

Several dozen big customers will move to the HANA cloud this year.

Early customer feedback has been positive.

=====
Hasso Plattner

This is the next hockey stick.
I'm guessing he's talking about the "hockey stick curve"; see point 3 in "What is a Hockey Stick Curve?"
Mobile response time must be 3 seconds or faster, and we can do this now.

There are no hassles when growing or shrinking the system, and it will be so much faster.

Hardware provisioning is done already, by SAP.

What is the bottleneck? We honestly don't know.

The private private clouds will come - the ones on client premises.

The elasticity and security problems have been solved.

=====
Vishal Sikka 

We are looking at redesigning the server platform.

=====
Hasso Plattner

The data has to be in memory, that is a prerequisite.

=====
Vishal Sikka 

The underlying infractructure for all SAP applications is moving to the HANA Enterprise Cloud.

=====
Hasso Plattner

Enterprise, mid-size, small companies... it doesn't matter. We allocate a whole client to one 
machine, or half a machine, or a quarter machine.

We don't share anything in data storage between customers.

=====
Vishal Sikka 

If a third-party SAP vendor wanted to use the HANA infracture, would we let them do that? 
Yes, we would absolutely love it. If they compete with us we would love it even more.

We currently have more than 400 startup companies running on HANA. Many of them compete 
with parts of the SAP portfolio.

Companies like salesforce.com would definitely benefit from running on the HANA infrastructure.

Our own CRM system has been running since the middle of March, extraordinarily well. 

We have it running on a 6 terabyte monster system from IBM - we are only using 1.25 terabytes - 

=====
Hasso Plattner

The usage of the system went significantly up - the users are doing more with the system - that 
is a positive sign.

=====
Vishal Sikka 

We have run 100 million SQL queries per hour on our own system.

The communication round-trip between Palo Alto and Beijing or between Palo Alto and Amsterdam 
is around 120 milliseconds today.

That means you still have 880 milliseconds still available to you, for 1 second response time.

=====
Hasso Plattner

With traditional on-premise provisioning, just the hardware acquisition delays every single 
project by eight weeks.

Now we can provision a system within one hour... that's a hockey stick.

=====
Jonathan Becher, Chief Marketing Officer

Today we launched HANA Enterprise Cloud which combines real-time in-memory with the cloud.

No more batch.

[end]

For the official story see the SAP HANA Enterprise Cloud page.