Friday, October 11, 2013

Evaluating On-Demand

The On-Demand Edition of SQL Anywhere is an immensely powerful administration tool for creating, manipulating, moving and managing thousands of SQL Anywhere tenant databases installed across many hundreds servers and computers running on-site or in the cloud.

Question: How do I get started evaluating the SQL Anywhere On-Demand Edition? I've installed the software but I can't figure out what to do next.

Answer: The On-Demand setup process is designed for deployment rather than evaluation, experimentation, design, development or training. As a result, the out-of-box experience is somewhat different from other editions of SQL Anywhere:

  • The setup is immediately followed by a configuration process that asks questions you may not know how to answer if you have never worked with the product before.

  • The setup does not install any shortcuts, or documentation, or shortcuts to the documentation.

  • If the configuration process is not completely successful, nothing is left running and there is no apparent answer to the question "What do I do next?"
In other words, there's no On-Demand Developers Edition, it's really the . . .

On-Demand Deployment Edition

. . . and this article tries to answer the question "What do I do next?" after installing On-Demand for the first time.

First of all, here's the missing link to the Help:

SAP Sybase SQL Anywhere, on-demand edition 1.0 Support Package 3

And here's a link to the tutorials:

Modules 1 to 14: Tutorials on SQL Anywhere On-Demand Edition, wait, here it is:

Modules 1 to 14: Tutorials on SQL Anywhere On-Demand Edition

...if that doesn't work, try Google. The Tutorials are out there!

Maybe that's all you need, all the "how-to" material you will ever need and then some.

Here's where all the executables are installed, which is handy to know when coding Windows command files to automate point-and-click tasks:

C:\Program Files\SQL Anywhere OnDemand 1.0\sa-win64-x64-\Bin64

A copy of SQL Anywhere is included in that folder. That's the build which is used by On-Demand, and it's OK to have an earlier build (say, installed on the same computer... the two different builds won't interfere with each other.

Tip: If you like writing Windows command files that refer to the SQLANY16 environment variable installed by the regular SQL Anywhere 16 setup, you should create a similar environment variable for use in On-Demand command files:
Control Panel 
   - System  
   - Advanced System Settings  
   - Environment Variables... 
   - System variables  
   - New... 
      Variable name: ONDEMAND1
      Variable value: C:\Program Files\SQL Anywhere OnDemand 1.0\sa-win64-x64-

If you had trouble with the initial configuration, or you just want to start over from scratch without running the setup again, here's how to (re)initialize the configuration:

You will be presented with a series of question-and-answer browser pages that start with this . . .

and end with the Cloud Console page . . .

Along the way, you'll be asked to provide input like this . . .
Cloud name: MyCloud
Full name:  Breck
User ID:    admin
Password:   sql

TCP/IP: 2638
HTTP:   12345
HTTPS:  443

Encryption key:       6mFu3Cfi9ej
Secured feature key:  j6ogbIrueOgi9
Certificate password: yj487Gjr4uE

At this point, you're all set to play around and practice with the many features of On-Demand.

Here's where all your On-Demand databases and other files will be installed; if you create a database outside the On-Demand product and then import it, the files will be copied to this location:

C:\Users\Public\Documents\SQL Anywhere OnDemand 1.0

When something goes wrong (say, during training or experimentation, certainly not deployment :), here's where you'll go looking for answers:

C:\Users\Public\Documents\SQL Anywhere OnDemand 1.0\logs\

Some of the files in the logs folder contain readable text, like the SQL Anywhere server console logs. Other files will be in the Event Trace Data (ETD) format that needs translating to be understandable:
  -o dbmanageetd.txt^
  "C:\Users\Public\Documents\SQL Anywhere OnDemand 1.0\logs\agent_log_4613.etd"

[2013-10-03T17:10:34.688-04:00] dbcloudagent_main_info  message=[dbcloudagent]
[2013-10-03T17:10:34.688-04:00] dbcloudagent_main_info  message=[Primary server addresses: 
[2013-10-03T17:10:35.702-04:00] dbcloudagent_main_info  message=[Cloud agent running; the  
   host ID is name='Envy']
[2013-10-03T17:10:35.702-04:00] dbcloudagent_monitor_info  message=[Monitoring  
   status of actions]
[2013-10-03T17:10:35.702-04:00] dbcloudagent_initaction_debug  message=[Initial action 1:  
   executable[dbcloudagentaction.exe] arguments[-a 1 -ii -dp "C:\Users\Public\Documents 
   \SQL Anywhere OnDemand 1.0" -swroot "C:\Program Files\SQL Anywhere OnDemand 1.0"  
   -op StartServerInit -swdir "C:\Program Files\SQL Anywhere OnDemand 1.0 
   \sa-win64-x64-\Bin64" -servercommandlinetxt  
   "C:\Users\Public\Documents\SQL Anywhere OnDemand 1.0\server-1\servercommandline.txt"  
   -snum 1 -smajorver 16] maximum running time[-1]]
[2013-10-03T17:10:35.718-04:00] dbcloudagent_initaction_debug  message=[Initial  
   action 1 started]
[2013-10-03T17:10:36.342-04:00] dbcloudagent_poller_info  message=[Polling server]

If you're running the On-Demand software on a single computer (which is what new students tend to do), and you reboot that computer (which never happens In The Cloud but certainly happens on the desktop), the Cloud Console may or may not start successfully.

It turns out the Cloud Console is only the visible tip of a very large iceberg. The bulk of that iceberg consists not only of SQL Anywhere servers but of a "cloud agent" which runs as a Windows service.

If that service doesn't start automatically after a reboot (it should), here's a Windows command file to fix the problem; it stops-and-starts the cloud agent service, then fires up the Cloud Console page in your favorite browser:
"%ONDEMAND1%\Bin64\dbsvc.exe" -x dbcloudagent1.0.0.4613

"%ONDEMAND1%\Bin64\dbsvc.exe" -u dbcloudagent1.0.0.4613

PAUSE Launch the Cloud Console (it may not respond right away)...

START "" "http://localhost:12345 


1 comment:

Anonymous said...

The Tutorials are out here.