Migrating Data from Enabler to SQL Server
If you are upgrading from a previous version, you can continue working on your existing models in Integrity Modeler 9.2.
This topic covers the process of migrating data from a previous version of Integrity Modeler that uses Enabler to Integrity Modeler 9.2, which uses SQL Server.
Before starting the migration process, you should run a migration test. Follow the instructions below and inspect the SQL Server database to confirm that all tables, data, and relationships have been migrated correctly. If all of your data’s integrity is maintained, you can proceed with the upgrade to Integrity Modeler 9.2.
|
If you are migrating multiple Enabler databases, you can write a batch script to automate the export and import process.
|
|
Make sure the computer you are exporting databases from and the one you are importing databases into have the same locale as the data that you are migrating.
|
Using the Enabler Export Tool
|
Before exporting, you should check your Enabler databases and resolve any issues with your data. For more information, see “Checking a repository" under the Enabler Administration chapter of the Integrity Modeler 8.5 online help.
In addition to model data, the following Enabler database components are also migrated:
• database, package, and model access permissions.
• Active database users and groups.
|
The Enabler Export tool, EnablerExport.exe, is included with the Integrity Modeler 9.2 setup zip file. The tool allows you to export Enabler databases to zip files. To export an Enabler database:
1. Copy the EnablerExport.exe tool to the Exe folder in your Integrity Modeler installation directory.
The default path is as follows: C:\Program Files (x86)\PTC Integrity Modeler\Modeler\Exe
2. Start the Windows Command Prompt window as an administrator.
3. Change the working directory to the Modeler\Exe folder on your system.
4. Run the EnablerExport.exe tool with the following arguments:
◦ The Enabler database reference: "\\Enabler\<ServerName>\<database>"
◦ The full path to the export zip file: "D:\Migration\EnablerExport\databaseExport.zip"
For example:
EnablerExport.exe "\\Enabler\ServerName\database" "D:\Migration\EnablerExport\databaseExport.zip"
Using the SQL Server Import Tool
|
SQL Server logins and database principals are automatically created for users and groups that are on the Enabler database.
|
The SQL Server Import tool allows you to import files you created using the Enabler Export tool into SQL Server. Before you start the import process, copy the Enabler Export files to your Integrity Modeler machine.
To import an Enabler export into SQL Server:
1. Start the Windows Command Prompt window as an administrator.
2. Change the working directory to the Exe folder in the Integrity Modeler installation directory.
3. Run the SQLImport.exe application with the following arguments:
◦ The full path to the Enabler Export zip file: "D:\Migration\EnablerExport\databaseExport.zip"
◦ The name of your machine followed by the SQL Server instance name: "<Machine-Name>\<SQL-Instance>"
◦ A specific name for the SQL Server database: "<Database-Name>".
Use alphanumeric characters. The database name cannot contain spaces or be more than 123 characters long.
◦ If you are importing Japanese or Chinese data, you must use the -R argument.
Optional arguments:
◦ The import batch size parameter: set to 1000 rows by default.
◦ The bcp.exe path.
You can use the following combinations:
◦ SQLImport <mandatory arguments>
◦ SQLImport <mandatory arguments> -R
◦ SQLImport <mandatory arguments> <batch size>
◦ SQLImport <mandatory arguments> <batch size> -R
◦ SQLImport <mandatory arguments> <batch size> <bcp path>
◦ SQLImport <mandatory arguments> <batch size> <bcp path> -R
|
<Mandatory arguments> = <EnablerExport zip file> <machine\instance> <database name>
|
For example (SQL-Instance is by default Modeler):
SQLImport.exe "D:\Migration\EnablerExport\databaseExport.zip" "MYSERVER\MODELER" "oldexamples"
The following example applies to Chinese and Japanese data:
SQLImport.exe "D:\Migration\EnablerExport\databaseExport.zip" "MYSERVER\MODELER" "oldexamples" -R
4. In Model Explorer, right-click on the database that you just imported, and click Show All Database. The imported database now appears.
Confirm that the Import End Successfully message appears in the <DBName_timestamp>.log file.
The SQL Import tool generates log files that are stored in the %temp% directory:
• <DBName_timestamp>.log—Contains logs for the SQL Import tool.
The file shows an "Import End Successfully" message if the import process is successful.
• <SQLAdmin_timestamp>.txt—Contains log data for the database creation.
• The SQL Server bulk copy program utility (bcp) errors are logged to the following files:
◦ BoolErrors.Log
◦ DBPermErrors.Log
◦ ObjectPermErrors.Log
◦ ShortErrors.Log
◦ TimeErrors.Log
◦ LongErrors.Log
◦ SysRelErrors.Log
◦ StringErrors.Log
◦ ConfigErrors.Log
◦ RelationshipErrors.Log
◦ VersionErrors.Log
◦ ObjectErrors.Log