/
ap02-databases.xml
137 lines (133 loc) · 5.7 KB
/
ap02-databases.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?xml version="1.0" encoding="UTF-8"?>
<appendix version="5.0" xml:id="xx-02-databases" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:ns="http://docbook.org/ns/docbook"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:html="http://www.w3.org/1999/xhtml">
<title>Database Notes</title>
<para>
Each database management system has its own characteristics that results in
feature coverage in SymmetricDS. The following table shows which features are available
by database.
</para>
<para>
<table>
<title>Support by Database</title>
<tgroup cols="7">
<colspec colwidth="75px" />
<colspec colwidth="65px" />
<colspec colwidth="50px" />
<colspec colwidth="50px" />
<colspec colwidth="50px" />
<colspec colwidth="50px" />
<colspec colwidth="50px" />
<thead>
<row>
<entry>Database</entry>
<entry>Versions supported</entry>
<entry>Transaction Identifier</entry>
<entry>Fallback Update</entry>
<entry>Conditional Sync</entry>
<entry>BLOB Sync</entry>
<entry>CLOB Sync</entry>
</row>
</thead>
<tbody>
<row>
<entry>Oracle</entry>
<entry>8.1.7 and above</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
</row>
<row>
<entry>MySQL</entry>
<entry>5.0.2 and above</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
</row>
<row>
<entry>PostgreSQL</entry>
<entry>8.2.5 and above</entry>
<entry>N</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
</row>
<row>
<entry>SQL Server</entry>
<entry>2005</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
<entry>Y</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
<section>
<title>Oracle</title>
<para>
On Oracle Real Application Clusters (RAC), sequences should be ordered so data is processed
in the correct order.
To offset the performance cost of ordering, the sequences should also be cached.
<programlisting><![CDATA[
alter sequence SEQ_SYM_DATA_DATA_ID cache 1000 order;
alter sequence SEQ_SYM_OUTGOIN_BATCH_BATCH_ID cache 1000 order;
alter sequence SEQ_SYM_OUTGOIN_IST_HISTORY_ID cache 1000 order;
alter sequence SEQ_SYM_TRIGGER_RIGGER_HIST_ID cache 1000 order;
alter sequence SEQ_SYM_TRIGGER_TRIGGER_ID cache 1000 order;]]></programlisting>
</para>
</section>
<section>
<title>MySQL</title>
<para>
MySQL supports several storage engines for different table types. SymmetricDS requires
a storage engine that handles transaction-safe tables. The recommended storage engine
is InnoDB, which is included by default in MySQL 5.0 distributions.
Either select the InnoDB engine during installation or modify your server configuration.
To make InnoDB the default storage engine, modify your MySQL server configuration file
(<filename>my.ini</filename> on Windows, <filename>my.cnf</filename> on Unix):
<programlisting>default-storage_engine = innodb</programlisting>
Alternatively, you can convert tables to the InnoDB storage engine with the following
command:
<programlisting>alter table t engine = innodb;</programlisting>
</para>
</section>
<section>
<title>PostgreSQL</title>
<para>
There is no transaction identifier support included with PostgreSQL 8.1.
We may include a library in the future that can be added to PostgreSQL server to provide
the transaction identifier.
</para>
<para>
Before database triggers can be created by in PostgreSQL,
the plpgsql language handler must be installed on the database.
The following statements should be run by the administrator on the database:
<programlisting><![CDATA[
CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler AS
'$libdir/plpgsql' LANGUAGE C;
CREATE FUNCTION plpgsql_validator(oid) RETURNS void AS
'$libdir/plpgsql' LANGUAGE C;
CREATE TRUSTED PROCEDURAL LANGUAGE plpgsql
HANDLER plpgsql_call_handler
VALIDATOR plpgsql_validator;]]></programlisting>
</para>
</section>
<section>
<title>MS SQL Server</title>
<para>
</para>
</section>
</appendix>