Siebel Tools >  LOCAL_XE Database Initialization Fails with Error ORA-01031

LOCAL_XE Database Initialization Fails with Error ORA-01031

APPLIES TO:
Siebel Remote - Version 16.16 [IP2016] and later

SYMPTOMS
Siebel Remote / Replication / Anywhere - on version: 16.17 [IP2016]

Remote LOCAL_XE Database initialization fails with errors in upgwiz.log

ERROR
-----------------------
SQLError Statement 0 0000000259ea0c20:0 2017-10-20 10:59:30 SQL Statement:
GRANT CONNECT To "DEV_USER01" IDENTIFIED BY "*****"
DBCLog DBCLogError 1 0000000259ea0c20:0 2017-10-20 10:59:30 [tp][ODBC Oracle driver][Oracle]ORA-01031: insufficient privileges
UpgradeLog UpgradeError 1 0000000259ea0c20:0 2017-10-20 10:59:30 [tp][ODBC Oracle driver][Oracle]ORA-01031: insufficient privileges

UpgradeLog UpgradeError 1 0000000259ea0c20:0 2017-10-20 10:59:30 Error in function UTLOdbcExecDirectDDL
UpgradeLog UpgradeError 1 0000000259ea0c20:0 2017-10-20 10:59:30 Error executing sql statement (GRANT CONNECT To "DEV_USER01" IDENTIFIED BY "*****").
UpgradeLog UpgradeError 1 0000000259ea0c20:0 2017-10-20 10:59:30 Error executing statement (RUN_SQL_0) in file (DEV_USER01.sql).


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Setup Siebel Remote / Mobile environment;
2. Run GenNewDB and DbXtract tasks and ensure those complete fine;
3. Start Siebel Tools or Client to synchronize and start the LOCAL_XE database initialization;
4. See Upgrade Wizard ending with errors.


CAUSE
The Remote DB Initialization issues were caused by the fact that initially when installing Siebel Tools, the Local Database option was selected.
That would imply selecting the Local option for the Oracle XE database template; and would also prompt for and create the Oracle user account(s) for that as well.
Later on, LocalDBSetup.exe attempted has failed with errors, and same existing LOCAL_XE DB was used for the Remote approach - and this lead to the grant user issues.

Some details on this are also documented in:
"Siebel Remote : Database Initialization Fails At Step Initializing User Accounts (Doc ID 2222971.1)"

SOLUTION
In order to resolve the issue, following steps were applied:

1- On a separate machine (than the one used for LOCAL_XE tests before), please install if needed Siebel Tools / Client with Oracle XE Database; (Oracle 12c Database client 32 bits is a prerequisite as well for all these).
When prompted, do not check that option to 'Install Local Database' (or Sample - in case of Client installation). That should ensure the Remote database XE template would be used instead.

2- If needed, please re-run on Siebel Server the GenNewDB and DbXtract tasks (that would be only needed if extracting a different user than the one already extracted earlier - i.e. DEV_USER01 or if the files for that one are no longer present in its DOCKING\[UserName]\OUTBOX directory on server).

3- Once those tasks have completed and the extract files are in OUTBOX folder, please start Siebel Tools to synchronize those and start the LOCAL_XE database initialization.