Introduction en
Introduction en
SQL Anywhere
Document Version: 17.01.0 – 2023-09-12
This book describes SQL Anywhere 17, a comprehensive package that provides data management and data
exchange technologies, that enables the rapid development of database-powered applications for server,
desktop, mobile, and remote office environments.
Embeddability
SQL Anywhere can be easily embedded inside other applications. It combines high performance with a
very small memory footprint. SQL Anywhere contains a range of features to enable self-management and
maintenance in frontline environments, including features that enable optimization of computer resources,
self-tuning for improved performance, and simplification of remote installation and support.
Interoperability
SQL Anywhere is available on many platforms, including Windows, Linux, Oracle Solaris, HP-UX, IBM AIX,
and Apple macOS. Its database files can be copied between platforms. In addition, SQL Anywhere provides
support for many smartphones using its UltraLite database technology for small devices. SQL Anywhere
includes support for many common database interfaces, including ODBC, JDBC, ADO.NET, JavaScript,
PHP, and Perl. Many popular application development tools can be used, including: Microsoft Visual Studio,
SAP PowerBuilder, Eclipse, and various web tools. Stored procedures can be written in C/C++, Java, .NET,
or Perl.
Performance out of the box
SQL Anywhere is designed to deliver outstanding performance without ongoing tuning and administration.
Features such as dynamic cache sizing, automatic generation of statistics, a sophisticated query optimizer,
parallel query processing, and materialized views mean that SQL Anywhere is ideal for environments that
demand high performance but have no on-site database administrator. By offering, On-Line Analytical
Processing (OLAP) SQL Anywhere offers the ability to perform complex data analysis within a single SQL
statement, increasing the value of the results, while improving performance by decreasing the number of
database queries.
Mobility
SQL Anywhere provides enterprise-caliber databases that operate on frontline systems and devices
whether connectivity with enterprise systems is available or not. Its synchronization technologies ensure
SQL Anywhere provides full end-to-end data security with 128-bit and 256-bit strong encryption of
database tables, files, and communications streams between the application and the database, and the
MobiLink synchronization stream. SQL Anywhere can audit data access, offers built-in user authentication,
and can integrate with third-party authentication systems. SQL Anywhere also offers a FIPS-certified
version of encryption via a separately licensed component.
In this section:
Client-server applications
Whether it is 5, 50, 500 users or more, SQL Anywhere is a powerful database solution for server
applications that provides high performance out of the box, with low maintenance and cost.
SQL Anywhere easily scales to support hundreds of active users, hundreds of gigabytes of data, and
hundreds of millions of rows. Yet many ease-of-use and administration features ensure that costs stay
down as performance scales up.
This deployment model works best when the majority of users are connected to the network.
Desktop applications
SQL Anywhere delivers enterprise-caliber features, without the bulky characteristics of an enterprise
database. Its robust reliability and performance, along with highly efficient usage of memory and system
resources, ensure that the database can be hidden from laptop and desktop users.
Organizations embed SQL Anywhere databases in their applications because SQL Anywhere databases are
built for use in widely deployed, minimally administered environments, and require minimal memory and
disk space.
Remote office applications
SQL Anywhere data exchange architectures address the challenges of managing and sending data within
and between offices and workers that are dispersed geographically.
Companies choose SQL Anywhere database and data exchange technologies to provide remote workers
with the data they require to run their operations effectively, while providing the central office with the
critical information that gives the pulse of the business.
Mobile and wireless applications
Recognized as the industry's leading mobile database, SQL Anywhere gives mobile workers the ability to
access their data and corporate applications.
Companies depend on SQL Anywhere for reliable management of data and mobile applications, which run
on laptops, handheld devices, and smartphones.
There are several scenarios you can choose from for building database applications and systems.
In this section:
Many relational database management systems require experienced staff for administration. A characteristic
of SQL Anywhere databases is the ability to run entirely without administration.
The SQL Anywhere personal database server is generally used for embedded applications. Embedded
applications have the following architecture, with a client application connecting through a programming
interface to a database server running on the same computer:
You can build an installation with many applications running on different computers, connected over a network
to a single network database server running on a separate computer.
This is a client/server or multi-user database environment, and has the following architecture. The interface
library is located on each client computer.
In this case, the database server is the SQL Anywhere network database server, which supports network
communications over TCP/IP.
For a client application to work in a client/server environment, specify additional connection parameters,
typically the HOST connection parameter and optionally the ServerName connection parameter.
Types of Deployment
Database Connections
SQL Anywhere offers various editions that include separately licensed components, and have some restrictions
on the number of CPUs used by the database server.
Per-seat licensing
A per-seat license restricts the number of client connections to the database server. With per-seat
licensing, the network database server can use all CPUs available on your computer, but not more than
the maximum allowed by the SQL Anywhere edition you are running. If a CPU contains multiple cores or
threads, all cores and threads of the CPU may be used.
The personal database server is limited to four cores on one CPU. If a core contains multiple threads, all
threads of that core may be used. The personal server is limited to 10 connections.
Core-based licensing
With core-based licensing, the network database server uses up to the number of cores specified in your
license, but not more than the maximum allowed by the SQL Anywhere edition you are running.
When you have a core license, there are no restrictions on the number of client connections to the network
database server.
The following options further restrict the processors that the database server uses:
Related Information
There are components that are licensed separately and may need to be ordered separately if not included in
your edition of SQL Anywhere.
For a list of separately licensed components, see SAP SQL Anywhere Editions .
The SQL Anywhere Supported Platforms and Engineering Support Status web page lists the supported
operating system platforms broken down by version of SQL Anywhere.
SQL Anywhere Supported Linux Plat- http://scn.sap.com/docs/ Provides information about the Linux
DOC-35851
forms platform support, including support ex-
ceptions, key components, and tested
Linux distributions.
SQL Anywhere Supported Kerberos Cli- http://scn.sap.com/docs/ Provides a list of Kerberos clients/run-
DOC-63443
ents times that have been tested with SQL
Anywhere.
SQL Anywhere Client Interfaces http://scn.sap.com/docs/ Provides a list of supported client inter-
DOC-52993 faces for SQL Anywhere.
SQL Anywhere is supported on virtual platforms such as VMware, Xen, and Microsoft Virtual Server/Windows
Server Virtualization with some restrictions:
1. The virtual machine environments must be officially certified and approved by the corresponding operating
system platform vendor.
2. The operating system running in the virtual machine is already officially certified by SAP.
Hardware Requirements
For information about hardware requirements for SQL Anywhere, see http://scn.sap.com/docs/
DOC-35653 .
Related Information
Software Updates
Physical Limitations on Size and Number of Databases
UltraLite Database Limitations
1.6 Accessibility
SQL Anywhere supports Section 508 of the United States Federal Rehabilitation Act of 1973 (29 U.S.C. 794d)
and meets its accessibility requirements when the product is run on the Windows x86 and x64 operating
system platforms.
The tables below identify how SQL Anywhere meets the accessibility requirements identified in Section 508 of
the US Federal Rehabilitation Act. An accessibility enablement component provides software that enables the
use of accessibility tools.
For the purposes of this document, the following are components of SQL Anywhere:
Third-Party Tools
Testing environment: SQL Anywhere 17.0.11 (64-bit Windows) using both the Microsoft Accessibility
technologies and the JAWS Screen Reader from Freedom Scientific, Inc.
Section 1194.21 Software Applications Supports all features Features and capabilities may also be
and Operating Systems
complemented with Microsoft Windows
Accessibility Features and Aids.
Section 1194.31 Functional Perform- Supports with exceptions Supports third-party accessibility prod-
ance Criteria
ucts and technologies supported on Mi-
crosoft Windows.
(a) When software is designed to run Supports SQL Anywhere fully supports Microsoft
on a system that has a keyboard, prod- Windows accessibility features.
Keyboard access is provided through-
uct functions shall be executable from
out SQL Anywhere.
a keyboard where the function itself or
the result of performing a function can Keyboard shortcuts, shortcut keys, and
be discerned textually. menu commands are readily available
in SQL Anywhere.
(b) Applications shall not disrupt or dis- Supports Microsoft Windows accessibility aids
able activated features of other prod- can be used with the software. Screen
SQL Anywhere does not disrupt or disa-
ucts that are identified as accessibility readers can be used with the software;
ble any accessibility features of the op-
features, where those features are de- however, Java-based components re-
erating system.
veloped and documented according to quire screen readers that support Java
industry standards. Applications also SQL Anywhere supports large fonts in Assistive Technology.
shall not disrupt or disable activated the title bar, toolbars, as well as operat-
The Microsoft Windows magnifier appli-
features of any operating system that ing system accessibility features includ-
cation is available to magnify window
are identified as accessibility features ing StickyKeys, FilterKeys, MouseKeys,
text.
where the application programming in- and High Contrast.
terface for those accessibility features Windows Screen Magnifier may not al-
has been documented by the manufac- ways follow focus when using Tab or
turer of the operating system and is Shortcut Keys.
available to the product developer.
(c) A well-defined on-screen indication Supports For the Java-based components in SQL
of the current focus shall be provided Anywhere, third-party screen reader
Visual on-screen focus, highlighting and
that moves among interactive interface used must support Java assistive tech-
tracking is provided throughout SQL
elements as the input focus changes. nology.
Anywhere.
The focus shall be programmatically ex-
Windows Screen Magnifier may not al-
posed so that Assistive Technology can
ways follow focus for Java-based com-
track focus and focus changes.
ponents when using Tab or Shortcut
Keys.
(d) Sufficient information about a user Supports For the Java-based components in SQL
interface element including the identity, Anywhere, third-party screen reader
SQL Anywhere supports both the Mi-
operation and state of the element shall used must support Java assistive tech-
crosoft Active Accessibility and Java
be available to Assistive Technology. nology.
Accessibility programming interface
When an image represents a program
which enable its components to be
element, the information conveyed by
compatible with assistive technology.
the image must also be available in text.
(g) Applications shall not override user Supports Customizations made in SQL Anywhere
selected contrast and color selections utilities for visual representation are
SQL Anywhere supports system-wide
and other individual display attributes. specific to the application, and does not
colors settings as identified in the oper-
change system-wide settings.
ating system display properties.
(h) When animation is displayed, the Supports Where animation is used, the informa-
information shall be displayable in at tion conveyed is not essential, or is sup-
SQL Anywhere uses animation spar-
least one non-animated presentation plementary.
ingly.
mode at the option of the user.
(i) Color coding shall not be used as Supports The SQL Central database statistics
the only means of conveying informa- graphing application provides a user-
SQL Anywhere uses color coding in as-
tion, indicating an action, prompting a selectable range of colors, while provid-
sociation with other visual indicators
response, or distinguishing a visual ele- ing text/numeric output of the informa-
when conveying information, indicating
ment. tion as well.
an action, prompting a response, or dis-
tinguishing a visual element.
(j) When a product permits a user to Supports SQL Anywhere supports operating sys-
adjust color and contrast settings, a va- tem settings for high contrast color
Where color is used to convey informa-
riety of color selections capable of pro- schemes that make the screen easier
tion, SQL Anywhere allows a user to se-
ducing a range of contrast levels shall to view for some users by heighten-
lect from a wide range of colors.
be provided. ing screen contrast with alternate color
combinations.
(l) When electronic forms are used, Supports For the Java-based components in SQL
the form shall allow people using Assis- Anywhere, third-party screen reader
SQL Anywhere windows support assis-
tive Technology to access the informa- used must support Java assistive tech-
tive technologies.
tion, field elements, and functionality nology.
required for completion and submission
of the form, including all directions and
cues.
(a) At least one mode of operation and Supports SQL Anywhere supports 3rd party tech-
information retrieval that does not re- nologies that make computer programs
quire user vision shall be provided, or more accessible to people who use as-
support for Assistive Technology used sistive technology.
by people who are blind or visually im-
SQL Anywhere also supports the use
paired shall be provided.
of screen readers to access user inter-
face information. 3rd party products
supporting Java Assistive Technologies
are required for Java-Based tools.
(b) At least one mode of operation and Supports with exceptions SQL Anywhere supports the use of
information retrieval that does not re- screen readers to access user interface
quire visual acuity greater than 20/70 information. SQL Anywhere, with few
shall be provided in audio and enlarged exceptions, also supports system large
print output working together or in- font settings.
dependently, or support for Assistive
Technology used by people who are vis-
ually impaired shall be provided.
(c) At least one mode of operation and Supports In all instances where SQL Anywhere
information retrieval that does not re- provides an audio cue, it provides a vis-
SQL Anywhere does not require user
quire user hearing shall be provided, or ual cue as well.
hearing for access to any SQL Any-
support for Assistive Technology used
where component functionality.
by people who are deaf or hard of hear-
ing shall be provided.
(d) Where audio information is impor- Supports In all instances where SQL Anywhere
tant for the use of a product, at least provides an audio cue, it provides a vis-
SQL Anywhere does not require user
one mode of operation and informa- ual cue as well.
hearing for access to any SQL Any-
tion retrieval shall be provided in an en-
where component functionality.
hanced auditory fashion, or support for
assistive hearing devices shall be pro-
vided.
(b) End-users shall have access to Fully supports SQL Anywhere includes Help File docu-
a description of the accessibility and mentation listing accessibility features.
compatibility features of products in al- An individual may access and view Help
ternate formats or alternate methods File topics online or may select a topic
upon request, at no additional charge. for print.
(c) Support services for products Fully supports The technical support group offers
shall accommodate the communication a variety of services including Tech-
SQL Anywhere does not require user
needs of end-users with disabilities. nical Documents, White Papers, Prod-
hearing for access to any SQL Any-
uct Manuals, Newsgroups, online Soft-
where component functionality.
ware Problem Case Management, and
Bug Fixes and Patches. For information
about these and other support services,
visit the technical support web site. See
SAP Support Portal .
The Java Access Bridge module, which is loaded whenever you use SQL Central or Interactive SQL, supports
assistive technologies. Third-party software such as screen readers use this module to provide access to
software features.
SQL Anywhere offers two relational databases: SQL Anywhere Server and UltraLite.
SQL Anywhere Server provides enterprise-caliber functionality, including full transaction processing, referential
integrity, materialized views, snapshot isolation, high availability via database mirroring and server clustering,
SQL and Java stored procedures, triggers, row-level locking, automatic event scheduling, automatic backup
and recovery, full-text searching, and support for spatial data. SQL Anywhere Server easily scales to hundreds
of concurrent users and hundreds of gigabytes of data. Yet its small footprint and its many features that
automate administration make it an ideal database to embed into server and desktop applications that are
widely deployed in customer and remote sites.
UltraLite
For environments that demand smaller data-driven applications, the UltraLite database is ideal. UltraLite
is a full relational database management system designed specifically to minimize memory and system
requirements for deployment to handhelds and other mobile devices. It provides full transaction processing, a
choice of development models, and a built-in synchronization client for exchanging data with other databases.
In this section:
When deciding whether to use a SQL Anywhere database or an UltraLite database, consider your target
platform.
SQL Anywhere Unix, Apple macOS, Microsoft Win- SQL Anywhere is often preferred be-
dows, or Linux cause it provides a fuller feature set and
its additional memory requirements are
rarely an issue.
UltraLite Embedded Linux, Google Android, Ap- If the target platform is on an elec-
ple iOS, Microsoft Windows, or Linux tronic device, then consider memory
constraints and possibly the tasks your
application needs to perform.
Related Information
In multi-tier computing, application logic is held in an application server, such as SAP NetWeaver, WebLogic, or
WebSphere, which sits between the database server and the client applications.
In many situations, a single application server can access multiple databases in addition to non-relational data
stores. In the Internet case, client applications are browser-based, and the application server is generally a web
server extension. Many modern multi-tier applications use a service-oriented architecture (SOA) based on web
services.
SAP NetWeaver stores application logic in the form of components, and makes these components available to
client applications. The components can be SAP PowerBuilder components, JavaBeans, or COM components.
Application servers can also provide transaction logic to their client applications, guaranteeing that sets
of operations are executed atomically across multiple databases. SQL Anywhere is well suited to multi-tier
computing, and can participate in distributed transactions coordinated by Microsoft Distributed Transaction
Coordinator (MSDTC). Both SAP NetWeaver and Microsoft Transaction Server use DTC to provide transaction
services to their client applications.
The built-in support for web services makes SQL Anywhere a good choice for many multi-tier or SOA
applications.
Extract, Transform, and Load (ETL) is the process by which large amounts of data are extracted from disparate
data sources and consolidated into a single database.
In the extraction phase, data is parsed and evaluated for suitability. During transformation, data is manipulated
to achieve the format required for storage. Some common transformations include the elimination of
unnecessary columns, calculation of computed values, and translation of values such as dates into a common
format so that the data can be consolidated. The data is then loaded into the database at a frequency and
scope consistent with the organization's needs.
OPENSTRING operation
Use the OPENSTRING operation in the FROM clause to transform and load data from client- and server-
side data sources.
OPENXML operator
Use the OPENXML string operator to extract data from XML documents.
MERGE statement
Use the MERGE statement to merge data from different source objects.
Proxy tables
Use proxy tables to access objects such as tables, views, and materialized views in a remote database.
System procedure calls in the FROM clause
Use various system procedures in the FROM clause of a query to extract and transform data for loading.
Related Information
Proxy Tables
System Procedures
FROM Clause
OPENXML Operator
MERGE Statement
SQL Anywhere offers a wide range of options for exchanging data with existing enterprise systems and mobile
devices.
Data exchange technologies include synchronization, replication, messaging, and mobile web service
technologies. There are three SQL Anywhere synchronization technologies: Relay Server, MobiLink, and SQL
Remote. When an application modifies shared data at any one database, the changes are propagated to other
databases in the synchronization system. Changes can be propagated by various means and through a variety
of channels, allowing flexible application architecture while preserving data integrity.
All SQL Anywhere synchronization technologies provide two-way synchronization. Changes made at the
central database are propagated to remote databases. Changes made at remote databases are propagated
to the central database, and to other remote databases.
Relay Server
Relay Server enables secure, load-balanced communication between mobile devices and backend servers
through a web server. Supported backend servers include MobiLink, SQL Anywhere, SAP Afaria, SAP
Mobile Office, SAP Mobile Platform, and SAP Mobile Server.
MobiLink synchronization
MobiLink offers session-based, bi-directional synchronization. It is ideal for exchanging data between a
consolidated database and many remote UltraLite or SQL Anywhere databases, or between a central,
non-relational data source and many remote UltraLite or SQL Anywhere databases.
During a MobiLink synchronization, the remote database uploads changes that were made to it since the
previous synchronization with the MobiLink server. On receiving this data, the MobiLink server updates
the consolidated database and then downloads changes from the consolidated database to the remote
database. It also ensures the transactional integrity of the databases in the event a connection between
them is lost, and provides mechanisms for the resolution of data change conflicts.
MobiLink file transfer functionality lets you transfer files to remote applications on the same connection
you use to synchronize data, which is useful when populating new remote databases or upgrading
software.
In addition, MobiLink provides direct row handling for synchronizing remote data with any central data
source. The data sources to which you can synchronize can include an application, a web server, a web
service, an application server, a text file, a spreadsheet, a non-relational database, or an RDBMS that is not
supported as a consolidated database.
SQL Remote replication
SQL Remote supports SQL Anywhere databases. Each database in the system must have a similar
schema.
Messages are typically files or specially formatted email messages. A message agent, attached to each
database, sends messages regarding changes to its own data. The same agent also receives messages
from one or more other databases and modifies the database according to the contents of the received
messages.
In message-based communications, each message carries its destination address and other control
information so that no direct connection is necessary between applications exchanging information. For
example, an email message contains the destination address; there is no direct connection between the
sending server and the recipient.
Replication messages are delivered occasionally, in periods of seconds, minutes, hours, or days, and as
such, a high transaction volume at each remote site can lead to a very large volume of messages. SQL
Remote is best suited to systems with a relatively low volume of replicated data per remote database.
However, at the consolidated site, SQL Remote can prepare messages efficiently by preparing messages
for multiple sites simultaneously.
To work reliably, a message-based synchronization system must both guarantee that all messages reach
their destination and that the messages are applied in the same order that they are sent. SQL Remote
incorporates a protocol to guarantee application of synchronization updates in the correct order.
The following table summarizes the characteristics of MobiLink and SQL Remote.
In this section:
Any synchronization technology must address challenges that arise as a result of the increased flexibility
permitted by synchronization.
Transactional Integrity
One of the challenges of any synchronization system is to ensure that each database always retains
transactional integrity.
SQL Remote replicates portions of the transaction log in such a way that transactions are maintained during
synchronization: either a whole transaction is replicated, or none of it is replicated. This ensures transactional
integrity at each database in the system.
In MobiLink, you can also choose to replicate each transaction, but by default MobiLink coalesces multiple
transactions on the remote database and applies them in a single transaction. This generally results in more
efficient uploads. In both cases, MobiLink maintains transactional integrity.
Data Consistency
Another challenge to synchronization systems is to maintain data consistency throughout the system.
Synchronization systems maintain a loose consistency in the system as a whole: that is, all changes are
replicated to each site over time in a consistent manner, but different sites may have different copies of data at
any instant.
Related Information
Synchronization Techniques
There are several considerations to make when choosing your synchronization technology.
In a typical synchronization environment, a large database serves as a central repository for information.
Sometimes you can choose a database system that suits your needs. Other times, a central database already
exists and you must adapt the synchronization system to work with it.
MobiLink works with many popular database servers, including SQL Anywhere, SAP HANA, SAP Adaptive
Server Enterprise, Oracle, Microsoft SQL Server, Microsoft Azure, MySQL, SAP IQ, and IBM DB2 UDB. Using
the MobiLink server APIs for .NET and Java, you can synchronize with any data source, including application
servers, web servers, text files, and other database products.
Note
Synchronization technologies also differ in the types of remote databases that they can support.
Network Characteristics
MobiLink and SQL Remote are both well suited to occasionally connected environments, where remote sites
must operate for hours or days in isolation, although more frequent synchronization is possible whenever a
network connection is available.
MobiLink is session based. A real-time connection is required during synchronization. If this connection is
interrupted before synchronization is complete, the process does not complete until the next synchronization.
In contrast, SQL Remote relays information via messages, which can be sent or received asynchronously.
These messages may take the form of files on a hard disk, or email messages. These messages can be
processed whenever they are received, allowing synchronization to occur incrementally.
In some situations, it may be important that your information is replicated immediately. In others,
synchronization once or twice a day may suffice. In fact, more frequent synchronization may be impossible
when no network connection is available.
Both MobiLink and SQL Remote are primarily intended for situations where synchronization occurs
infrequently, such as every few hours or days, but both can be used to synchronize as frequently as every
few seconds.
MobiLink and SQL Remote both work well with a very large number of remote users. MobiLink scalability is
limited only by the scalability of the consolidated database management system. The SQL Remote message-
based design allows a typical installation to handle thousands of remote users.
There is no hard limit on the maximum number of remote sites with any of these systems. The actual number
depends on the amount of information replicated, the frequency of synchronization, and the design of your
application.
Transaction Ordering
By default, MobiLink works by grouping the results of multiple transactions on the remote database into one
set of changes to be applied to the consolidated database. Alternatively, you can choose to preserve the order
of transactions and upload them separately. In both cases, synchronization always occurs at a transaction
boundary, and so referential integrity is preserved. Uncommitted data is never synchronized, and so data
integrity is preserved.
SQL Remote replicates data by scanning the transaction log and preparing messages, as appropriate, for each
transaction. It orders these messages and sends them to the remote or consolidated site. When processing
receives the messages, SQL Remote always processes them in the same order as they were applied to the
other database. When necessary, it automatically delays processing a message until all earlier messages have
been applied.
Immediately following each MobiLink synchronization session, the data in the two databases is consistent. The
ability to guarantee the consistency of the data at a remote site at a particular point in time is an advantage
of MobiLink session-based synchronization. For example, if it is important that the data at a remote site
accurately reflect the data in the consolidated database at a particular time, such as 10 a.m., this objective
can be achieved by synchronizing before this time. As long as the synchronization completes successfully, the
currency of the data at the remote site is assured.
When changes to the data are replicated through an exchange of messages, it is difficult to guarantee that the
data in a particular remote site is completely consistent with the data in the consolidated site at any particular
MobiLink and SQL Remote provide data synchronization between a central database and a set of remote
databases.
In MobiLink, the consolidated database is one of several supported RDBMSs. The consolidated database,
which typically resides on a corporate server, tracks synchronization information and optionally contains the
data to be replicated. Other central data may be stored in any other format, such as a non-relational database,
web service, or text file.
MobiLink also provides direct row handling, which enables data synchronization to consolidated data sources
other than relational databases including enterprise resource planning (ERP) systems or application servers.
In SQL Remote, all data that is to be synchronized is contained in a SQL Anywhere consolidated database.
A remote database can run either at the same site as the consolidated database or at a physically distant
site such as a handheld device. The remote database can share all or some of the data in the consolidated
database.
Remote Users
A typical synchronization system includes many remote databases. Each remote database contains a subset of
the information in the central database. Each remote database is a physically separate database, usually on a
separate computer or mobile device. All remote databases must stay consistent with the central database.
The entire synchronization system may be considered a single dispersed database, with the master copy of all
shared data being kept at the central database.
Each remote site that synchronizes with the central database is considered a remote user of the central
database. In the case that a remote site is a multi-user server, the entire site is considered to be a single remote
user of the central database.
SQL Remote supports hierarchical configurations of databases; it does not support peer-to-peer
synchronization or other non-hierarchical configurations. MobiLink is also normally used with a hierarchical
configuration, but it can also be used in other configurations.
For any two databases directly sharing data in a hierarchical configuration, one is always above or below the
other in the hierarchy.
In a MobiLink or SQL Remote system, each database contains all or a subset of the data replicated by the
database above it in the hierarchy.
Remote databases can contain tables that are not present at the consolidated database as long as they are not
involved in synchronization. SQL Remote requires that the table and column names in the remote databases
match the ones in the consolidated database. In contrast, MobiLink allows data to be stored in different
columns and tables in the remote databases than in the consolidated database, allowing greater flexibility.
There are many design and management tools for administering, monitoring, and troubleshooting databases.
Note
Adobe will stop updating and distributing the Flash Player at the end of 2020. Because the SQL Anywhere
Monitor is based on Flash, you cannot use it once Flash support ends. In many cases, tasks that were
previously performed in the Monitor can be performed in the SQL Anywhere Cockpit. See SQL Anywhere
Monitor Non-GUI User Guide.
SQL Central is an integrated database administration and development tool that provides access to
database settings, properties, and utilities in a graphical user interface. Via plug-ins, SQL Central manages
SQL Anywhere Server, UltraLite, MobiLink, and other products.
In addition to helping with routine tasks, SQL Central also provides performance statistics, procedure
profiling, stored procedure debugging, and the management of events and schedules, web services,
and connection profiles. SQL Central helps administer any tasks that are performed by sending SQL
statements to the database server, or performed by SQL Anywhere utilities.
A variety of SQL Central tools are available to help you analyze and monitor the current performance of
your SQL Anywhere database. These tools include graphical plans, query executions, logging requests,
timing utilities, and the performance monitor. In addition, SQL Central offers:
Spatial data describes the position, shape, and orientation of objects in a defined space. Spatial data in
SQL Anywhere is represented as 2D geometries in the form of points, curves (line strings and strings of
circular arcs), and polygons.
Index selection and optimization by using the Index Consultant
The Index Consultant analyzes workloads and provides recommendations on how to select indexes to
optimize performance. The Index Consultant can be run from either SQL Central or Interactive SQL.
Interactive SQL: SQL query editor
Interactive SQL is a database utility designed to execute SQL statements and display database data. The
built-in query editor and other tools, such as the graphical plan display, help you to analyze, troubleshoot,
and optimize queries.
SQL Anywhere Monitor
The Monitor is a browser-based administration tool that provides you with information about the health
and availability of SQL Anywhere databases, MobiLink servers, and MobiLink server farms. The Monitor
provides constant data collection, email alert notifications, a browser-based interface, and the ability to
monitor multiple databases, MobiLink servers, and MobiLink server farms. It also monitors the availability
of web servers, proxy servers, and host computers.
SQL Anywhere Cockpit
Cockpit is a light-weight, low-impact monitoring application that makes it easy to view connected users,
database and server properties, as well as the database server messages.
SQL Anywhere Profiler
The MobiLink Profiler is a graphical administration tool that provides details about the performance
of MobiLink synchronizations. The MobiLink Profiler collects details and statistical summaries about
all synchronizations that occur, including start and end times, data volume uploaded and downloaded,
successful completions, conflicts, and more.
Utilities
SQL Anywhere includes various utilities for performing administration tasks such as backing up a database
and performing synchronizations. Utilities are useful for including in batch files for repeated use.
Related Information
SQL Central
Diagnostic Tracing (Deprecated)
SQL Anywhere Profiler
Optimize Indexes to Improve Performance
Interactive SQL
SQL Anywhere Monitor
MobiLink Profiler
Database Administration Utilities
UltraLite Utilities
MobiLink Utilities
Database Creation
Cockpit Security
SQL Anywhere Profiler
SQL Remote Utilities and Options Reference
In this section:
For consistency and simplicity, many of the examples throughout the documentation use the SQL Anywhere
sample database, %SQLANYSAMP17%\demo.db.
By default this file is installed in the SQL Anywhere samples directory (for example,
C:\Users\Public\Documents\SQL Anywhere 17\Samples on Windows 7).
The sample database uses the following default user ID and password:
• User ID = DBA
• Password = sql (passwords in SQL Anywhere are case sensitive)
Caution
The sample database always has the same user ID and password; change the DBA user ID and password to
restrict access to the database.
The sample database uses the following ODBC data source: SQL Anywhere 17 Demo.
• You do not need to enter a user ID because the SQL Anywhere 17 Demo data source already contains this
information, but you must specify the password sql.
In a production environment, do not store passwords in an ODBC data source.
• The database server does not need to be running before connecting since the SQL Anywhere 17 Demo data
source automatically starts the database server.
The sample database represents a small company that sells athletic clothing. It contains internal information
about the company (employees, departments, and finances), product information, and sales information (sales
orders, customers, and contacts). All data in the database is fictional.
The sample database contains one user-extended role (GROUPO) and three user-defined roles (READ_ROLE,
MODIFY_ROLE, and EXEC_ROLE).
GROUPO is a user that has been extended as a role. GROUPO is the owner of the tables described above. It
is also the owner of a number of sample views, materialized views, and stored procedures that are defined in
the sample database. Any new user that is granted the role GROUPO can reference these database objects
without the owner qualifier. For example, they can refer to the Departments table without adding the owner
prefix (GROUPO.Departments).
Any user that is granted the role READ_ROLE has read access to the rows in the tables described above. Users
with this role can perform a SELECT on any of these tables.
Any user that is granted the role MODIFY_ROLE has write access to the rows in the tables described above.
Users with this role can perform an INSERT, UPDATE, or DELETE on any of these tables.
Any user that is granted the role EXEC_ROLE can execute any of the sample stored procedures that are
defined in the sample database with the exception of ManageContacts (ShowContacts, ShowCustomers,
ShowCustomerProducts, ShowProductInfo, ShowSalesOrders, ShowSalesOrderDetail, ShowSalesOrderItems,
and debugger_tutorial). The ManageContacts stored procedure is used to add, delete and update contacts in
the Contacts table.
In a large enterprise, there would be many such roles. For example, a Sales department might own the sales-
related and customer-related tables, a Manufacturing or Purchasing department might own the products-
related tables, a Human Resources department might own the employees-related and departments-related
tables, and so on. Each of these departments would have their own collection of roles set up with various
access rights to the tables they own. However, the sample database reflects a small enterprise and the use of
roles has been deliberately kept simple.
The user "DBA" has all privileges for the sample database and can alter the database schema, create new
users, add roles, and so on. This user has been granted the GROUPO user-extended role so that it can
reference the sample tables and stored procedures without qualifying them with an owner ID.
Two additional users have been created to demonstrate the roles described above.
The user "UPDATER" (password "update") has been granted the roles READ_ROLE, MODIFY_ROLE, and
EXEC_ROLE. This user can perform a SELECT, INSERT, UPDATE, or DELETE on any of the sample tables.
This user has EXECUTE privilege on all of the sample stored procedures. The GROUPO user-extended role is
also granted so that this user can reference the sample tables and stored procedures without qualifying them
with an owner ID.
The user "BROWSER" (password "browse") has been granted the roles READ_ROLE, and EXEC_ROLE. This
user can perform a SELECT on any of the sample tables but cannot change the rows in the tables in any
way. This user has EXECUTE privilege on all of the sample stored procedures with the exception of the
ManageContacts stored procedure since this procedure is used to add, delete and update contacts in the
Contacts table (the role MODIFY_ROLE is required to execute ManageContacts). The GROUPO user-extended
role is also granted so that this user can reference the sample tables and stored procedures without qualifying
them with an owner ID.
In this section:
Related Information
Restore the sample database to its original state or preserve the sample database in its current state and
recreate the sample database in its original state using a different name.
Context
Testing features and completing the tutorials sometimes results in changes to the sample database that can
prevent the successful completion of subsequent tutorials and tests.
Procedure
Option Description
Recreate the sample da- Run the following command to erase demo.db and create a new copy of the sample database
tabase (Windows) with objects and data:
newdemo "%SQLANYSAMP17%\demo.db"
Recreate the sample da- Run the following command in the directory where the sample database is located to erase
tabase (UNIX and Linux) demo.db and create a new copy of the sample database with objects and data:
newdemo.sh demo.db
Create a copy of the sam- Run the following command to create a database called mydemo.db that contains objects
ple database with a differ- and data.
ent name (Windows)
If you do not specify a path, the database and transaction log are created in the current
directory.
newdemo path\mydemo.db
Create a copy of the sam- Run the following command to create a database called mydemo.db that contains objects
ple database with a differ- and data.
ent name (UNIX and Li-
If you do not specify a path, the database and transaction log are created in the current
nux)
directory.
newdemo.sh path/mydemo.db
The database has been recreated to its original state or a copy of the sample database has been created with a
different name.
The CustDB sample application is a useful tool for learning how to develop UltraLite and MobiLink applications.
The sample database is a sales status database for a hardware supplier. It holds customer, product, and sales
force information for the supplier.
UltraLite
For UltraLite, CustDB can be deployed on any device supported by UltraLite using any platform supported
by UltraLite. You can see all the source code used to create the CustDB UltraLite application and run the
sample. The CustDB sample application is set up for MobiLink synchronization.
If you are interested in exploring MobiLink features, there is a CustDB consolidated database that contains
sample synchronization logic. You can use this consolidated database with the CustDB UltraLite sample
remote database to run the sample synchronization system.
The MobiLink consolidated CustDB database is created by running script files against a supported
relational database (SQL Anywhere, Adaptive Server Enterprise, Oracle, Microsoft SQL Server, or IBM
DB2). These setup files are located in %SQLANYSAMP17%\MobiLink\CustDB\.
Note
The CustDB consolidated database uses the following ODBC data source: SQL Anywhere 17 CustDB.
The SQL Anywhere 17 CustDB uses the following default user ID and password:
• User ID = ml_server
• Password = sql (passwords in SQL Anywhere are case sensitive)
Caution
The sample database always has the same user ID and password; change the DBA user ID and
password to restrict access to the database.
Related Information
This Help assists you with your day-to-day tasks and includes detailed product information and procedures.
In this section:
• View documentation
• Provide suggestions and corrections to improve documentation for all users in future releases by clicking
the Feedback link on a topic.
Operating systems
SQL Anywhere runs on many platforms. Typically, the behavior of the software is the same on all
platforms, but occasionally there are variations or limitations. These limitations are commonly based
on the underlying operating system (Microsoft Windows, UNIX, or Linux), and seldom on the particular
version or variant of the operating system (for example, IBM AIX). To simplify references to operating
systems, the documentation groups the supported operating systems as follows:
Microsoft Windows
Unless otherwise specified, when the documentation refers to Microsoft Windows, it refers to all
supported Microsoft Windows-based platforms.
Unless otherwise specified, when the documentation refers to UNIX, it refers to all supported UNIX
platforms, including macOS.
Linux
Unless otherwise specified, when the documentation refers to Linux, it refers to all supported Linux
platforms.
For the complete list of platforms supported by SQL Anywhere, see the SAP SQL Anywhere Supported
Platforms and Engineering Support Status .
Directory and file names
These conventions are used to simplify the documentation of directory and file names:
On Microsoft Windows, UNIX and Linux, directory and file names can contain uppercase and lowercase
letters.
On Microsoft Windows, references to directories and files are not case sensitive. Mixed case directory
and file names are common, but it is common to refer to them using all lowercase letters.
On UNIX and Linux, references to directories and files are case sensitive. Mixed case directory and file
names are not common. Most use all lowercase letters.
Slashes separating directory and file names
The documentation uses backslashes (\) as the directory separator. On UNIX and Linux, replace the
backslash with the forward slash (/).
Executable files
The documentation shows executable file names using Microsoft Windows conventions, with a suffix
such as .exe or .bat. On UNIX and Linux, executable file names have no suffix.
32-bit and 64-bit versions
The documentation does not always distinguish between 32-bit and 64-bit versions of the software. In
some cases, the documentation provides an example file path that includes bin32 or bin64. The two
are interchangeable, and depend on the version of the software that was installed. For example, the file
paths C:\Program Files\SQL Anywhere 17\bin32 and C:\Program Files\SQL Anywhere 17\bin64 are
equivalent.
Command prompts and command shell syntax
If these examples contain characters that the shell considers special, the command requires modification
for the specific shell. The modifications are beyond the scope of this documentation, but generally, use
quotes around the parameters containing those characters or use an escape character before the special
characters.
Some command line options require a parameter that accepts detailed value specifications in a list.
The list is enclosed with parentheses or curly braces. The documentation uses parentheses. For
example:
-x tcpip(host=127.0.0.1)
-x tcpip{host=127.0.0.1}
If both forms result in syntax problems, enclose the entire parameter in quotes as required by the shell:
-x "tcpip(host=127.0.0.1)"
Semicolons
If you must specify quotes in a parameter value, the quotes can conflict with the traditional use of
quotes to enclose the parameter. For example, to specify an encryption key whose value contains
double quotes, enclose the key in quotes and then escape the embedded quote:
Related Information
There are several online resources and sources of additional help available.
Hyperlinks
Some links are classified by an icon and/or a mouseover text. These links provide additional information.
About the icons:
• Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your
agreements with SAP) to this:
• The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.
• SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any
damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.
• Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering an SAP-hosted Web site. By using
such links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this
information.
Example Code
Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax
and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of
example code unless damages have been caused by SAP's gross negligence or willful misconduct.
Bias-Free Language
SAP supports a culture of diversity and inclusion. Whenever possible, we use unbiased language in our documentation to refer to people of all cultures, ethnicities,
genders, and abilities.
SAP and other SAP products and services mentioned herein as well as
their respective logos are trademarks or registered trademarks of SAP
SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their
respective companies.