ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How to change the string connection for Identity Manager to the Database for Recovery Plan Test?

book

Article ID: 227015

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Suite

Issue/Introduction

The current string configured in the standalone XML file is for Oracle dedicated server, below are the steps to change it to point to a Load Balance.

You can use this article to change the JDBC URL to another database (Oracle or SQL Server).

Environment

Virtual Appliance 14.x

Resolution

Below the steps to change the connection url for all datasources:

If you do not have the user configured to connect to JBoss CLI, please see the steps in the "How to add user to JBoss-cli" section, if you already have the user, proceed with the steps below:


- From vApp, go to the "/opt/CA/wildfly-idm/bin" folder and run the "./jboss-cli.sh" command to open jboss CLI

- Type connect and enter the user and password you set in the "Prerequisites" section

- After that, enter the three lines above, one by one.

/subsystem=datasources/data-source=iam_im-imobjectstoredb-ds/:write-attribute(name=connection-url,value=<The-New-Value>)
/subsystem=datasources/data-source=iam_im-imtaskpersistencedb-ds/:write-attribute(name=connection-url,value=<The-New-Value>)
/subsystem=datasources/data-source=iam_im-imworkflowdb-ds/:write-attribute(name=connection-url,value=<The-New-Value>)

In case you have Archive, Audit and Report Snapshot database set and need to change them, below the command to run to update them:
/subsystem=datasources/data-source=iam_im-imarchivedb-ds/:write-attribute(name=connection-url,value=<The-New-Value>)
/subsystem=datasources/data-source=iam_im-imauditdb-ds/:write-attribute(name=connection-url,value=<The-New-Value>)
/subsystem=datasources/data-source=iam_im-imreportsnapshotdb-ds/:write-attribute(name=connection-url,value=<The-New-Value>)

Where:
<The-New-Value> = the new jdbc url


You will receive a message like that after each command.
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}

- To disconnect, run the "exit" command

- To confirm you can check the /opt/CA/wildfly-idm/standalone/configuration/ca-standalone-full-ha.xml

- Restart the Identity Manager service


Note:
Depending on the string you are trying to add, the string can not be inserted totally, only a part of it, in this case, put the string between double-quotes, for example:


"jdbc:oracle:thin:@(description=(address_list=(address=(protocol=tcp)(host=ora01-scan)(port=1521))(address=(protocol=tcp)(host=ora02-scan)(port=1521)))(failover=on)(load_balance=off)(connect_data=(server=dedicated)(service_name=oraservice_scan)))"

 


How to add user to JBoss-CLI

Note: the user "mark" below is just an example, you can use any name for the user

[email protected] VAPP-14.3.0 (10.10.10.1):/opt/CA/wildfly-idm/bin > sudo /opt/CA/wildfly-idm/bin/add-user.sh

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): a

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username: mark
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
 - The password should be different from the username
Password :
JBAS015266: Password must have at least 1 digit.
Are you sure you want to use the password entered yes/no? yes
Re-enter Password :
What groups do you want this user to belong to? (Please enter a comma-separated list, or leave blank for none)[  ]:
About to add user 'mark' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'mark' to file '/opt/CA/wildfly-idm/standalone/configuration/mgmt-users.properties'
Added user 'mark' to file '/opt/CA/wildfly-idm/domain/configuration/mgmt-users.properties'
Added user 'mark' with groups  to file '/opt/CA/wildfly-idm/standalone/configuration/mgmt-groups.properties'
Added user 'mark' with groups  to file '/opt/CA/wildfly-idm/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? no

Now you have the user associated with the Management Realm.