Before you run premigration scripts, ensure that you have
a backup of the development database.
About this task
Before migrating the database, you need to run a database
setup script and a reset stores script. If you are using Cloudscape,
you must migrate the database first, before using the database setup
script.
Note: The SQL files mentioned in the steps
below are part of the Version 7 installation. If your new Version
7 development environment is on a different machine than Version 5.6.1,
copy the two SQL files to your Version 5.6.1 machine before running
the SQL files.
Procedure
- If you are migrating from Version
5.6.1.
- Copy the WebSphere Commerce Version 5.6.1 database to
a different location for example, C:\WCToolkitEE70\db\.
- Start Cloudscape.
- Navigate to the directory WCDE_installdir\bin in
your 5.6.1 environment.
- Type ij.
- Connect to the copy of the WebSphere Commerce 5.6.1
, for example:
connect '../WCToolkitEE70/db/database_name';
where
database_name is
the name of the database.
- To drop your views, enter:
Run 'WCDE_installdir/schema/migration/561/wcs.drop.view.sql';
- Check if all views have been deleted by entering:
- select viewdefinition from SYS.SYSVIEWS;
- To drop the stored procedures, enter:
Run 'WCDE_installdir/schema/migration/561/db2/cloudscape/wcs.drop.stored.procedure.sql';
- Check if all stored procedures have been deleted. Enter:
select alias from SYS.SYSALIASES WHERE ALIASTYPE='M';
- Exit Cloudscape.
- From the WCDE_installdir/bin directory,
enter:
toderby.bat database_name
where:
- database_name
- Location of your current database. For example, WCDE_installdir\db\database_name
The command upgrades the database. If you do not
enter parameters, the toderby command shows the
syntax with examples
.
- Use the setdbtype script to set the database type to the
database type that you are migrating from:
- Navigate to the WCDE_installdir\bin
directory in a command line window.
- Run the setdbtype command by typing the following command:
- To reset the stores, enter:
WCDE_installdir/bin/resetstores.bat
Running
this command ensures that any published stores will run correctly
after migration.