Berkeley DB Installation and Build Guide

Legal Notice

Copyright © 2002 - 2019 Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Berkeley DB, and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle.

Other names may be trademarks of their respective owners.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

1-Jun-2020


Table of Contents

Preface
Conventions Used in this Book
For More Information
Contact Us
1. Introduction
Installation Overview
Supported Platforms
2. System Installation Notes
File utility /etc/magic information
Magic information
Big-endian magic information
Little-endian magic information
Building with multiple versions of Berkeley DB
3. Debugging Applications
Introduction to debugging
Compile-time configuration
Run-time error information
Reviewing Berkeley DB log files
Augmenting the Log for Debugging
Extracting Committed Transactions and Transaction Status
Extracting Transaction Histories
Extracting File Histories
Extracting Page Histories
Other log processing tools
4. Building Berkeley DB for Windows
Building Berkeley DB for Windows
Visual C++ .NET 2015
Visual C++ .NET 2013
Visual C++ .NET 2012
Visual C++ .NET 2010
Build results
Building Berkeley DB with Cygwin
Building the C++ API
Building the C++ STL API
Building the Java API
Building the C# API
Building the Tcl API
Building Secure Sockets Layer (SSL) Support for the Replication Manager
Distributing DLLs
Additional build options
Building a small memory footprint library
Running the test suite under Windows
Building the software needed by the tests
Running the test suite under Windows
Windows notes
Windows FAQ
5. Building Berkeley DB for UNIX/POSIX
Building for UNIX/POSIX
Configuring Berkeley DB
Building a small memory footprint library
Changing compile or load options
Cross-Compiling on Unix
Installing Berkeley DB
Dynamic shared libraries
Running the test suite under UNIX
Architecture independent FAQ
AIX
FreeBSD
HP-UX
Apple iOS (iPhone OS)
IRIX
Linux
Mac OS X
SCO
Solaris
SunOS
6. Building Berkeley DB for VxWorks
Building for VxWorks 6.x and VxWorks 7
Building With Wind River Workbench using the Makefile
VxWorks notes
Building and Running the Demo Program
Building and Running the Utility Programs
Support for Replication Manager
VxWorks FAQ
7. Building Third Party APIs
Building the Go API
Install Oracle Berkeley DB
Build Go Berkeley DB (go-bdb)
Test Go Berkeley DB (go-bdb)
Additional Information
Building Node.js
Additional Information
8. Upgrading Berkeley DB 12.1.6.2 applications to Berkeley DB 18.1
Introduction
License Change
Secure Sockets Layer (SSL) Support for the Replication Manager
New Function
New Flags
Multiversion Concurrency Control (MVCC) for Replication Clients
New Replication Environment Region Objects
New Parameters
New Replication Manager Flags
New Parameter Values
New Information Available to Replicated Applications
New Error
New Replication Manager Event
New Replication Manager Statistic
New Replication Manager Site Field
New Replication Manager Site Flag
New Utility db_convert
New Direct Persistence Layer (DPL) API
New Utility Command Line Option
SQL API Changes
SQL User Authentication
New PRAGMAs
Internal Berkeley DB Messages
Updated SQL Version
Changed Visual Studio Support
Added VxWorks Support
Added PHP 7 Support
Error Message Numbers
Removed Utility db_sql_codegen
Removed QNX Support
Berkeley DB Library Version 18.1.40 Change Log
Changes between version 18.1.32 and version 18.1.40
Changes between version 18.1.25 and version 18.1.32
Database or Log File On-Disk Format Changes
New Features/Improvements
Database Environment Changes
Concurrent Data Store Changes
Access Method Changes
API Changes
SQL-specific API Changes
Tcl-specific API Changes
Java-specific API Changes
C#-specific API Changes
Replication Changes
Locking Subsystem Changes
Logging Subsystem Changes
Memory Pool Subsystem Changes
Mutex Subsystem Changes
Transaction Subsystem Changes
Test Suite Changes
Utility Changes
Configuration, Documentation, Sample Apps, Portability and Build Changes
Example Changes
Miscellaneous Bug Fixes
Deprecated Features
Known Bugs
9. Upgrading Berkeley DB 12.1.6.1 applications to Berkeley DB 12.1.6.2
Introduction
Database Slices
New Functions
New Error
New Parameter Values
Renaming the BLOB file feature to External Files
Functions
New Parameter Values
New Statistics
Configurable Region Directory
New Functions
Replication Write Forwarding
New Parameter Values
Replication Manager IPv6 Support
New Function
Global Message Prefix
New Functions
Message Call Function Signature Change
Reindex SQL Databases
Changes to SQL Behavior
Updated SQLite Version
Support for Java 8
Support for arm64
JDBC Build Changes
varargs.h Not Supported
Removed Java Methods
Dropped Support
Berkeley DB Library Version 12.1.6.2 Change Log
Database or Log File On-Disk Format Changes
New Features/Improvements
Database Environment Changes
Concurrent Data Store Changes
Access Method Changes
API Changes
SQL-specific API Changes
Tcl-specific API Changes
Java-specific API Changes
C#-specific API Changes
Replication Changes
Locking Subsystem Changes
Logging Subsystem Changes
Memory Pool Subsystem Changes
Mutex Subsystem Changes
Transaction Subsystem Changes
Test Suite Changes
Utility Changes
Configuration, Documentation, Sample Apps, Portability and Build Changes
Example Changes
Miscellaneous Bug Fixes
Deprecated Features
Known Bugs
10. Upgrading Berkeley DB 12.1.6.0 applications to Berkeley DB 12.1.6.1
Introduction
Failchk Broadcast Notifications
New Parameter Value
New Events
New Logging Option
New Parameter Value
Replication Manager Preferred Master Mode
New Parameter Values
Replication Manager Incoming Queue Size Limit
New Functions
New Event
New Database Format for BLOBs
Updated SQLite Version
Upgrading SQL databases to releases after 6.1.19
Removed C# Class
Dropped Support
Berkeley DB Library Version 12.1.6.1 Change Log
Database or Log File On-Disk Format Changes
New Features/Improvements
Database Environment Changes
Concurrent Data Store Changes
Access Method Changes
API Changes
SQL-specific API Changes
Tcl-specific API Changes
Java-specific API Changes
C#-specific API Changes
C++-specific API Changes
Replication Changes
Locking Subsystem Changes
Logging Subsystem Changes
Memory Pool Subsystem Changes
Mutex Subsystem Changes
Transaction Subsystem Changes
Test Suite Changes
Utility Changes
Configuration, Documentation, Sample Apps, Portability and Build Changes
Example Changes
Miscellaneous Bug Fixes
Platform Certification Changes
Deprecated Features
Known Bugs
11. Upgrading Berkeley DB 11.2.5.3 applications to Berkeley DB 12.1.6.0
Introduction
Binary Large Object Support
New Functions
New Flags Accepted by Blob Streaming Interfaces
Other New Flags
New Pragma
Replication Views
New Function
New Flag
Enhanced BDB SQL Replication Options
New Pragmas
Replication Manager Automatic Takeover
New Event
New Berkeley DB SQL API Pragma
New Pragma
UNIX/POSIX SQL Encryption Default
Sequence Datatype Changes
Comparison Function Signature Change
License Change
Updated SQLite Version
Sun Workshop Compiler Optimization Level
Dropped Support
Berkeley DB Library Version 12.1.6.0 Change Log
Database or Log File On-Disk Format Changes
New Features
Database Environment Changes
Concurrent Data Store Changes
Access Method Changes
API Changes
SQL-specific API Changes
Tcl-specific API Changes
Java-specific API Changes
C#-specific API Changes
Replication Changes
Locking Subsystem Changes
Logging Subsystem Changes
Memory Pool Subsystem Changes
Mutex Subsystem Changes
Transaction Subsystem Changes
Test Suite Changes
Utility Changes
Configuration, Documentation, Sample Apps, Portability and Build Changes
Example Changes
Miscellaneous Bug Fixes
Deprecated Features
Known Bugs
12. Upgrading Berkeley DB 11.2.5.2 applications to Berkeley DB 11.2.5.3
Introduction
Changes to the build_windows Folder
Replication Connection Status in the Java API
New Function
New Class
Deprecated Function
Exclusive Database Handles
New Functions
Configure the Region Size of Heap Databases
New Functions
New Hotbackup Interface
New Functions
Flags Accepted by DB_ENV->backup()
Flags Accepted by DB_ENV->dbbackup()
Enumerations Accepted by DB_ENV->set_backup_config()
Updated JDBC Version
Configure Directory to Store Metadata Files
New Functions
Changes in the SQL API Build
New Berkeley DB SQL API PRAGMAs
New PRAGMAs
Replication for Existing Databases in the SQL API
PRAGMAs With Permanent Effects
PRAGMAs That Can Now Operate on Existing Databases
Berkeley DB X/Open Compliant XA Resource Manager and Transaction Snapshots
Berkeley DB Library Version 11.2.5.3 Change Log
Database or Log File On-Disk Format Changes
New Features
Database Environment Changes
Access Method Changes
SQL API Changes
Java-specific API changes
Replication Changes
Locking Subsystem Changes
Logging Subsystem Changes
Memory Pool Subsystem Changes
Mutex Subsystem Changes
Transaction Subsystem Changes
Utility Changes
Configuration, Documentation, Sample Apps, Portability and Build Changes
Known Bugs
13. Upgrading Berkeley DB 11.2.5.1 applications to Berkeley DB 11.2.5.2
Introduction
SQLite Interface Upgrade
32bit/64bit Compatibility on Windows
Read Only flag for DBT
New Flag
Dynamic Environment Configuration
New Functions
Deprecated Functions
Exclusive Transactions in the SQL Layer
Group Membership in Repmgr
Upgrading
New Functions
Modified Functions
New Events
Removed Functions
New Parameters
New Structure
Heap Access Method
New Functions
Modified Functions
New Definition
Enabling Transaction Snapshots in the SQL Layer
New Pragmas
2SITE_STRICT Enabled by Default in Replication
Enabling Replication in the SQL Layer
New Pragmas
Repmgr Message Channels
New Functions
Sequence Support in the SQL Layer
New Functions
Berkeley DB X/Open Compliant XA Resource Manager
Constraints
New Flag
Modified Function
Hot Backup Changes
Berkeley DB Library Version 11.2.5.2 Change Log
Database or Log File On-Disk Format Changes
New Features
Database Environment Changes
Concurrent Data Store Changes
Access Method Changes
SQL API Changes
C API Changes
Tcl-specific API Changes
C#-specific API Changes
Replication Changes
Locking Subsystem Changes
Logging Subsystem Changes
Memory Pool Subsystem Changes
Mutex Subsystem Changes
Transaction Subsystem Changes
Test Suite Changes
Utility Changes
Configuration, Documentation, Sample Apps, Portability and Build Changes
Example Changes
Miscellaneous Bug Fixes
Deprecated Features
Known Bugs
14. Upgrading Berkeley DB 11.2.5.0 applications to Berkeley DB 11.2.5.1
Introduction
DPL Applications must be recompiled
Source Tree Rearranged
SQLite Interface Upgrade
Mod_db4 Support Discontinued
Berkeley DB Library Version 11.2.5.1 Change Log
Database or Log File On-Disk Format Changes
New Features
Database Environment Changes
Concurrent Data Store Changes
Access Method Changes
API Changes
SQL-Specific API Changes
Tcl-Specific API Changes
Java-Specific API Changes
C#-Specific API Changes
Direct Persistence Layer (DPL), Bindings and Collections API
Replication Changes
Locking Subsystem Changes
Logging Subsystem Changes
Memory Pool Subsystem Changes
Mutex Subsystem Changes
Transaction Subsystem Changes
Test Suite Changes
Utility Changes
Configuration, Documentation, Sample Apps, Portability, and Build Changes
Example Changes
Miscellaneous Bug Fixes
Deprecated Features
Known Bugs
15. Upgrading Berkeley DB 4.8 applications to Berkeley DB 11.2.5.0
Introduction
db_sql Renamed to db_sql_codegen
DB_REP_CONF_NOAUTOINIT Replaced
Support for Multiple Client-to-Client Peers
Cryptography Support
DB_NOSYNC Flag to Flush Files
Dropped Support
Changing Stack Size
Berkeley DB 11g Release 2 Change Log
Changes between 11.2.5.0.26 and 11.2.5.0.32
Changes between 11.2.5.0.21 and 11.2.5.0.26
Changes between 4.8 and 11.2.5.0.21
Known Bugs
16. Upgrading Berkeley DB 4.7 applications to Berkeley DB 4.8
Introduction
Registering DPL Secondary Keys
Minor Change in Behavior of DB_MPOOLFILE->get
Dropped Support for fcntl System Calls
Upgrade Requirements
Berkeley DB 4.8.28 Change Log
Changes between 4.8.26 and 4.8.28:
Known bugs in 4.8
Changes between 4.8.24 and 4.8.26:
Changes between 4.8.21 and 4.8.24:
Changes between 4.7 and 4.8.21:
Database or Log File On-Disk Format Changes:
New Features:
Database Environment Changes:
Concurrent Data Store Changes:
General Access Method Changes:
Btree Access Method Changes:
Hash Access Method Changes:
Queue Access Method Changes:
Recno Access Method Changes:
C-specific API Changes:
C++-specific API Changes:
Java-specific API Changes:
Direct Persistence Layer (DPL), Bindings and Collections API:
Tcl-specific API Changes:
RPC-specific Client/Server Changes:
Replication Changes:
XA Resource Manager Changes:
Locking Subsystem Changes:
Logging Subsystem Changes:
Memory Pool Subsystem Changes:
Mutex Subsystem Changes:
Test Suite Changes
Transaction Subsystem Changes:
Utility Changes:
Configuration, Documentation, Sample Application, Portability and Build Changes:
17. Test Suite
Running the test suite
Test suite FAQ