Home » SQL & PL/SQL » SQL & PL/SQL » strange problem (database 9i , developer 10g)
strange problem [message #433261] Tue, 01 December 2009 02:13 Go to next message
emadnabil
Messages: 156
Registered: August 2007
Senior Member
Hii all

I have a view called SEK_JTF_RS_SALESREPS_PRD
this view work on one table on a databaselink


when i make this select statment on the database home
select count(*) 
from SEK_JTF_RS_SALESREPS_PRD;


this result is 210

and when i make it on the developer home
the result is 0

also , I am sure of my connection string in the tnsname.ora
on both the database and developer home


how is this happened
thanks





Re: strange problem [message #433262 is a reply to message #433261] Tue, 01 December 2009 02:15 Go to previous messageGo to next message
Michel Cadot
Messages: 63818
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You are not accessing the same object.

Regards
Michel
Re: strange problem [message #433264 is a reply to message #433261] Tue, 01 December 2009 02:22 Go to previous messageGo to next message
emadnabil
Messages: 156
Registered: August 2007
Senior Member
what do you mean by

You are not accessing the same object.

please clarify

thanks
Re: strange problem [message #433265 is a reply to message #433264] Tue, 01 December 2009 02:29 Go to previous messageGo to next message
Michel Cadot
Messages: 63818
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
One is querying an object (table,view...) and the other one is querying another one.

Regards
Michel
Re: strange problem [message #433266 is a reply to message #433261] Tue, 01 December 2009 02:30 Go to previous messageGo to next message
Michel Cadot
Messages: 63818
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Also (assuming you access the same database and the same object in it) you may have a security policy on the object that may not return the same rows from the 2 environments.

Regards
Michel

[Updated on: Tue, 01 December 2009 02:31]

Report message to a moderator

Re: strange problem [message #433268 is a reply to message #433261] Tue, 01 December 2009 02:37 Go to previous messageGo to next message
emadnabil
Messages: 156
Registered: August 2007
Senior Member
this mean that the connection string in the both home are different
is that what you mean?


thanks
Re: strange problem [message #433273 is a reply to message #433261] Tue, 01 December 2009 03:15 Go to previous messageGo to next message
Littlefoot
Messages: 20827
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why do you maintain two (or more?) TNSNAMES.ORA files? Set the TNS_ADMIN system variable which will point to only one copy of the TNSNAMES.ORA file. It might make your life easier.

Also, doing so, it wouldn't matter what home you are in and which database you think you are connecting to. One TNSNAMES.ORA means that there's no doubt.

Could you copy-past your SQL*Plus session which shows what and how you've done that?
Re: strange problem [message #433274 is a reply to message #433268] Tue, 01 December 2009 03:18 Go to previous messageGo to next message
Michel Cadot
Messages: 63818
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
emadnabil wrote on Tue, 01 December 2009 09:37
this mean that the connection string in the both home are different
is that what you mean?

It is partially what I meant, it could be you access a different database or in the same database a differnet object: there could be several SEK_JTF_RS_SALESREPS_PRD object in one database.

Regards
Michel

[Updated on: Tue, 01 December 2009 03:19]

Report message to a moderator

Re: strange problem [message #433284 is a reply to message #433261] Tue, 01 December 2009 03:56 Go to previous messageGo to next message
emadnabil
Messages: 156
Registered: August 2007
Senior Member
I got the solution
there was difference in the nls_lang in the two home
Re: strange problem [message #433285 is a reply to message #433284] Tue, 01 December 2009 03:59 Go to previous message
Michel Cadot
Messages: 63818
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Hmmm, I bet you get the count through a function containing an "when others return 0" or the like.

Regards
Michel
Previous Topic: Update statement help
Next Topic: commit. Please help
Goto Forum:
  


Current Time: Sat Oct 01 02:36:10 CDT 2016

Total time taken to generate the page: 0.21498 seconds