Skip to content

Commit e0b1515

Browse files
DOCSP-41417-add-db2-support-content (#158)
* DOCSP-41417-add-db2-support-content * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Apply suggestions from code review Co-authored-by: Matt Maville <[email protected]> * * * * * * * * * * --------- Co-authored-by: Matt Maville <[email protected]>
1 parent e7b19b9 commit e0b1515

13 files changed

+158
-19
lines changed

snooty.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,14 @@ job = "sync job" #this will be updated to migration job in the near future.
4747
job_plural = "sync jobs" #this will be updated to migration jobs in the near future.
4848
migrator-api = "REST API Documentation"
4949
migrator-api-endpoints = "Endpoints"
50+
51+
[[banners]]
52+
targets = [
53+
"jobs/prerequisites/db2.txt",
54+
"jobs/prerequisites/sybase.txt"
55+
]
56+
variant = "warning"
57+
value = """\
58+
DB2 and Sybase database support is currently in public preview. Users looking for production-grade migration assistance, please contact your account representative to engage in a guided evaluation.
59+
"""
60+

source/connection-strings/relational-database-connection-strings.txt

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Relational Migrator can connect to the following relational database systems:
2525
- `PostgreSQL <#postgresql>`__
2626
- `SQL Server <#sql-server>`__
2727
- `Sybase ASE <#sybase-ase>`__
28+
- `DB2 <#db2>`__
2829

2930
Relational Migrator's connection form contains fields where you can specify a
3031
username and password for the connection. The form obscures passwords
@@ -214,4 +215,41 @@ The general form for a Sybase ASE connection string is:
214215
To learn more about Sybase ASE connection strings, see:
215216

216217
- `Sybase ASE Connection String Docs <https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01776.1601/doc/html/san1357754914053.html>`__
217-
- `Connectingstrings.com <https://www.connectionstrings.com/sybase-adaptive/>`__
218+
- `Connectingstrings.com <https://www.connectionstrings.com/sybase-adaptive/>`__
219+
220+
DB2
221+
---
222+
223+
The general form for a DB2 connection string is:
224+
225+
.. code-block::
226+
227+
jdbc:db2://<hostname>:<port>/<database>;
228+
229+
For example, consider the following connection string:
230+
231+
.. code-block::
232+
233+
jdbc:db2://localhost:50000/mydb2database;
234+
235+
The preceding connection string specifies these connection
236+
details:
237+
238+
.. list-table::
239+
:header-rows: 1
240+
241+
* - Property
242+
- Value
243+
* - Host
244+
- ``localhost``
245+
* - Port
246+
- ``50000``
247+
* - Database
248+
- ``mydb2database``
249+
250+
.. note::
251+
252+
To learn more about DB2 connection strings, see:
253+
254+
- `DB2 Connection URL Syntax <https://www.ibm.com/docs/en/db2woc?topic=programmatically-jdbc>`__
255+
- `Connection Configuration Properties <https://www.ibm.com/docs/en/db2/11.5?topic=SSEPGG_11.5.0/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_r0052342.htm>`__
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- `MySQL: latest 8.3.x version, Platform Independent Version <https://dev.mysql.com/downloads/connector/j/>`_
2+
3+
- `Oracle: 21.6.0.0 of ojdbc11.jar from the Oracle 21c <https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html>`_
4+
5+
- `DB2: latest 3.x or 4.x db2jcc.jar <https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads>`_

source/installation/install-on-a-local-machine/install-mac.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ Steps
2626

2727
#. (Optional) To connect to Oracle or MySQL drivers, download and place the drivers into your Relational Migrator directory.
2828

29-
a. To download and install MySQL or Oracle drivers, see the following:
30-
31-
- `MySQL: latest 8.3.x version, Platform Independent Version <https://dev.mysql.com/downloads/connector/j/>`_
32-
33-
- `Oracle: 21.6.0.0 of ojdbc11.jar from the Oracle 21c <https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html>`_
29+
a. To download and install MySQL, Oracle or DB2 drivers, see the following:
30+
31+
.. include:: /includes/fact-driver-download-locations.rst
3432

3533
b. Copy the driver files to ``/Library/Application Support/MongoDB/Relational Migrator/Drivers``.
3634

source/installation/install-on-a-local-machine/install-on-a-local-machine.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ If you are migrating from an Oracle database:
4444
- (Optional) To migrate tables that contain the ``XMLType`` type, you must also download the
4545
`xdb.jar <https://www.oracle.com/database/technologies/appdev/jdbc-drivers-archive.html>`__ driver.
4646

47+
If you are migrating from a DB2 database:
48+
49+
- Download `db2jcc.jar for DB2 <https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads>`_.
50+
4751
Get Started
4852
-----------
4953

source/installation/install-on-a-local-machine/install-rhel.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ Steps
3535
#. (Optional) To connect to Oracle or MySQL drivers, download and place the drivers
3636
into your Relational Migrator directory.
3737

38-
a. To download and install MySQL or Oracle drivers, see the following:
38+
a. To download and install MySQL, Oracle or DB2 drivers, see the following:
3939

40-
- `MySQL: latest 8.3.x version, Platform Independent Version <https://dev.mysql.com/downloads/connector/j/>`_
41-
42-
- `Oracle: 21.6.0.0 of ojdbc11.jar from the Oracle 21c <https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html>`_
40+
.. include:: /includes/fact-driver-download-locations.rst
4341

4442
b. Copy the driver files to ``/opt/mongodb-relational-migrator/lib/app/lib``.
4543

source/installation/install-on-a-local-machine/install-ubuntu.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ Steps
3535
#. (Optional) To connect to Oracle or MySQL drivers, download and place the drivers
3636
into your Relational Migrator directory.
3737

38-
a. To download and install MySQL or Oracle drivers, see the following:
38+
a. To download and install MySQL, Oracle or DB2 drivers, see the following:
3939

40-
- `MySQL: latest 8.3.x version, Platform Independent Version <https://dev.mysql.com/downloads/connector/j/>`_
41-
42-
- `Oracle: 21.6.0.0 of ojdbc11.jar from the Oracle 21c <https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html>`_
40+
.. include:: /includes/fact-driver-download-locations.rst
4341

4442
b. Copy the driver files to ``/opt/mongodb-relational-migrator/lib/app/lib``.
4543

source/installation/install-on-a-local-machine/install-windows.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ Steps
3434
#. (Optional) To connect to Oracle or MySQL drivers, download and place the drivers
3535
into your Relational Migrator directory.
3636

37-
a. To download and install MySQL or Oracle drivers, see the following:
37+
a. To download and install MySQL, Oracle or DB2 drivers, see the following:
3838

39-
- `MySQL: latest 8.3.x version, Platform Independent Version <https://dev.mysql.com/downloads/connector/j/>`_
40-
41-
- `Oracle: 21.6.0.0 of ojdbc11.jar from the Oracle 21c <https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html>`_
39+
.. include:: /includes/fact-driver-download-locations.rst
4240

4341
b. Copy the driver files to ``c:\Users\<username>\AppData\Local\MongoDB\Relational Migrator\Data\Drivers``.
4442

source/jobs/creating-jobs.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ Steps
7575
- Leaving database name blank loads schemas from the default database.
7676
* - Sybase ASE
7777
- Leaving database name blank loads schemas from the default database.
78-
78+
* - DB2
79+
- You must enter a database name.
80+
7981
2e. Enter a username in the :guilabel:`Username` text box.
8082

8183
2f. Enter a password in the :guilabel:`Password` text box.

source/jobs/prerequisites.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ first sync job:
4545
- :icon-lg:`Checkmark`
4646
-
4747

48+
* - :ref:`DB2 <rm-prereq-db2>`
49+
- :icon-lg:`Checkmark`
50+
-
51+
4852
.. toctree::
4953
:titlesonly:
5054
:hidden:
@@ -54,3 +58,4 @@ first sync job:
5458
/jobs/prerequisites/postgres
5559
/jobs/prerequisites/sql-server
5660
/jobs/prerequisites/sybase
61+
/jobs/prerequisites/db2

source/jobs/prerequisites/db2.txt

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.. _rm-prereq-db2:
2+
3+
=========================================
4+
Configure Migration Prerequisites for DB2
5+
=========================================
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
To run sync jobs from a DB2 source database, the target database requires
14+
creating a specific schema and a specific table within the schema in the
15+
database you are migrating. If Relational Migrator determines the database
16+
needs configuration changes, it automatically generates a SQL script with
17+
the required changes. It is recommended to have a Database Administrator (DBA)
18+
review the commands in this script and perform their execution on the database server.
19+
20+
Before you Begin
21+
----------------
22+
23+
Download and install the DB2 jdbc driver to the correct Relational Migrator
24+
directory. For details, see the :ref:`local-machine-install` for
25+
your operating system.
26+
27+
About this Task
28+
---------------
29+
30+
- This page covers the details of the SQL scripts automatically
31+
generated by Relational Migrator.
32+
33+
- Relational Migrator automatically detects configuration settings when
34+
connecting to your database and generates the appropriate SQL
35+
statements.
36+
37+
- Relational Migrator does not create any indexes on your DB2 instance to
38+
facilitate sync jobs. The create index creation permission is not
39+
required.
40+
41+
- Creating the required schema and table have no impact on database performance.
42+
43+
- Relational Migrator does not support ``BLOB``, ``CBLOB`` or ``DBCLOB`` columns
44+
of DB2 tables. If this feature is important to you, create or upvote the
45+
feature request on `feedback.mongodb.com <https://feedback.mongodb.com/forums/952450-relational-migrator>`__.
46+
47+
- Relation Migrator only supports snapshot sync jobs for DB2 connections.
48+
49+
Steps
50+
-----
51+
52+
.. procedure::
53+
:style: normal
54+
55+
.. step:: Create the ``ASNCDC`` schema
56+
57+
Use the following statements to create the schema:
58+
59+
.. code-block:: sql
60+
:copyable: true
61+
62+
CREATE SCHEMA "ASNCDC";
63+
64+
.. step:: Create the ``IBMSNAP_REGISTER`` table in the ``ASNCDC`` schema
65+
66+
Use the following statements to create the table:
67+
68+
.. code-block:: sql
69+
:copyable: true
70+
71+
CREATE TABLE "ASNCDC"."IBMSNAP_REGISTER"
72+
(SYNCHPOINT INTEGER, CD_NEW_SYNCHPOINT INTEGER);
73+

source/projects/create-project-live-connection.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Steps
4444
- PostgreSQL
4545
- SQL Server
4646
- Sybase ASE
47+
- DB2
4748

4849
#. Enter the connection details to create the JDBC URI for your relational database.
4950

@@ -77,6 +78,9 @@ Steps
7778
* - Sybase ASE
7879
- The database name is required.
7980

81+
* - DB2
82+
- The database name is required.
83+
8084
d. Enter a user name in the :guilabel:`Username` text box.
8185

8286
e. Enter a password in the :guilabel:`Password` text box.

source/projects/create-project-loading-schema-files.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ to generate DDL files from your relational system.
108108

109109
Importing DDL files with Sybase ASE is not supported.
110110

111+
.. tab:: DB2
112+
:tabid: db2-ddl
113+
114+
Importing DDL files with DB2 is not supported.
115+
111116
Steps
112117
-----
113118

0 commit comments

Comments
 (0)