Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Pepe Perez
Database user is not tables owner
December 11, 2012 8:20 AM
Answer

Pepe Perez

Rank: New Member

Posts: 14

Join Date: September 18, 2012

Recent Posts

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.
David H Nebinger
RE: Database user is not tables owner
December 11, 2012 9:46 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11087

Join Date: September 1, 2006

Recent Posts

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.