掲示板

Install Liferay 6.2 Patch86 with an DB2 Database

7年前 に N. H. によって更新されました。

Install Liferay 6.2 Patch86 with an DB2 Database

Junior Member 投稿: 71 参加年月日: 13/11/14 最新の投稿
Hello Together,

we have the following Problem. We tried to install a Liferay patched with patch 86 on a websphere Server with an db2 database. The DB user have only grants to insert,update,delete rows not to alter a table or drop it.

Because of the missing alter privilege we get an sqlSyntax Error because the VerifyDB2 tried to alter the table EXPANDOVALUE


@Override
	protected void doVerify() throws Exception {
		DB db = DBFactoryUtil.getDB();

		String dbType = db.getType();

		if (!dbType.equals(DB.TYPE_DB2)) {
			return;
		}

		alterVarcharColumns();

		convertColumnToClob("EXPANDOVALUE", "DATA_");
	}


Before we had another db2 database were we installed a liferay SP9 after that we removed the war file and install the liferay patch 86 against the same database and no error occured the EXPANDOVALUE was not altered.

What we can do to run the VerifyProcess without errors against an initial database and without give the user the alter privilege.

The database was created with the db2.sql we downloaded from liferay

Thank ypu for help
Kind Regards
N.H.
thumbnail
7年前 に Jorge Díaz によって更新されました。

RE: Install Liferay 6.2 Patch86 with an DB2 Database

Liferay Master 投稿: 753 参加年月日: 14/01/09 最新の投稿
That verify was added in https://issues.liferay.com/browse/LPS-55640

In my opinion, the easiest way to solve your issue is:
1) Give "alter" permissions to your Liferay database user
2) Execute verify process
3) Remove "alter" permission

If it is not possible to temporally add "alter" permissions, the only alternative is to manually change EXPANDOVALUE.DATA_ column from Varchar to Clob.

You have to create a temporal column as DB2 doesn't allow to directly alter column type, more info see: VerifyDB2.convertColumnToClob
7年前 に N. H. によって更新されました。

RE: Install Liferay 6.2 Patch86 with an DB2 Database

Junior Member 投稿: 71 参加年月日: 13/11/14 最新の投稿
Hello Mr. Diaz,
thank you for your answer. When I first install the Liferay SP 9 against a database and after that install the liferay patch 86 then this error does not occur.

Isn´t there a VerifyProcess again ? The alter ist not stored in one of the files for SQL updates

Only when you install it "Initial" the new verifyprocess failed,

Kind Regard
Natalie