Foros de discusión

Database user is not tables owner

Pepe Perez, modificado hace 11 años.

Database user is not tables owner

New Member Mensajes: 14 Fecha de incorporación: 18/09/12 Mensajes recientes
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
David H Nebinger, modificado hace 11 años.

RE: Database user is not tables owner

Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
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.