Skip to content

Commit 3ec9163

Browse files
committed
Mention DB2 for i in SSMA documentation
1 parent 4586dbb commit 3ec9163

3 files changed

Lines changed: 197 additions & 218 deletions

File tree

docs/ssma/db2/connecting-to-db2-database-db2tosql.md

Lines changed: 91 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -3,106 +3,101 @@ title: "Connecting to DB2 Database (DB2ToSQL) | Microsoft Docs"
33
description: Learn how to connect to a target instance of DB2 database to migrate DB2 databases. SSMA obtains metadata about all DB2 schemas.
44
ms.prod: sql
55
ms.custom: ""
6-
ms.date: "01/19/2017"
6+
ms.date: "07/14/2020"
77
ms.reviewer: ""
88
ms.technology: ssma
99
ms.topic: conceptual
1010
ms.assetid: 5eb5801d-f0c3-4127-97c0-0b1ef49f4844
11-
author: "Shamikg"
12-
ms.author: "Shamikg"
11+
author: "nahk-ivanov"
12+
ms.author: "alexiva"
1313
---
14+
1415
# Connecting to DB2 Database (DB2ToSQL)
15-
To migrate DB2 databases to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you must connect to the DB2 database that you want to migrate. When you connect, SSMA obtains metadata about all DB2 schemas, and then displays it in the DB2 Metadata Explorer pane. SSMA stores information about the database server, but does not store passwords.
16-
17-
Your connection to the database stays active until you close the project. When you reopen the project, you must reconnect if you want an active connection to the database.
18-
19-
Metadata about the DB2 database is not automatically updated. Instead, if you want to update the metadata in DB2 Metadata Explorer, you must manually update it. For more information, see the "Refreshing DB2 Metadata" section later in this topic.
20-
21-
## Required DB2 Permissions
22-
User authorization defines the list of the commands and objects that are available for a user. This list thereby controls user actions. In DB2, there are predetermined groups of privileges for authorization, both at the instance level and at the level of a DB2 database. This enables SSMA to obtain metadata from schemas owned by the connecting user. To obtain metadata for objects in other schemas and then convert objects in those schemas, the account must have the following permissions:
23-
24-
- Schema Access for schema migration is normally granted to PUBLIC unless the RESTRICT keyword was used in CREATE
25-
26-
- Data access for data migration requires DATAACCESS
27-
28-
## Establishing a Connection to DB2
16+
17+
To migrate DB2 databases to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you must connect to the DB2 database that you want to migrate. When you connect, SSMA obtains metadata about all DB2 schemas, and then displays it in the DB2 Metadata Explorer pane. SSMA stores information about the database server, but does not store passwords.
18+
19+
Your connection to the database stays active until you close the project. When you reopen the project, you must reconnect if you want an active connection to the database.
20+
21+
Metadata about the DB2 database is not automatically updated. Instead, if you want to update the metadata in DB2 Metadata Explorer, you must manually update it. For more information, see the "Refreshing DB2 Metadata" section later in this topic.
22+
23+
## Required DB2 Permissions
24+
25+
User authorization defines the list of the commands and objects that are available for a user. This list thereby controls user actions. In DB2, there are predetermined groups of privileges for authorization, both at the instance level and at the level of a DB2 database. This enables SSMA to obtain metadata from schemas owned by the connecting user. To obtain metadata for objects in other schemas and then convert objects in those schemas, the account must have the following permissions:
26+
27+
- Schema Access for schema migration is normally granted to PUBLIC unless the RESTRICT keyword was used in CREATE
28+
- Data access for data migration requires DATAACCESS
29+
30+
## Establishing a Connection to DB2
31+
2932
When you connect to a database, SSMA reads the database metadata, and then adds this metadata to the project file. This metadata is used by SSMA when it converts objects to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] syntax, and when it migrates data to [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. You can browse this metadata in the DB2 Metadata Explorer pane and review properties of individual database objects.
30-
31-
> [!IMPORTANT]
32-
> Before you try to connect, make sure that the database server is running and can accept connections.
33-
34-
**To connect to DB2**
35-
36-
1. On the **File** menu, select **Connect to DB2**.
37-
38-
If you previously connected to DB2, the command name will be **Reconnect to DB2**.
39-
40-
2. In the **Provider** box you will see the **OLE DB Provider** which is currently the only DB2 client access provider.
41-
42-
3. In the **Manager** box you can select either **Db2 for zOs**, or **DB2 for LUW**
43-
44-
4. In the **Mode** box, select either **Standard mode**, or **Connection string mode**.
45-
46-
Use standard mode to specify the server name and port. Use service name mode to specify the DB2 service name manually. Use connection string mode to provide a full connection string.
47-
48-
5. If you select **Standard mode**, provide the following values:
49-
50-
- In the **Server name** box, enter or select the name or IP address of the database server.
51-
52-
- If the database server is not configured to accept connections on the default port (1521), enter the port number that is used for DB2 connections in the **Server port** box.
53-
54-
- In the **Server Port** box, enter the TCP/IP Port number.
55-
56-
- In the **Initial Catalog** box, enter the database name
57-
58-
- In the **User name** box, enter an DB2 account that has the necessary permissions.
59-
60-
- In the **Password** box, enter the password for the specified user name.
61-
62-
6. If you select **Connection string mode**, provide a connection string in the **Connection string** box.
63-
64-
The following example shows an OLE DB connection string:
65-
66-
`Provider=OraOLEDB.DB2;Data Source=MyDB2DB;User Id=myUsername;Password=myPassword;`
67-
68-
The following example shows an DB2 Client connection string that uses integrated security:
69-
70-
`Data Source=MyDB2DB;Integrated Security=yes;`
71-
72-
For more information, see [Connect To Oracle (OracleToSQL)](../../ssma/oracle/connect-to-oracle-oracletosql.md).
73-
74-
## Reconnecting to DB2
75-
Your connection to the database server stays active until you close the project. When you reopen the project, you must reconnect if you want an active connection to the database. You can work offline until you want to update metadata, load database objects into [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], and migrate data.
76-
77-
## Refreshing DB2 Metadata
78-
Metadata about the DB2 database is not automatically refreshed. The metadata in DB2 Metadata Explorer is a snapshot of the metadata when you first connected, or the last time that you manually refreshed metadata. You can manually update metadata for all schemas, a single schema, or individual database objects.
79-
80-
**To refresh metadata**
81-
82-
1. Make sure that you are connected to the database.
83-
84-
2. In DB2 Metadata Explorer, select the check box next to each schema or database object that you want to update.
85-
86-
3. Right-click **Schemas**, or the individual schema or database object, and then select **Refresh from Database**.
87-
88-
If you do not have an active connection, SSMA will display the **Connect to DB2** dialog box so that you can connect.
89-
90-
4. In the Refresh from Database dialog box, specify which objects to refresh.
91-
92-
- To refresh an object, click the **Active** field adjacent to the object until an arrow appears.
93-
94-
- To prevent an object from being refreshed, click the **Active** field adjacent to the object until an **X** appears.
95-
96-
- To refresh or decline a category of objects, click the **Active** field adjacent to the category folder.
97-
98-
To view the definitions of the color coding, click the **Legend** button.
99-
100-
5. [!INCLUDE[clickOK](../../includes/clickok-md.md)]
101-
102-
## Next Step
103-
104-
- The next step in the migration process is to [Connecting to SQL Server](https://msdn.microsoft.com/b59803cb-3cc6-41cc-8553-faf90851410e).
105-
106-
## See Also
107-
[Migrating DB2 Databases to SQL Server (DB2ToSQL)](../../ssma/db2/migrating-db2-databases-to-sql-server-db2tosql.md)
108-
33+
34+
> [!IMPORTANT]
35+
> Before you try to connect, make sure that the database server is running and can accept connections.
36+
37+
**To connect to DB2**
38+
39+
1. On the **File** menu, select **Connect to DB2**.
40+
41+
If you previously connected to DB2, the command name will be **Reconnect to DB2**.
42+
43+
2. In the **Provider** box you will see the **OLE DB Provider** which is currently the only DB2 client access provider.
44+
45+
3. In the **Manager** box you can select either **Db2 for zOs**, **DB2 for LUW** or **DB2 for i**
46+
47+
4. In the **Mode** box, select either **Standard mode**, or **Connection string mode**.
48+
49+
Use standard mode to specify the server name and port. Use service name mode to specify the DB2 service name manually. Use connection string mode to provide a full connection string.
50+
51+
5. If you select **Standard mode**, provide the following values:
52+
53+
- In the **Server name** box, enter or select the name or IP address of the database server.
54+
- If the database server is not configured to accept connections on the default port (1521), enter the port number that is used for DB2 connections in the **Server port** box.
55+
- In the **Server Port** box, enter the TCP/IP Port number.
56+
- In the **Initial Catalog** box, enter the database name.
57+
- In the **User name** box, enter an DB2 account that has the necessary permissions.
58+
- In the **Password** box, enter the password for the specified user name.
59+
60+
6. If you select **Connection string mode**, provide a connection string in the **Connection string** box.
61+
62+
The following example shows an OLE DB connection string:
63+
64+
`Provider=OraOLEDB.DB2;Data Source=MyDB2DB;User Id=myUsername;Password=myPassword;`
65+
66+
The following example shows an DB2 Client connection string that uses integrated security:
67+
68+
`Data Source=MyDB2DB;Integrated Security=yes;`
69+
70+
For more information, see [Connect To Oracle (OracleToSQL)](../../ssma/oracle/connect-to-oracle-oracletosql.md).
71+
72+
## Reconnecting to DB2
73+
74+
Your connection to the database server stays active until you close the project. When you reopen the project, you must reconnect if you want an active connection to the database. You can work offline until you want to update metadata, load database objects into [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], and migrate data.
75+
76+
## Refreshing DB2 Metadata
77+
78+
Metadata about the DB2 database is not automatically refreshed. The metadata in DB2 Metadata Explorer is a snapshot of the metadata when you first connected, or the last time that you manually refreshed metadata. You can manually update metadata for all schemas, a single schema, or individual database objects.
79+
80+
**To refresh metadata**
81+
82+
1. Make sure that you are connected to the database.
83+
2. In DB2 Metadata Explorer, select the check box next to each schema or database object that you want to update.
84+
3. Right-click **Schemas**, or the individual schema or database object, and then select **Refresh from Database**.
85+
86+
If you do not have an active connection, SSMA will display the **Connect to DB2** dialog box so that you can connect.
87+
88+
4. In the Refresh from Database dialog box, specify which objects to refresh.
89+
- To refresh an object, click the **Active** field adjacent to the object until an arrow appears.
90+
- To prevent an object from being refreshed, click the **Active** field adjacent to the object until an **X** appears.
91+
- To refresh or decline a category of objects, click the **Active** field adjacent to the category folder.
92+
93+
To view the definitions of the color coding, click the **Legend** button.
94+
95+
5. [!INCLUDE[clickOK](../../includes/clickok-md.md)]
96+
97+
## Next Step
98+
99+
- The next step in the migration process is to [Connecting to SQL Server](https://msdn.microsoft.com/b59803cb-3cc6-41cc-8553-faf90851410e).
100+
101+
## See Also
102+
103+
- [Migrating DB2 Databases to SQL Server (DB2ToSQL)](../../ssma/db2/migrating-db2-databases-to-sql-server-db2tosql.md)

docs/ssma/db2/creating-the-server-connection-files-db2tosql.md

Lines changed: 60 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,69 @@
22
title: "Creating the Server Connection Files (DB2ToSQL) | Microsoft Docs"
33
ms.prod: sql
44
ms.custom: ""
5-
ms.date: "01/19/2017"
5+
ms.date: "07/14/2020"
66
ms.reviewer: ""
77
ms.technology: ssma
88
ms.topic: conceptual
99
ms.assetid: 685419f6-8606-462c-be12-8bace45bede6
10-
author: "Shamikg"
11-
ms.author: "Shamikg"
10+
author: "nahk-ivanov"
11+
ms.author: "alexiva"
1212
---
13+
1314
# Creating the Server Connection Files (DB2ToSQL)
14-
Server information can be specified either in the servers section of the script file or in a separate server connection file. The command line parameter for the server connection file is, `-c <serverconnectionfile>`. If the same server id is present in both the script file and server connection file, then the server definition in the script file is considered.
15-
16-
**Example: 1**
17-
18-
```
19-
<!--Sample of server connection file commands -->
20-
21-
<db2 name="<source-server-unique-name>">
22-
23-
<standard-mode>
24-
25-
<connection-provider value ="OleDB Provider"/>
26-
27-
<!-- Defines server manager to connect.
28-
29-
Available manager attribute values
30-
31-
• zOs - upgrades the project (default)
32-
33-
• LUW - displays an error and halts the execution-->
34-
35-
<database-manager value="$Db2Manager$"/>
36-
37-
<server-name value="$Db2HostName$" />
38-
39-
<port value="$Db2Port$" />
40-
41-
<initial-catalog value="$Db2Instance$" />
42-
43-
<user-id value="$Db2UserName$" />
44-
45-
<password value="$Db2Password$"/>
46-
47-
</standard-mode>
48-
49-
</db2>
50-
```
51-
52-
```
53-
<sql-server name="<target-server-unique-name>">
54-
55-
<sql-server-authentication>
56-
57-
<server value="<server-name>"/>
58-
59-
<database value="<database-name>"/>
60-
61-
<user-id value="<user-name>"/>
62-
63-
<password value="<password>"/>
64-
65-
</sql-server-authentication>
66-
67-
</sql-server>
68-
```
69-
70-
## Next Step
71-
The next step in operating the console is [Executing the SSMA Console &#40;DB2ToSQL&#41;](../../ssma/db2/executing-the-ssma-console-db2tosql.md)
72-
73-
## See Also
74-
[Executing the SSMA Console](https://msdn.microsoft.com/ce63f633-067d-4f04-b8e9-e1abd7ec740b)
75-
15+
16+
Server information can be specified either in the servers section of the script file or in a separate server connection file. The command line parameter for the server connection file is, `-c <serverconnectionfile>`. If the same server id is present in both the script file and server connection file, then the server definition in the script file is considered.
17+
18+
**Example: 1**
19+
20+
```xml
21+
<!-- Sample of server connection file commands -->
22+
<db2 name="<source-server-unique-name>">
23+
<standard-mode>
24+
25+
<connection-provider value="OleDB Provider" />
26+
27+
<!-- Defines server manager to connect.
28+
Available manager attribute values
29+
• zOs - DB2 for z/OS
30+
• LUW - DB2 for Linux, Unix and Windows
31+
• DBi - DB2 for i -->
32+
<database-manager value="$Db2Manager$" />
33+
34+
<server-name value="$Db2HostName$" />
35+
36+
<port value="$Db2Port$" />
37+
38+
<initial-catalog value="$Db2Instance$" />
39+
40+
<user-id value="$Db2UserName$" />
41+
42+
<password value="$Db2Password$"/>
43+
44+
</standard-mode>
45+
</db2>
46+
```
47+
48+
```xml
49+
<sql-server name="<target-server-unique-name>">
50+
<sql-server-authentication>
51+
52+
<server value="<server-name>" />
53+
54+
<database value="<database-name>" />
55+
56+
<user-id value="<user-name>"/>
57+
58+
<password value="<password>"/>
59+
60+
</sql-server-authentication>
61+
</sql-server>
62+
```
63+
64+
## Next Step
65+
66+
The next step in operating the console is [Executing the SSMA Console &#40;DB2ToSQL&#41;](../../ssma/db2/executing-the-ssma-console-db2tosql.md)
67+
68+
## See Also
69+
70+
- [Executing the SSMA Console](https://msdn.microsoft.com/ce63f633-067d-4f04-b8e9-e1abd7ec740b)

0 commit comments

Comments
 (0)