SMObjImport fails with error "Import Status: Policy store failed operation PrepareForSearching for object type Agent."

Document ID : KB000054067
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Customer is trying to import one of my policy server export from my QA environment into a test environment using the following command:

smobjimport -dsiteminder -wpassword -iqaexport.smdif -v -l -f

However it fails over and over in the same point:

-> Saving Agent 01-ec715205-c734-4b4d-8182-ee93dbdee766...
Import Status: Policy store failed operation 'PrepareForSearching' for object type 'Agent'.
Unexpected error in database interface. . Error code -1063

My environment is:

SiteMinder Policy Server 6 SP5 CR20 on Windows 2003.
Oracle 10g as Policy Store.

Solution:

The issue is because the hostname of the trusted host is larger than the actual size:

Snippet of trace:

<- Begin

[][][][][][][][][Internal Error: DB Transport Error. Code is -4017 (DBMSG: <<< State = HY000 Internal Code = 12899 - [DataDirect 5.3-SP1][ODBC Oracle Wire Protocol driver][Oracle]ORA-12899: value too large for column "LEMPVM04"."SMTRUSTEDHOST5"."IPADDR" (actual: 26, maximum: 25)>>>)][][Caught an exception 'Internal Error: DB Transport Error. Code is -4017 (DBMSG: <<< State = HY000 Internal Code = 12899 - [DataDirect 5.3-SP1][ODBC Oracle Wire Protocol driver][Oracle]ORA-12899: value too large for column "LEMPVM04"."SMTRUSTEDHOST5"."IPADDR" (actual: 26, maximum: 25)>>>)'][][][][][]

-> End

The table smtrustedhost5 is created using the script sm_oracle_ps.sql as show below:

<- Begin CREATE TABLE smtrustedhost5 (       hostdesc           VARCHAR2(255) NULL,       ipaddr             VARCHAR2(25) NULL,       hostname           VARCHAR2(255) NOT NULL,       secret             VARCHAR2(255) NULL,       hostoid            VARCHAR2(64) NOT NULL,       is4xhost    INTEGER DEFAULT 0 NULL,       rolloverenabled    INTEGER DEFAULT 0 NULL,       secretgentime      INTEGER DEFAULT 0 NULL,       secretusedtime     INTEGER DEFAULT 0 NULL,       prevsecret         VARCHAR2(255) NULL,       PRIMARY KEY (hostoid)       USING INDEX              STORAGE (                      INITIAL 50k                     NEXT 50k                     MINEXTENTS 1                     MAXEXTENTS 100              ),       UNIQUE (              hostname       )       USING INDEX              STORAGE (                      INITIAL 50k                     NEXT 50k                     MINEXTENTS 1                     MAXEXTENTS 100              ))       STORAGE (               INITIAL 100k              NEXT 100k              MINEXTENTS 1              MAXEXTENTS 100       ) ;-> End

In order to fix this issue the column ipaddr has to be lager than the actual size of the hostname which is 26.

You can use the following SQL statement to increase the column ipaddr:

ALTER TABLE smtrustedhost5 modify (ipaddr VARCHAR2(50) NULL);