Issue to connect to remote database [message #517205] |
Sun, 24 July 2011 10:08 |
averion
Messages: 42 Registered: January 2009 Location: US
|
Member |
|
|
Hello Experts,
I am using Report Builder 10.1.2.0.2.
There is a table in a remote database with synonyms/links defined.
I am getting error trying to access those tables. DBA says links/synonyms are correct and I am also able to access that table from SQLTool without error.
I can do a select statement on those tables from 'SQL Qurey statement' in datamodel.
Error is generated only if I try to use those tables in 'Formula'
or in function/procedure.
I don't know if this is a bug or something else.
Thanks a lot in advance for sharing some ideas on this.
|
|
|
|
Re: Issue to connect to remote database [message #517210 is a reply to message #517207] |
Sun, 24 July 2011 11:21 |
averion
Messages: 42 Registered: January 2009 Location: US
|
Member |
|
|
The error occures on both cases (synonym/databasse link)
Here are some expalinations,
1. User1 in DB1 is trying to access tables in DB2 User2.
2. User1 can access that table in DB2.User2 with no error using SQLTool.
3. This indicates the link/synonym related to the tables are correct.
4. No error is produced if select statement is used only in Report 'SQL query'.
5. If that table is included in Formula/function in a report an error is generated.
"ORA-04052 Error occured when looking up remote object"
ORA-00604 Error occured at recursive SQL level1.
I hope this clears out everything.
Thanks for the reply.
|
|
|
|
Re: Issue to connect to remote database [message #517315 is a reply to message #517211] |
Mon, 25 July 2011 06:36 |
averion
Messages: 42 Registered: January 2009 Location: US
|
Member |
|
|
Here is the version for db1,db2
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
|
|
|
|
Re: Issue to connect to remote database [message #517335 is a reply to message #517327] |
Mon, 25 July 2011 08:05 |
averion
Messages: 42 Registered: January 2009 Location: US
|
Member |
|
|
Thanks for your suggestions,
I have one question though, will that query work if you create a synonym for that link and try to run on a 'Report Builder'.
As mentioned before, there is a synonym for a link that points to a table in a remote DB.
So, a select statement would only be something like 'Select * from TABLE' (This table is acutlly a synonym of a link that points to a table in remote DB).
The query runs perfectly in PLSQL but the problem is only if tried on a report builder.
Thanks again,
|
|
|
|
|
|
Re: Issue to connect to remote database [message #517413 is a reply to message #517341] |
Mon, 25 July 2011 21:33 |
averion
Messages: 42 Registered: January 2009 Location: US
|
Member |
|
|
Hello Experts,
I am still getting an error while accessing a table in a remote database through Report 10.1.2.0.2.
Here is what the situation is,
1. User1 in DB1 is trying to access a table in DB2 User2.
2. There is a synonym defined for a link to access a table in a remote DB2 User2.
3. User1 in DB1 is running a select statement like 'Select Column1,Column2,Column3,Column4 from TABLENAME.
(TABLENAME is actually a synonym for a link and points to a table in DB2 User2)
4. User1 can access that table in DB2.User2 through that synonym with no error using SQLTool.
5. This indicates the link/synonym related to the tables are correct.
6. No error is produced if select statement is used only in Report 'SQL query'.
7. If that table is included in Formula/function in a report an error is generated.
"ORA-04052 Error occured when looking up remote object"
ORA-00604 Error occured at recursive SQL level1.
I have been trying to get this done but still could not figure out a way.
Thanks again for your help.
|
|
|
|
|
Re: Issue to connect to remote database [message #517516 is a reply to message #517430] |
Tue, 26 July 2011 07:29 |
averion
Messages: 42 Registered: January 2009 Location: US
|
Member |
|
|
Thanks for your suggestions.
Select statement to the remote table 'SELECT column1, column2 FROM tablename' works perfectly.
It also works perfectly if I only include that table in Report 'SQL query'.
The error is generated only if that table is used in a function in a report to calculate something.
Thanks again, I will try out your suggestion cookiemonster and probably contact Oracle.
Have a good day.
|
|
|
|
|
|
|
Re: Issue to connect to remote database [message #517529 is a reply to message #517520] |
Tue, 26 July 2011 08:05 |
cookiemonster
Messages: 13962 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
averion wrote on Tue, 26 July 2011 13:39
Actully, there is no Role set for users.
I tried 'SET ROLE NONE' as well but still get the remote connection error.
What do mean you still get the error?
According to you it works in sqltools, and if it works in sqltools then it'll work in sqlplus.
I wanted to see if running that command in sqlplus caused the query to then give the error you see in oracle reports.
|
|
|
Re: Issue to connect to remote database [message #517542 is a reply to message #517529] |
Tue, 26 July 2011 09:33 |
averion
Messages: 42 Registered: January 2009 Location: US
|
Member |
|
|
Hello again,
Sorry for the delay,
The query runs perfectly in SQLTools but if I use the same query in a Formula in a Report this error is generated.
The select statement aslo works perfectly if only used in Report 'SQL query'.
I hope its clear.
Thanks
|
|
|
|
|
|
|
|
|
|
|
Re: Issue to connect to remote database [message #517711 is a reply to message #517624] |
Wed, 27 July 2011 08:10 |
averion
Messages: 42 Registered: January 2009 Location: US
|
Member |
|
|
Hello 'Littlefoot' and 'Cookiemonster',
That is what I am doing right now. I have created a function that returns a value I was getting from a formula and it works.
SQLtool as 'cookiemonster' mentioned is a free tool and is very flexible for PlSql. I am a big fan of it. I think you should try.
Thanks a lot once again to both of you and have a great day.
|
|
|