掲示板

Database user is not tables owner

11年前 に Pepe Perez によって更新されました。

Database user is not tables owner

New Member 投稿: 14 参加年月日: 12/09/18 最新の投稿
Hi,

I'm working with:

- Liferay Portal 6.1.1 CE GA2

- JBoss AS 7.1

- Oracle Database 11g

My problem is that Liferay DB user is not who creates the Liferay DB tables, I mean, he's not the DB tables owner. That's why, if this user needs to access any table (for example, "User_" table) the reference must be like this:

SELECT screenName FROM schema.User_;

where "schema" is the name of the schema where Liferay tables are created.

By default, Liferay is not ready for this kind of queries, and, that's why, this causes deployment errors. So, my question is, ¿is there any way to configure Liferay to include schema name in all its queries?

By the way, I've got next configuration entries set to "false":

schema.run.enabled=false

schema.run.minimal=false

I don't want Liferay to create the DB tables by its own, because I don't want that Liferay DB user has got Oracle Resource role.

Thanks.
thumbnail
11年前 に David H Nebinger によって更新されました。

RE: Database user is not tables owner

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Liferay (ServiceBuilder) does not support catalog/schema.

However, you should be able to define the user that you use to connect to Oracle to default to the schema that contains the Liferay tables.

Note that normally it is the default to grant the Liferay user DBA (Resource) permissions because Liferay will manipulate the tables during the upgrade process. Liferay will also create new tables for any ServiceBuilder-based plugins that you create.

You can stay on the road you're on if you set the default schema for the user so the schema name is not required, but you must be aware that this road is fraught with problems and headaches should you choose to stay on it.