Quantcast

Problem with Oracle and multiple schemas

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with Oracle and multiple schemas

Marcel Takeshi Nakahara
Hi, I have a Tomcat 6 and an Oracle 10g with 2 users/schemas ("sonarowner" and "sonaruser") on Sonar 3.1.1
First time I ran my application (with "sonarowner") everything was ok (sonar created every table etc), then I granted select/update/delete for every object to "sonaruser" .

But when I changed my sonar.properties to "sonaruser" (I even set sonar.jdbc.schema to "sonarowner") I can't access anything on my sonar homepage, I get the error page.

Activating sonar log to debug and I got this:

2012.06.27 09:49:09 ERROR o.s.s.ui.JRubyFacade  Fail to render: http://localhost:8080/sonar/
"DESC active_dashboards" failed; does it exist?
../apache-tomcat-6.0.35/temp/0-sonar/WEB-INF/vendor/gems/activerecord-oracle_enhanced-adapter-1.4.0/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:77

then I went to this file and print tableowner and I get "sonaruser", if I change tableowner to "sonarowner", hardcoded, everything works. Now, the question, am I missing some configurations or this is a bug?

Thanks
Marcel

As informações contidas neste e-mail são confidenciais, podendo ser legalmente protegidas. E elaborada exclusivamente ao destinatário. O acesso a este e-mail por terceiros não é autorizado. Se V.Sa. não for o destinatario pretendido, qualquer divulgação, cópia, distribuição ou qualquer ação conduzida ou omitida para que se baseie nisso, é proibida e pode ser considerada ilegal. 
 
The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Oracle and multiple schemas

Freddy Mallet
Hi Marcel,

When starting a Sonar server or a Sonar analysis, the first thing which is done by Sonar is to read some meta-information from the Sonar DB and if an Oracle User can see for instance two different PROJECTS tables in two different Oracle schema this can't work.

That's why there are two options to solve this issue :
  • Either to grant all rights to an Oracle user but ONLY on its schema and without any privileges to see anything else outside this schema
  • Or use the sonar.jdbc.schema property to compel this Oracle user to work only on tables contained in the schema.
But when I changed my sonar.properties to "sonaruser" (I even set sonar.jdbc.schema to "sonarowner") I can't access anything on my sonar homepage, I get the error page.

Because I guess with the "sonaruser", the value of the sonar.jdbc.schema should be "sonaruser" and not "sonarowner".

Kind regards,
Freddy


Activating sonar log to debug and I got this:

<a href="tel:2012.06.27%2009" value="+12012062709" target="_blank">2012.06.27 09:49:09 ERROR o.s.s.ui.JRubyFacade  Fail to render: http://localhost:8080/sonar/
"DESC active_dashboards" failed; does it exist?
../apache-tomcat-6.0.35/temp/0-sonar/WEB-INF/vendor/gems/activerecord-oracle_enhanced-adapter-1.4.0/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:77

then I went to this file and print tableowner and I get "sonaruser", if I change tableowner to "sonarowner", hardcoded, everything works. Now, the question, am I missing some configurations or this is a bug?

Thanks
Marcel

As informações contidas neste e-mail são confidenciais, podendo ser legalmente protegidas. E elaborada exclusivamente ao destinatário. O acesso a este e-mail por terceiros não é autorizado. Se V.Sa. não for o destinatario pretendido, qualquer divulgação, cópia, distribuição ou qualquer ação conduzida ou omitida para que se baseie nisso, é proibida e pode ser considerada ilegal. 
 
The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with Oracle and multiple schemas

Marcel Takeshi Nakahara
Thanks Freddy, here is what I did.

1) my "sonaruser" had 2 duplicated tables (projects and schema_migration), so I dropped both of them.
2) create synonyms for all objects from sonarowner.object to sonaruser.object

and voilà! Everything works! \o/

Thanks again.

On Wed, Jun 27, 2012 at 1:41 PM, Freddy Mallet <[hidden email]> wrote:
Hi Marcel,

When starting a Sonar server or a Sonar analysis, the first thing which is done by Sonar is to read some meta-information from the Sonar DB and if an Oracle User can see for instance two different PROJECTS tables in two different Oracle schema this can't work.

That's why there are two options to solve this issue :
  • Either to grant all rights to an Oracle user but ONLY on its schema and without any privileges to see anything else outside this schema
  • Or use the sonar.jdbc.schema property to compel this Oracle user to work only on tables contained in the schema.
But when I changed my sonar.properties to "sonaruser" (I even set sonar.jdbc.schema to "sonarowner") I can't access anything on my sonar homepage, I get the error page.

Because I guess with the "sonaruser", the value of the sonar.jdbc.schema should be "sonaruser" and not "sonarowner".

Kind regards,
Freddy


Activating sonar log to debug and I got this:

<a href="tel:2012.06.27%2009" value="+12012062709" target="_blank">2012.06.27 09:49:09 ERROR o.s.s.ui.JRubyFacade  Fail to render: http://localhost:8080/sonar/
"DESC active_dashboards" failed; does it exist?
../apache-tomcat-6.0.35/temp/0-sonar/WEB-INF/vendor/gems/activerecord-oracle_enhanced-adapter-1.4.0/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:77

then I went to this file and print tableowner and I get "sonaruser", if I change tableowner to "sonarowner", hardcoded, everything works. Now, the question, am I missing some configurations or this is a bug?

Thanks
Marcel

As informações contidas neste e-mail são confidenciais, podendo ser legalmente protegidas. E elaborada exclusivamente ao destinatário. O acesso a este e-mail por terceiros não é autorizado. Se V.Sa. não for o destinatario pretendido, qualquer divulgação, cópia, distribuição ou qualquer ação conduzida ou omitida para que se baseie nisso, é proibida e pode ser considerada ilegal. 
 
The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.



As informações contidas neste e-mail são confidenciais, podendo ser legalmente protegidas. E elaborada exclusivamente ao destinatário. O acesso a este e-mail por terceiros não é autorizado. Se V.Sa. não for o destinatario pretendido, qualquer divulgação, cópia, distribuição ou qualquer ação conduzida ou omitida para que se baseie nisso, é proibida e pode ser considerada ilegal. 
 
The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
Loading...