Set Up the HCO_Test SQL Server Database

Guides you through the steps required to create the HCO_Test SQL Server database, create a schema in the database where you can place your migrated DB2 tables, and create a connection to the database.

Create the database and schema

  1. Start the Microsoft SQL Server Management Studio.
  2. Connect to the server where you want to create your database.
    Note: The user ID and password you provide must log you on to SQL Server with dbadmin or sysadmin permissions that enable you to create a SQL Server database.
  3. Create a SQL Server database named HCO_Test.
  4. Create a schema named DSN81110 for the new database. To do this:
    1. In Object Explorer, expand HCO_Test.
    2. Right-click the Security folder, and click New > Schema.
    3. In the Schema name field, type DSN81110.
    4. Click OK.
  5. Close SQL Server Management Studio.

Create the HCODemo connection

  1. Start the Windows ODBC Data Source Administrator (32-bit). For instructions see To start the ODBC Data Source Administrator.
  2. On the ODBC Data Source Administrator dialog box, click the System DSN tab.
  3. Click Add button to open the Create New Data Source dialog box.
  4. On the list of drivers, select ODBC Driver 17 for SQL Server.
  5. Click Finish. This opens the Create a New Data Source to SQL Server window.
  6. In the Name field, type HCODemo.
  7. In the Server field, type the name of your SQL Server instance. If you have a default instance, this could be (local), localhost, or . (dot). If you have a named instance, use the combined server name and instance name. For example: mysqlserver\myinstance .
  8. Click Next to go to the authentication step.
  9. Check With SQL Server authentication....
  10. Enter your Login ID and Password into the text fields at the bottom.
  11. Click Next.
  12. Check Change the default database to.
  13. Select HCO_Test from the drop-down list.
  14. Click Next.
  15. Click Finish to open the ODBC Microsoft SQL Server Setup dialog box.
  16. Click Test Data Source.
    Note: If the test fails, review and make corrections as appropriate, and try again.
  17. When you have a successful connection, click OK to save the connection. This takes you back to the System DSN tab where your new SQL Server connection is listed.
  18. Click OK to close the dialog box.