Migrating databases
This information applies to all operating systems.
Intelligent Miner® works with database objects, for example, user-defined types (UDT), user-defined functions (UDF), user-defined methods (UDM), or stored procedures (SP). Before you can use these objects with Intelligent Miner, you must create them in each Db2 database. This step is called enabling the database.
- Databases that are enabled with Data Warehouse Edition V9.1.x
- Databases that are enabled with InfoSphere® Warehouse Edition V9.5.x
To check whether your database needs to be migrated, you can use
the idmcheckdb command.
To migrate existing database objects, follow these steps:
- List the databases for your database instance by using the following Db2 command:
db2 list db directoryThe command above might produce the following output:System Database Directory Number of entries in the directory=2 Database 1 entry: Database alias = SAMPLE Database name = SAMPLE Database drive = D:\Db2 Database release level = a.00 Comment = Directory entry type = Indirect Catalog database partition number = 0 Database 2 entry: Database alias = IMDEMO Database name = IMDEMO Database drive = D:\Db2 Database release level = a.00 Comment = Directory entry type = Indirect Catalog database partition number = 0 - Check the status of existing databases by using the following
command. For example, you might want to find out whether the existing
database object is in fenced mode or in unfenced mode:
idmcheckdb dbnameFor databases that must be migrated, the command above might produce the following output:E:\>idmcheckdb <dbname> The database <dbname> is enabled for Intelligent Miner Version <version number> in <mode name> mode. To use this database with the current version <version number>, you must migrate the database. To migrate your database, use the command idmenabledb. ... - Enable and migrate all databases that are enabled for previous
versions, by using the following command:
idmenabledb dbnameNote: You must not disable your databases before re-enabling them.The
idmenabledbcommand creates new database objects in the database and changes existing database objects if required. For example, the names of libraries that implement externalC UDF/UDM/SPmight have changed and the DDL must be updated to reflect the new external symbol names.If you enable the database, you must enable it in the same mode that you used when you previously enabled the database. For example, if you originally enabled the database in fenced mode, you must again enable it in fenced mode. If you do not know the mode, you can use the
idmcheckdbcommand. - Verify the successful migration by using the
idmcheckdbcommand. If the migration completed successfully, the output includes the current version of Intelligent Miner. It might look like this:E:\>idmcheckdb sample The database "sample" is enabled for Intelligent Miner Version 9.7.3 in "fenced" mode. ...