Debian Codegraph @

docs/bdb-sql/datamigration.html

raw symbols SCIP
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">
4 <head>
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" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">Data Migration</th>
22 </tr>
23 <tr>
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>
27 </tr>
28 </table>
29 <hr />
30 </div>
31 <div class="sect1" lang="en" xml:lang="en">
32 <div class="titlepage">
33 <div>
34 <div>
35 <h2 class="title" style="clear: both"><a id="datamigration"></a>Data Migration</h2>
36 </div>
37 </div>
38 </div>
39 <div class="toc">
40 <dl>
41 <dt>
42 <span class="sect2">
43 <a href="datamigration.html#shellmigrate">Migration Using the Shells</a>
44 </span>
45 </dt>
46 </dl>
47 </div>
48 <p>
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.
53 </p>
54 <p>
55 All data and schema supported by SQLite can be migrated to a
56 Berkeley DB database.
57 </p>
58 <div class="sect2" lang="en" xml:lang="en">
59 <div class="titlepage">
60 <div>
61 <div>
62 <h3 class="title"><a id="shellmigrate"></a>Migration Using the Shells</h3>
63 </div>
64 </div>
65 </div>
66 <p>
67 To migrate your data from SQLite to a Berkeley DB database:
68 </p>
69 <div class="orderedlist">
70 <ol type="1">
71 <li>
72 <p>
73 Make sure your application is shutdown.
74 </p>
75 </li>
76 <li>
77 <p>
78 Open the SQLite database within the
79 <span class="command"><strong>sqlite3</strong></span> shell.
80 </p>
81 </li>
82 <li>
83 <p>
84 Execute the <code class="literal">.output</code> command to
85 specify the location where you want to dump data.
86 </p>
87 </li>
88 <li>
89 <p>
90 Dump the database using the SQLite
91 <code class="literal">.dump</code> command.
92 </p>
93 </li>
94 <li>
95 <p>
96 Close the <span class="command"><strong>sqlite3</strong></span> shell and open
97 the Berkeley DB
98 <span>
99 <a href="../api_reference/C/dbsql.html" class="olink">dbsql</a> shell.
100 </span>
101
102 </p>
103 </li>
104 <li>
105 <p>
106 Load the dumped data using the
107 <code class="literal">.read</code> command.
108 </p>
109 </li>
110 </ol>
111 </div>
112 <p>
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
116 <span>
117 <a href="../api_reference/C/dbsql.html" class="olink">dbsql</a> shell,
118 </span>
119
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.
122 </p>
123 </div>
124 </div>
125 <div class="navfooter">
126 <hr />
127 <table width="100%" summary="Navigation footer">
128 <tr>
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>
132 </td>
133 <td width="40%" align="right"> <a accesskey="n" href="bfile-extension.html">Next</a></td>
134 </tr>
135 <tr>
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>
139 </td>
140 <td width="40%" align="right" valign="top"> Appendix A. Using the BFILE Extension</td>
141 </tr>
142 </table>
143 </div>
144 </body>
145 </html>