1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>Data Migration</title>
7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Getting Started with the Oracle Berkeley DB SQL APIs" />
10 <link rel="up" href="admin.html" title="Chapter 5. Administrating Berkeley DB SQL Databases" />
11 <link rel="prev" href="sync.html" title="Syncing with Oracle Databases" />
12 <link rel="next" href="bfile-extension.html" title="Appendix A. Using the BFILE Extension" />
15 <div xmlns="" class="navheader">
17 <p>Library Version 11.2.5.3</p>
19 <table width="100%" summary="Navigation header">
21 <th colspan="3" align="center">Data Migration</th>
24 <td width="20%" align="left"><a accesskey="p" href="sync.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. Administrating Berkeley DB SQL Databases</th>
26 <td width="20%" align="right"> <a accesskey="n" href="bfile-extension.html">Next</a></td>
31 <div class="sect1" lang="en" xml:lang="en">
32 <div class="titlepage">
35 <h2 class="title" style="clear: both"><a id="datamigration"></a>Data Migration</h2>
43 <a href="datamigration.html#shellmigrate">Migration Using the Shells</a>
49 If you have a database created by SQLite, you can migrate
50 it to a Berkeley DB database for use with the BDB SQL interface. For
51 production applications, you should do this only when your
52 application is shutdown.
55 All data and schema supported by SQLite can be migrated to a
58 <div class="sect2" lang="en" xml:lang="en">
59 <div class="titlepage">
62 <h3 class="title"><a id="shellmigrate"></a>Migration Using the Shells</h3>
67 To migrate your data from SQLite to a Berkeley DB database:
69 <div class="orderedlist">
73 Make sure your application is shutdown.
78 Open the SQLite database within the
79 <span class="command"><strong>sqlite3</strong></span> shell.
84 Execute the <code class="literal">.output</code> command to
85 specify the location where you want to dump data.
90 Dump the database using the SQLite
91 <code class="literal">.dump</code> command.
96 Close the <span class="command"><strong>sqlite3</strong></span> shell and open
99 <a href="../api_reference/C/dbsql.html" class="olink">dbsql</a> shell.
106 Load the dumped data using the
107 <code class="literal">.read</code> command.
113 Note that you can migrate in the reverse direction as well.
114 Dump the Berkeley DB database by calling <code class="literal">.dump</code>
115 from within the Berkeley DB
117 <a href="../api_reference/C/dbsql.html" class="olink">dbsql</a> shell,
120 and load it into SQLite by <code class="literal">.read</code> from within
121 SQLite's <span class="command"><strong>sqlite3</strong></span> shell.
125 <div class="navfooter">
127 <table width="100%" summary="Navigation footer">
129 <td width="40%" align="left"><a accesskey="p" href="sync.html">Prev</a> </td>
130 <td width="20%" align="center">
131 <a accesskey="u" href="admin.html">Up</a>
133 <td width="40%" align="right"> <a accesskey="n" href="bfile-extension.html">Next</a></td>
136 <td width="40%" align="left" valign="top">Syncing with Oracle Databases </td>
137 <td width="20%" align="center">
138 <a accesskey="h" href="index.html">Home</a>
140 <td width="40%" align="right" valign="top"> Appendix A. Using the BFILE Extension</td>