Progress
DataServer
for ODBC Guide


Running the Progress-to-ODBC Utility

The Progress-to-ODBC utility runs on Windows with a local DataServer accessing an ODBC target data source through an ODBC driver

You can run the utility interactively from Unix with a remote DataServer configuration, on Windows or NT, or in batch mode.

Running the Utility Interactively

To run the Progress-to-ODBC utility interactively, follow these steps:

  1. Create a target data source. You must use an empty target data source when you run the Progress-to-ODBC utility.
  2. Configure your ODBC driver to connect to your new target data source.
  3. Start the Progress client and connect to the Progress database that you want to migrate to the target data source.
  4. NOTE: For a DBE (double-byte enabled) DataServer application, you must specify the Internal Code Page (-cpinternal) and Stream Code Page (-cpstream) parameters when you start the Progress client. The values that you specify for these parameters must match the code page that the target data source uses.

  5. From the Data Administration tool, choose DataServer ODBC Utilities Schema Migration Tools PROGRESS DB to ODBC.
  6. The following screen appears:
  7. It prompts you for the information described in Table 5–5.

    Table 5–5: Progress-to-ODBC Utility
    Interface Elements
    Description
    Original Progress Database
    Accept the name of the connected source database or type the name of a database to which to connect.
    Connect parameters for PROGRESS
    If you did not specify a new value for the Name of the Original PROGRESS Database parameter, do not modify the Connect parameters for PROGRESS Database parameter.
    If you did specify a new value, type any additional connect parameters that are necessary.
    Name of Schema holder Database
    Type the name of the schema holder. The utility creates the schema holder if it does not exist.
    ODBC Data Source Name
    Type the data-source name (This is the name you specified when registering the data source in step 2 of the above section "Running the Progress-to-ODBC Utility."). This is the name of the schema image and the name that you will use to refer to the target database in applications. The data-source name must be different from the name that you typed for the schema holder and different from the name of any other schema image existing in that schema holder.
    Foreign DBMS type
    Select the foreign data-source type to which the ODBC driver is connecting. Progress provides the following choices: SQL Server 6, Sybase, DB2/MVS, DB2/6000, DB2/NT, Informix, MS Access, and OTHER. Select OTHER if you are accessing a target data source other than the ones listed here. Note that you will get only the generic ODBC SQL-92 functionality if you access databases other than the ones listed here.
    ODBC Owner’s Username
    Type the user ID.
    ODBC User’s Password
    Type the password.
    ODBC connect parameters
    Type additional connection parameters for the schema holder. The utility provides the required -U and -P parameters, but you might want to specify others.
    Codepage for Schema Image
    Type the Progress name for the code page that the ODBC data source uses. By default, the code page for a schema holder is ibm850. You can leave this field blank and use the Change Code Page utility to add the code page information for the schema holder later.
    Progress 4GL Compatible Objects
    Check this toggle box to create an ODBC data source that supports arrays, case-insensitive indexes, backward and forward scrolling, and the Progress record identifier. These objects result in the addition of columns to your foreign data-source tables.
    Uncheck this toggle box if you do not want the Extended 4GL capability.
    Load SQL
    If enabled, check this toggle box to execute the .sql file that contains the data definition for your Progress database and load these definitions into the target data source.
    Uncheck this toggle box to generate only the SQL script.
    Move data
    Check this toggle box to dump and load data from the Progress database to the target database. Copying data from a large database can take a long time. You can uncheck this toggle box if you want to dump and load data at a more convenient time.
    This toggle box is available only if the Load SQL toggle box is checked.

If you want a complete migration of your Progress database to a target data source, you must enter information in all fields and check all toggle boxes.

The utility creates a schema holder, updates the empty target data source that you created to contain the objects stored in your Progress database, and creates a startup procedure that you can use to connect your schema holder. The startup procedure derives its name from the ODBC name for your target database. For example, if you specified “sports” as the ODBC data-source name, the utility creates the csports.p startup procedure.

Running the Utility in Batch Mode

To run the Progress-to-ODBC utility in batch mode, follow these steps:

  1. Create a target ODBC data source. You must use an empty target data source when you run the Progress-to-ODBC utility.
  2. Configure your ODBC driver to connect to your new target data source.
  3. On your client machine, pass parameters to the utility by setting the environment variables listed in Table 5–6.
  4. Table 5–6: Progress-to-ODBC Utility Batch Parameters
    Environment Variable

    Description
    PRODBNAME
    Specifies the source Progress database name.
    PROCONPARMS
    Specifies parameters for the connection to the source Progress database.
    SHDBNAME
    Specifies the new schema-holder name.
    ODBCDBNAME
    Specifies the logical name of the target data source. The logical name of the data source can be the same as its physical name, but it must be different from the name that you enter for the schema holder.
    ODBCUSERNAME
    Specifies the user name for the target data source.
    ODBCPASSWORD
    Specifies the password of the user for the target data source.
    ODBCCONPARMS
    Specifies additional connection parameters for the schema holder.
    ODCBCODEPAGE
    Specifies the Progress name for the code page that the ODBC data source uses. By default, the code page for a schema holder is ibm850. You can leave this field blank and use the Change Code page utility to add the code page information for the schema holder later.
    ODBCTYPE
    Selects the foreign data-source type to which the ODBC driver is connecting. Progress provides the following choices: SQL Server 6, Sybase, DB2/MVS, DB2/6000, DB2/NT, Informix, MS Access, and OTHER. Select OTHER if you are accessing a target data source other than those listed here. Note that you will get only the generic ODBC SQL-92 functionality if you access databases other than those listed here.
    LOADSQL
    Allows you to specify whether you want the utility to create the schema in your empty ODBC data source. Specify YES to enable this behavior.
    MOVEDATA
    Allows you to specify whether to populate the database. Specify YES to dump and load data or NO to not populate the database. For example, you might specify NO if your database is large, and you want to dump and load data at a more convenient time. The default is NO.
    COMPATIBLE
    Allows you to specify whether to enable the Progress 4GL capability. Specify YES to enable this capability or NO if you do not want this capability. In most cases, the default is NO; however, for SQL Server 6 and Sybase data sources, the default is YES.

  5. Enter the following commands to set and export environment variables at the system prompt, then run protoodb.p:
  6. NOTE: You might need to append the Progress libraries to your PROPATH environment variable in order for the executable to find .p or .r files.

    PRODBNAME=db-name; export PRODBNAME
    PROCONPARMS="-1 -i"
    SHDBNAME=schema-holder-name; export SHDBNAME
    .
    .
    .
    pro -b -p prodict/odb/protoodb.p 
    


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095