In certain circumstances, you may need to migrate your 3DPassport users to a different database, in which case you need to export the users, import them into the new database, then update the JDBC URL.
- Export the users from database 1 and import them into database 2.
Note:
If the 3DPassport installation was performed using tnsnames.ora path, ensure that the details of the new databases have been correctly specified in the tnsnames.ora file, otherwise the connection will fail.
On Oracle:
- To export users from
a database named
AAD5PASS7
:expdp sys/sys@AAD5PASS7 schemas=aad5_pass17 directory=DATA_PUMP_DIR
dumpfile=aad5_pass17.dmp logfile=aad5_pass17.log
- To import the exported users into
a database named
AAD5PASS5
:impdp system/system@AAD5PASS5 directory=DATA_PUMP_DIR DUMPFILE=aad5_pass17.dmp
REMAP_SCHEMA=aad5_pass17:aad5_pass17 logfile=aad5_pass17.log full=y
On SQL Server:
- In SQL Server Management Studio, right-click on the database and select
- Specify the data sources from which to copy the data, then click Next.
- Specify the details of the databases into which you want to import the data, then click Next.
Make sure the databases have already been created. They should have the same schema names as used in the database from which the data has been exported.
- In the next dialog box, select the option
Copy data from one or more tables or views
, then click Next. - In the next dialog box, select the tables to be exported.
- Click Next then Finish to start the export/import procedure.
-
Stop TomEE.
-
Run the following command.
On Windows:
%passport_install_path%\win_b64\code\command\updateDatabaseProperties_3dpassport.bat
--installation-path %passport_install_path% --database-properties-file %passport_database_props_input%
On Linux:
${passport_install_path}/linux_a64/code/command/updateDatabaseProperties_3dpassport.sh
--installation-path ${passport_install_path} --database-properties-file ${passport_database_properties_file}
where:
JDBC URL syntax for Oracle:
jdbc:oracle:thin:@//<host>[:port]/<service>
Example:
database.url=jdbc:oracle:thin:@//localhost:1521/iam
database.cas.url=jdbc:oracle:thin:@//localhost:1521/cas
JDBC URL syntax for SQL Server:
jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]
Example:
database.url=jdbc:sqlserver://localhost;databaseName=iam
database.cas.url=jdbc:sqlserver://localhost;databaseName=cas
-
Restart TomEE.
- Check the database.properties file for the
updated URL, and access the admin tools and check the repository
properties.