Troubleshooting
Problem
Truncation error in the SCE log
Diagnosing The Problem
A truncation error is found in the SCE (Smart Cloud Entry) log. It references a table called DeploymentPropertyEntity_ValueOrigin. An example is seen below.
A truncation error was encountered trying to shrink VARCHAR 'dv_install_1556,dv_jbackup_1151,dv_jbackup_1225,dv_jbackup_1&' to length 512. {prepstmnt 180619972 INSERT INTO DeploymentPropertyEntity_valueOrigin (DEPLOYMENTPROPERTYENTITY_ID, element) VALUES (?, ?) [params=?, ?]} [code=20000, state=22001]
Resolving The Problem
The field in error needs to be extended. A third party software will be used for this exercise and linux is the operating system.
| Get a SQL client |
Perform an internet search for the open source program called Squirrel SQL Client. Either download and install on a separate PC or on the server running SCE.
The next steps are broken down in 2 sections, Installing Squirrel SQL Client On The Server Running SCE and Installing Squirrel SQL Client On A PC. Choose the appropriate section.
| Installing Squirrel SQL Client On The Server Running SCE |
Step 1 End the SCE services on the server
Step 2 Backup the SCE database
The database is normally located in /home/root/.SCExx where xx is a number. Change to that directory and backup the database directory named Database. The following is an example.
tar -zcvf database.tar.gz Database
Step 3 Find the location of the derby*.jar file.
From the command line, run this command to find the location of the derby*.jar file.
sudo find /opt/ibm/ -name derby*.jar
An example output would be something like this :
IBM-SCE> sudo find /opt/ibm/ -name derby*.jar
/opt/ibm/SCE32/program/configuration/org.eclipse.osgi/bundles/42/1/.cp/lib/derby-10.8.1.2.jar
/opt/ibm/SCE32/program/configuration/org.eclipse.osgi/bundles/49/1/.cp/lib/derby-10.8.1.2.jar
In the above example, derby-10.8.1.2.jar is found in 2 locations under /opt/ibm/SCE32. Either one will be fine, so record the location of one of them.
Step 4 Launch Squirrel SQL Client
Step 5 Modify a driver in Squirrel SQL Client
Click on the Drivers tab and find Apache Derby Embedded. Right click on that and select Modify Driver.

Step 6 Modifying a driver in Squirrel SQL Client continue.
A pop up window should be present. Click on the Extra Class Path tab and click on the Add button. Add the location of the derby*.jar file that was found in Step 3. Click OK

Step 7 Connect to the database
Click on the Alias tab and click on the + sign to add an alias (so we can connect to the database)

Step 8 Connect to the database continue
In the Add Alias pop up window, click on the down arrow for the Driver field and select Apache Derby Embedded.

Step 9 Connect to the database continue.
The URL is the location of the database found in Step 2. The user ID and password is cfs/cfs. Also make sure to put in something for the Name field. Click on OK when done.
The URL is "jdbc:derby:<location of SCE database>".

Step 10 Extend the field in the database.
If the connection is successful, a screen like the below should appear. Click on CFS and click on Table.

Step 11 Extend the field in the database continue
Under Table, find DEPLOYMENTPROPERTYENTITY_VALUEORIGIN and click on that. After clicking on that, click on the SQL tab.

Step 12 Extend the field in the database continue
In the SQL tab, put in the below statement and click on the Run SQL button.
ALTER TABLE "CFS"."DEPLOYMENTPROPERTYENTITY_VALUEORIGIN" ALTER "ELEMENT" SET DATA TYPE varchar(17600)

Step 13 Extend the field in the database continue
Verify that the field has been extended. Click on the Objects tab and on the right frame, click on the Columns tab. Check the Element field and the size should be 17600. Exit out of Squirrel SQL Client program (if it asks to save the session, you can cancel that since the changes already were made via the Run SQL button).

Step 14 Exercise complete, restart SCE services
| Installing Squirrel SQL Client On A Separate PC |
Step 1 End the SCE services on the server
Step 2 Backup the SCE database on the server
On the server, the database is normally located in /home/root/.SCExx where xx is a number. Change to that directory and backup the database directory named Database. The following is an example.
tar -zcvf database.tar.gz Database
Step 3 Transfer the database.tar.gz file to the PC
On the PC, change to a directory where you wish to store the database.tar.gz file. To transfer the file to the PC, use the SCP command. So from the PC, use this as an example (note that .SCExx where xx is a number) :
scp sysadmin@opensce32.rchland.ibm.com:/home/root/.SCExx/database.tar.gz /your_local_directory
Step 4 Restore the database.tar.gz file on local PC
After the database.tar.gz file is downloaded to the PC to your local directory, restore the file. An example :
tar -zxvf database.tar.gz
After the restore, a Database directory under you local directory should be restored.
Step 5 Find the location of the derby*.jar file on the server
On the server, from the command line, run this command to find the location of the derby*.jar file.
sudo find /opt/ibm/ -name derby*.jar
An example output would be something like this :
IBM-SCE> sudo find /opt/ibm/ -name derby*.jar
/opt/ibm/SCE32/program/configuration/org.eclipse.osgi/bundles/42/1/.cp/lib/derby-10.8.1.2.jar
/opt/ibm/SCE32/program/configuration/org.eclipse.osgi/bundles/49/1/.cp/lib/derby-10.8.1.2.jar
In the above example, derby-10.8.1.2.jar is found in 2 locations under /opt/ibm/SCE32.
Step 6 Transfer to the derby*.jar file to the PC
On the PC, change to a directory where you wish to store the derby*.jar file. To transfer the file to the PC, use the SCP command. So from the PC, use this command :
scp sysadmin@opensce32.rchland.ibm.com:/opt/ibm/SCE32/program/configuration/org.eclipse.osgi/bundles/42/1/.cp/lib/derby-10.8.1.2.jar /your_local_directory
Step 7 Launch Squirrel SQL Client
Since there might be some permission issues with the Database directory that was previously restored, launch Squirrel SQL Client as a super user.
The directory where Squirrel SQL Client location would probably be under your home directory, /home/your_user_id. If you don't know, perform a search for squirrel-sql.sh object. Below is an example :
sudo find / -name squirrel-sql.sh
A result should show something like this :
/home/your_user_id/squirrel-sql-3.6/squirrel-sql.sh
Launch with the SUDO comamnd : sudo /home/your_user_id/squirrel-sql-3.6/squirrel-sql.sh
Step 8 Modify a driver in Squirrel SQL Client
Click on the Drivers tab and find Apache Derby Embedded. Right click on that and select Modify Driver.

Step 9 Modifying a driver in Squirrel SQL Client continue.
A pop up window should be present. Click on the Extra Class Path tab and click on the Add button. Add the location of the derby*.jar file that was transferred from the server (Step 5) and click OK.

Step 10 Connect to the database
Click on the Alias tab and click on the + sign to add an alias (so we can connect to the database)

Step 11 Connect to the database continue
In the Add Alias pop up window, click on the down arrow for the Driver field and select Apache Derby Embedded.

Step 12 Connect to the database continue.
The URL is the location of the database directory that was restored in Step 4. The user ID and password is cfs/cfs. Also make sure to put in something for the Name field. Click on OK when done.
The URL is "jdbc:derby:<location of SCE database>".

Step 13 Extend the field in the database.
If the connection is successful, a screen like the below should appear. Click on CFS and click on Table.

Step 14 Extend the field in the database continue
Under Table, find DEPLOYMENTPROPERTYENTITY_VALUEORIGIN and click on that. After clicking on that, click on the SQL tab.

Step 15 Extend the field in the database continue
In the SQL tab, put in the below statement and click on the Run SQL button.
ALTER TABLE "CFS"."DEPLOYMENTPROPERTYENTITY_VALUEORIGIN" ALTER "ELEMENT" SET DATA TYPE varchar(17600)

Step 16 Extend the field in the database continue.
Verify that the field has been extended. Click on the Objects tab and on the right frame, click on the Columns tab. Check the Element field and the size should be 17600. Exit out of Squirrel SQL Client program (if it asks to save the session, you can cancel that since the changes already were made via the Run SQL button). Restart the SCE services.

Step 17 Save the modified database
Once you exit Squirrel SQL Client, go to the Database directory that was modified and save that directory. A example :
tar -zcvf database_new.tar.gz Database
Step 18 Transfer the database_new.tar.gz file to the server
Transfer the database_new.tar.gz to the server. An example :
scp database_new.tar.gz your_username@remotehost:/home/root/.SCExx/
Note that /home/root/.SCExx is the directory that contained the database, so we are just transferring the database_new.tar.gz file to that directory.
Step 19 Rename the current database directory
On the server, go to the /home/root/.SCExx directory and rename the Database directory. An example :
mv Database Database_old
Step 20 Restore the modified database_new.tar.gz file
On the server, in the same directory (/home/root/.SCExx), restore the database_new.tar.gz file. An example :
tar -zxvf database_new.tar.gz
There should be a Database directory created now under the /home/root/.SCExx directory.
Step 21 Restart SCE services on the server
Was this topic helpful?
Document Information
Modified date:
12 October 2020
UID
nas8N1020481