Friday, November 30, 2012

Foxhound Version 2 Is Now Available

Foxhound is a performance monitor for SQL Anywhere databases.

Version 2 is now shipping, with these three "release defining" features:

  1. AutoDrop lets you pick up to 6 different reasons to automatically drop runaway connections.

  2. Schedules let you control

  3. Jumping Through History adds the Go to: field to the History page so you can jump directly to particular date/time, or to a sample number if you're working on an adhoc report.
Foxhound Version 2 also contains
For more information, check out the Foxhound home page.


Wednesday, November 28, 2012

New Technical Documents

Several old and new articles have been added to the list of SQL Anywhere Technical Documents...

Date Versions Authors Title
Nov 21, 201212.0.1anon.Using SAP Crystal Reports with SAP Sybase SQL Anywhere
Oct 15, 201212Breck CarterBlog: Example: RECURSIVE UNION Inverted ORDER BY
Oct 12, 201212Breck CarterBlog: Example: RECURSIVE UNION Tree Traversal
Sep 24, 2012-Glenn PaulleyBlog: Time separation and performance of technical teams
Sep 24, 201212Breck CarterBlog: Fix Twice, Ship Once
Sep 6 2012-Chris KleisathBlog: Trends in the Embedded Database Market
Aug 15, 201212Breck CarterBlog: Choosing Which Task To Kill
Aug 10, 201212Breck CarterBlog: Example: String De-Duplication
Aug 8, 201212Breck CarterBlog: Alexander's Sword: UNLOAD SELECT
Aug 3, 201212Breck CarterBlog: Help! I Need An Assertion!
Jul 27, 201212Breck CarterBlog: Example: TOP 1, WHERE and ORDER BY
Jul 23, 201212Breck CarterBlog: IS_NUMERIC()
Jul 18, 201212Breck CarterBlog: Product Suggestion: WITH AUTO NAME ON MISSING
Jul 6, 201212Breck CarterBlog: JOIN to a text file without a proxy table
Jul 4, 201212Breck CarterBlog: Example: HTTP LogFormat (LF) protocol option
Jul 2, 201212Breck CarterBlog: Quick! How do I truncate the transaction log?
Jun 28, 201212Ahmed MunyeTutorial: Deploying a SQL Anywhere .NET Application Using ClickOnce
Apr 201212.0.1anon.Adding databases with external environments to a SQL Anywhere OnDemand Edition 1.0 cloud
Mar 201212.0.1anon.Query Processing Based on SQL Anywhere 12.0.1 Architecture
Dec 201112anon.Migrating a PostgreSQL Database to SQL Anywhere 12
Aug 19, 2010-Jeannette SmithBasic OLE DB, ADO and .NET Connectivity for Sybase Databases
Jul 27, 201012anon.Storing YouTube Subscription Information Inside a SQL Anywhere Database
Jul 27, 201012anon.CLR External Environment Sample
Jul 20, 201011, 12anon.AdventureWorks2008 Sample Database for SQL Anywhere
Jul 20, 201011, 12anon.AdventureWorks2008 .NET Samples
Jul 19, 201011.0.1.2427, 12anon.Tutorial: Using the ADO.NET Entity Framework with SQL Anywhere
Jul 201011.0.1.2427, 12anon.SQL Anywhere Integration with Visual Studio 2010
Feb 2, 201011anon.AdventureWorks2008 Windows Mobile Samples
Mar 200911.0.1.2427, 12anon.SQL Anywhere Integration with Visual Studio 2008

But wait, there's more...

The Google Custom Search Engine on the Technical Documents page is working a lot better now. It might take a while to catch up with the new entries, but the old entries are finally showing up in searches.

Maybe all it takes ... is ... a ... lot ... of ... patience ...
Dilbert.com


Monday, November 26, 2012

Latest SQL Anywhere EBF: 11.0.1.2878 for Windows

The three asterisks "***" show which Express Bug Fixes (EBFs) and Beta builds have been released since the previous version of this page.

  • Only EBFs for the latest fully-supported versions of SQL Anywhere (11.0.1 and 12.0.1) are shown here, plus Beta builds for 16.0.0.

  • Just because an older version or different platform isn't "fully supported" any more doesn't mean you can't download files (or ask questions, or get help), it just means there won't be any more new EBFs released.

Current builds for the active platforms...

HP-UX Itanium   12.0.1.3798 EBF        29 Oct 2012
                11.0.1.2879 EBF        31 Oct 2012

IBM AIX         12.0.1.3798 EBF        24 Oct 2012
                11.0.1.2879 EBF        29 Oct 2012

Linux x86/x64   16.0.0.1018 Beta       09 Nov 2012
                12.0.1.3798 EBF        07 Nov 2012
                11.0.1.2879 EBF        31 Oct 2012 

Mac OS          12.0.1.3798 EBF        15 Oct 2012
                11.0.1.2449 EBF        29 Jun 2010

Solaris SPARC   12.0.1.3798 EBF        24 Oct 2012
                11.0.1.2879 EBF        24 Oct 2012

Solaris x64     12.0.1.3798 EBF        29 Oct 2012
                11.0.1.2879 EBF        29 Oct 2012

Windows x86/x64 16.0.0.1018 Beta       09 Nov 2012
                12.0.1.3810 EBF        16 Nov 2012
                12.0.1 French Docs,    25 Sep 2012
                       English Docs,   25 Sep 2012
                       German Docs     25 Sep 2012
                11.0.1.2878 EBF    *** 23 Nov 2012 ***

Other Stuff...

SQL Anywhere 16 Beta

Older EBFs

Free support! Q&A forum
...or, call Tech Support

SQL Anywhere home page 

Buy SQL Anywhere 

Download the Developer Edition... 
  [12.0.1] [11.0.1]

Download the Educational Edition 
Download the Web Edition 

Supported Platforms...
  [SQL Anywhere] [Linux] [OnDemand]

Recommended...
  ODBC Drivers for MobiLink


Friday, November 23, 2012

Connection-Dependent Trigger Logic

Question: How do I code a database trigger to do one thing when it is executed during a MobiLink synchronization, and something different when it is executed by an application?

Answer: This is a specific example of a common problem in triggers: "Who fired me?"

One solution is to code a connection-level CREATE VARIABLE statement in the code that fires the trigger, together a SET statement to specify "Who am I", and use an IF statement inside the trigger to ask the question "Who fired me?":

-------------------------------------------------------
-- Table and trigger.

CREATE TABLE t (
   pkey   INTEGER NOT NULL PRIMARY KEY,
   data   INTEGER NOT NULL );

CREATE TRIGGER tri_t
   BEFORE INSERT ON t
   REFERENCING NEW AS new_t
   FOR EACH ROW
BEGIN
   IF who_am_i = 'accounting application' THEN
      MESSAGE STRING ( 'Trigger fired by accounting application.' ) TO CONSOLE;
   ELSE  
      MESSAGE STRING ( 'Trigger fired by something else.' ) TO CONSOLE;
   END IF;
END;

-------------------------------------------------------
-- Connection 1.

CREATE VARIABLE who_am_i VARCHAR ( 100 );

SET who_am_i = 'accounting application';

INSERT t VALUES ( 1, 1 );
COMMIT;

-------------------------------------------------------
-- Connection 2.

CREATE VARIABLE who_am_i VARCHAR ( 100 );

SET who_am_i = 'payroll application';

INSERT t VALUES ( 2, 2 );
COMMIT;

-------------------------------------------------------
-- MESSAGE output.

Trigger fired by accounting application.
Trigger fired by something else.
This solution won't work so well with MobiLink. While it may be possible to code a CREATE VARIABLE statement in a script run by the MobiLink server, no such opportunity exists with the MobiLink client dbmlsync.exe.

In the case of the MobiLink client, the connection name can be used to answer "Who fired me?" because dbmlsync.exe always uses the same name "DBMLsync_main" to when connecting to the remote database.

You can use the connection name with the MobiLink server as well, but you'll have to explicitly specify the CON parameter in the command line like this:
"%SQLANY12%\bin64\mlsrv12.exe"^
  -c "DSN=cons;UID=dba;PWD=sql;CON=MLSRV"^
  -o mlsrv12_log_cons.txt^
  -os 10M^
  -ppv 60^
  -vcefhkmnopstuU^
  -zu+ 
Here's a trigger that calls CONNECTION_PROPERTY ( 'Name' ) to see if it's MobiLink that's fired it, or something else; the same code works on both the consolidated database and the remote:
CREATE TRIGGER tri_t1
   BEFORE INSERT ON t1
   REFERENCING NEW AS new_t1
   FOR EACH ROW
BEGIN
   IF CONNECTION_PROPERTY ( 'Name' ) LIKE 'DBMLsync%'
   OR CONNECTION_PROPERTY ( 'Name' ) LIKE 'MLSRV%' THEN
      MESSAGE STRING ( 'Trigger fired by MobiLink client or server connection.' ) TO CONSOLE;
   ELSE  
      MESSAGE STRING ( 'Trigger fired by application connection.' ) TO CONSOLE;
   END IF;
END;
The two techniques can be combined (CONNECTION_PROPERTY and CREATE VARIABLE), and the VAREXISTS() function can be used inside the trigger to check if the CREATE VARIABLE has been executed or not:
CREATE TRIGGER tri_t1
   BEFORE INSERT ON t1
   REFERENCING NEW AS new_t1
   FOR EACH ROW
BEGIN
   IF CONNECTION_PROPERTY ( 'Name' ) LIKE 'DBMLsync%'
   OR CONNECTION_PROPERTY ( 'Name' ) LIKE 'MLSRV%' THEN
      MESSAGE STRING ( 'Trigger fired by MobiLink client or server connection.' ) TO CONSOLE;
   ELSE 
      IF VAREXISTS ( 'who_am_i' ) = 1 THEN
         MESSAGE STRING ( 'Trigger fired by ', who_am_i ) TO CONSOLE;
       ELSE
         MESSAGE STRING ( 'Trigger fired by unknown application.' ) TO CONSOLE;
      END IF;
   END IF;
END;




Wednesday, November 21, 2012

Latest SQL Anywhere EBF: 12.0.1.3810 for Windows

The three asterisks "***" show which Express Bug Fixes (EBFs) and Beta builds have been released since the previous version of this page.

  • Only EBFs for the latest fully-supported versions of SQL Anywhere (11.0.1 and 12.0.1) are shown here, plus Beta builds for 16.0.0.

  • Just because an older version or different platform isn't "fully supported" any more doesn't mean you can't download files (or ask questions, or get help), it just means there won't be any more new EBFs released.

Current builds for the active platforms...

HP-UX Itanium   12.0.1.3798 EBF        29 Oct 2012
                11.0.1.2879 EBF        31 Oct 2012

IBM AIX         12.0.1.3798 EBF        24 Oct 2012
                11.0.1.2879 EBF        29 Oct 2012

Linux x86/x64   16.0.0.1018 Beta       09 Nov 2012
                12.0.1.3798 EBF        07 Nov 2012
                11.0.1.2879 EBF        31 Oct 2012 

Mac OS          12.0.1.3798 EBF        15 Oct 2012
                11.0.1.2449 EBF        29 Jun 2010

Solaris SPARC   12.0.1.3798 EBF        24 Oct 2012
                11.0.1.2879 EBF        24 Oct 2012

Solaris x64     12.0.1.3798 EBF        29 Oct 2012
                11.0.1.2879 EBF        29 Oct 2012

Windows x86/x64 16.0.0.1018 Beta       09 Nov 2012
                12.0.1.3810 EBF    *** 16 Nov 2012 ***
                12.0.1 French Docs,    25 Sep 2012
                       English Docs,   25 Sep 2012
                       German Docs     25 Sep 2012
                11.0.1.2867 EBF        04 Oct 2012

Other Stuff...

SQL Anywhere 16 Beta

Free Technical Summit

Older EBFs

Free support! Q&A forum
...or, call Tech Support

SQL Anywhere home page 

Buy SQL Anywhere 

Download the Developer Edition... 
  [12.0.1] [11.0.1]

Download the Educational Edition 
Download the Web Edition 

Supported Platforms...
  [SQL Anywhere] [Linux] [OnDemand]

Recommended...
  ODBC Drivers for MobiLink


Monday, November 12, 2012

Latest SQL Anywhere EBF and Beta

The three asterisks "***" show which Express Bug Fixes (EBFs) and Beta builds have been released since the previous version of this page.

  • Only EBFs for the latest fully-supported versions of SQL Anywhere (11.0.1 and 12.0.1) are shown here, plus Beta builds for 16.0.0.

  • Just because an older version or different platform isn't "fully supported" any more doesn't mean you can't download files (or ask questions, or get help), it just means there won't be any more new EBFs released.

Current builds for the active platforms...

HP-UX Itanium   12.0.1.3798 EBF        29 Oct 2012
                11.0.1.2879 EBF        31 Oct 2012

IBM AIX         12.0.1.3798 EBF        24 Oct 2012
                11.0.1.2879 EBF        29 Oct 2012

Linux x86/x64   16.0.0.1018 Beta   *** 09 Nov 2012 ***
                12.0.1.3798 EBF    *** 07 Nov 2012 ***
                11.0.1.2879 EBF        31 Oct 2012 

Mac OS          12.0.1.3798 EBF        15 Oct 2012
                11.0.1.2449 EBF        29 Jun 2010

Solaris SPARC   12.0.1.3798 EBF        24 Oct 2012
                11.0.1.2879 EBF        24 Oct 2012

Solaris x64     12.0.1.3798 EBF        29 Oct 2012
                11.0.1.2879 EBF        29 Oct 2012

Windows x86/x64 16.0.0.1018 Beta   *** 09 Nov 2012 ***
                12.0.1.3797 EBF        02 Nov 2012
                12.0.1 French Docs,    25 Sep 2012
                       English Docs,   25 Sep 2012
                       German Docs     25 Sep 2012
                11.0.1.2867 EBF        04 Oct 2012

Other Stuff...

SQL Anywhere 16 Beta

Free Technical Summit

Older EBFs

Free support! Q&A forum
...or, call Tech Support

SQL Anywhere home page 

Buy SQL Anywhere 

Download the Developer Edition... 
  [12.0.1] [11.0.1]

Download the Educational Edition 
Download the Web Edition 

Supported Platforms...
  [SQL Anywhere] [Linux] [OnDemand]

Recommended...
  ODBC Drivers for MobiLink


Friday, November 9, 2012

SQL Anywhere 16 Beta Has Shipped

The beta for SQL Anywhere 16 has shipped.

You can register here, and you'll get an email with the download location.





Wednesday, November 7, 2012

Latest SQL Anywhere EBFs: HP-UX, Linux, Windows

The three asterisks "***" show which Express Bug Fixes (EBFs) have been released since the previous version of this page.

  • Only EBFs for the latest fully-supported versions of SQL Anywhere are shown here: 11.0.1 and 12.0.1.

  • Just because an older version or different platform isn't "fully supported" any more doesn't mean you can't download files (or ask questions, or get help), it just means there won't be any more new EBFs released.

Current builds for the active platforms...

HP-UX Itanium   12.0.1.3798 EBF        29 Oct 2012
                11.0.1.2879 EBF    *** 31 Oct 2012 ***

IBM AIX         12.0.1.3798 EBF        24 Oct 2012
                11.0.1.2879 EBF        29 Oct 2012

Linux x86/x64   12.0.1.3798 EBF        24 Oct 2012
                11.0.1.2879 EBF    *** 31 Oct 2012 ***

Mac OS          12.0.1.3798 EBF        15 Oct 2012
                11.0.1.2449 EBF        29 Jun 2010

Solaris SPARC   12.0.1.3798 EBF        24 Oct 2012
                11.0.1.2879 EBF        24 Oct 2012

Solaris x64     12.0.1.3798 EBF        29 Oct 2012
                11.0.1.2879 EBF        29 Oct 2012

Windows x86/x64 12.0.1.3797 EBF    *** 02 Nov 2012 ***
                12.0.1 French Docs,    25 Sep 2012
                       English Docs,   25 Sep 2012
                       German Docs     25 Sep 2012
                11.0.1.2867 EBF        04 Oct 2012

Other Stuff...

SQL Anywhere 16 Beta

Free Technical Summit

Older EBFs

Free support! Q&A forum
...or, call Tech Support

SQL Anywhere home page 

Buy SQL Anywhere 

Download the Developer Edition... 
  [12.0.1] [11.0.1]

Download the Educational Edition 
Download the Web Edition 

Supported Platforms...
  [SQL Anywhere] [Linux] [OnDemand]

Recommended...
  ODBC Drivers for MobiLink