fp_idmworks Super Contributor.
Super Contributor.
366 views

3.5 - db-init.sh -- when to use it for doing a reset

When should this utility be used, and when it shouldn't be used for doing a reset?

The documentation references the ability to do a reset against the database with db-init.sh.

I tried to use this and I could no longer see any data in the catalog. Granted I had deleted all collections ahead of time, but after creating a new identity source collection and publishing it, no data would show.

I proceeded to go down the route of dropping the tables and trying to use the statements in the documentation to recreate the roles and databases and then I was able to run db-init except for the fact that reporting was also installed I wasn't able to get past errors with the reporting roles / configuration. Tomcat was giving exceptions. So I ended up dropping the tables again and uninstalling Identity Governance and re-installing it, letting it create everything from scratch.
0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

Re: 3.5 - db-init.sh -- when to use it for doing a reset

On 3/8/19 1:54 PM, fp IDMWORKS wrote:
>
> When should this utility be used, and when it shouldn't be used for
> doing a reset?
>
> The documentation references the ability to do a reset against the
> database with db-init.sh.
>
> I tried to use this and I could no longer see any data in the catalog.
> Granted I had deleted all collections ahead of time, but after creating
> a new identity source collection and publishing it, no data would show.
>
> I proceeded to go down the route of dropping the tables and trying to
> use the statements in the documentation to recreate the roles and
> databases and then I was able to run db-init except for the fact that
> reporting was also installed I wasn't able to get past errors with the
> reporting roles / configuration. Tomcat was giving exceptions. So I
> ended up dropping the tables again and uninstalling Identity Governance
> and re-installing it, letting it create everything from scratch.
>
>

Greetings,
db-init is used to create the base schema (the result of the
liquibase-*.logs from the install). One of the main concepts for this:
You have been up an running for a while in test/QA and want to start
over without having to fully re-install. So, you would export anything
you have configured that you want to re-use (For Example: Collectors,
Fulfillment configuration, review definitions, Business Roles), stop
tomcat, delete the databases/schema, create them with the same name,
issue db-init to create the base tables in the databases/shemas, issue
the import configuration script, and with 3.5. and earlier start Tomcat
to get the base data load to happen. At this point you are back to
where you were after the install. You can then import your collectors
(for example) and collect & publish and continue on your way.

I use it a lot.

db-init has been around for awhile and is used with other products as
well (like Identity Reporting )



--
Sincerely,
Steven Williams
Principal Enterprise Architect
Micro Focus
0 Likes
msira Respected Contributor.
Respected Contributor.

Re: 3.5 - db-init.sh -- when to use it for doing a reset

IG 3.5.0

Hello!

Can we maybe have some more documentation about this case?

I also tried doing a reset like this:

1) dbdrop igops
2) create database igops with `CREATE DATABASE igops WITH OWNER = igops
ENCODING = 'UTF8''
3) I was supossed to run some sql scripts in the path
`c:\netiq\idm\apps\idgov\sql' but there were none
4) I was also supossed to run a command to populate the global
configuration values in the database, but there was no windows
version and I didn't feel like adapting the command.
5) Just for fun I ran the following
,----
| db-init.bat
| db-init.bat -password netiq -cksm
| db-init.bat -password netiq
| db-init.bat -password netiq -sql > reset.sql
`----
And also ran the exported `reset.sql' with `psql -f reset.sql'

I started tomcat and there were lots of errors, such as `[IG-SERVER]
Invalid feature service key'.

Mine is a demo app, so there is no damage in having to reinstall. But it
would be nice to know how to reset the DB without having to reinstall.

Btw, the only reference to db-init was in section 6.9.1 of the
<https://www.netiq.com/documentation/identity-governance-35/install-guide/data/t46l35gn5z2h.html#b1c924pr>
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.