Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » UltraLite - Database Management and Reference » Introducing UltraLite » UltraLite transaction and state management


Concurrency in UltraLite

Concurrency is the manner in which UltraLite shares resources by allowing multiple connections at the same time. UltraLite uses the following methods to manage concurrency:

  • Multiple databases   A single UltraLite application can open connections to multiple databases. UltraLite can open up to 8 databases on Palm OS and up to 32 databases for all other platforms.

  • Multiple applications   The UltraLite database can only be opened by one process at a time. If you plan to support concurrency among multiple applications, choose the UltraLite engine as your data management component. See Choosing an UltraLite data management component.

  • Multiple threads   UltraLite supports multi-threaded applications. A single application can be written to use multiple threads, each of which can connect to the same or different databases.

    If you are managing your database with the runtime, ensure that you do not exceed the concurrent connection limits supported by UltraLite. These are:

    • 16 concurrent connections for Palm OS.

    • 64 concurrent connections for all other platforms.

    If you are managing your database connections with the UltraLite engine, the number of SQLCAs you can use is typically restricted to 128. However, the implementation of UltraLite.NET API effectively reduces this limit to 128 less the number of running UltraLite.NET clients.

  • Multiple transactions/requests    Each connection can have a single transaction in progress at one time. Transactions can consist of a single request or multiple requests. Data modifications made during a transaction are not made permanent in the database until the transaction is committed. Either all data modifications made in a transaction are committed, or all are rolled back. See UltraLite transaction processing.

  • Synchronization   During upload and download, read-write access to the database is permitted. However, if an application changes a row that the download then attempts to change, the download fails and rolls back. Use the Disable Concurrency synchronization parameter to disable access to data during synchronization. See Additional Parameters synchronization parameter.

    If synchronization fails, UltraLite supports resumable downloads on all platforms. See Handling failed downloads.

See also