Home » Other » Client Tools » Package body not showing. (Oracle 10g, Toad 10, 12)
Package body not showing. [message #615578] Thu, 05 June 2014 10:36 Go to next message
pradies
Messages: 250
Registered: May 2008
Senior Member
Hi,

I am having a user which is having package created and execute privs gievn to user B via roles.

User A's Package grant ------ > to role ------ > user B.

Now on toad, When I am logging into the Owner or System user, I am able to see package spec and package body, but When loging through user B, I am not able to see package body. only able to see package spec.

I also tried according the below link, but the problem is same. Please suggest.

http://www.orafaq.com/forum/t/53116/0/


Thanks in Advance

Pradeep Sharma
Re: Package body not showing. [message #615579 is a reply to message #615578] Thu, 05 June 2014 10:38 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
privileges acquired via ROLE do NOT apply within named PL/SQL procedures.

Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and please read http://www.orafaq.com/forum/t/174502/102589/
Re: Package body not showing. [message #615580 is a reply to message #615579] Thu, 05 June 2014 10:50 Go to previous messageGo to next message
pradies
Messages: 250
Registered: May 2008
Senior Member
Hi,

I have already given direct grant to user B, but the problem is same. Any suggestions ??


thanks

Pradeep Sharma
Re: Package body not showing. [message #615581 is a reply to message #615580] Thu, 05 June 2014 10:56 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Everything is forbidden; except that which is explicitly GRANTED.

I don't know what you have, what you see or what you do.
Do you have error of commission or error of omission?
I suspect that additional GRANT is needed.
Re: Package body not showing. [message #615582 is a reply to message #615578] Thu, 05 June 2014 11:15 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Throw away TOAD, it is just b...t, and start to work like a professional using SQL*Plus.

Re: Package body not showing. [message #615583 is a reply to message #615580] Thu, 05 June 2014 11:20 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
pradies wrote on Thu, 05 June 2014 21:20

I have already given direct grant to user B, but the problem is same.


So this is what I understand from what you say :
1. You login as user A in toad and view a package spec and body.
2. Logout user A, package spec and body is still open in the window.
3. Login again as user B, in the window you will still have the package loaded.
4. You try to view the package in object browser, but you only find the spec, and no body.

Please reply to the above 4 steps.
Re: Package body not showing. [message #615596 is a reply to message #615583] Thu, 05 June 2014 14:50 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
User B has the privilege to execute that package - he does not own it. Source code is in User A's schema. I don't know (and can't test) what (if anything) should User B do so that he could see (and edit!) that package. I, somehow, doubt that TOAD is to blame in this case. I'd say that other tools (SQL*Plus included) would behave the same way.
Re: Package body not showing. [message #615600 is a reply to message #615596] Thu, 05 June 2014 15:06 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

It is to blame as it prevents from thinking.
The question would not be asked with SQL*Plus as with SQL*Plus you have to read the documentation to know which view to use.

Re: Package body not showing. [message #615602 is a reply to message #615600] Thu, 05 June 2014 15:17 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Once OP tells us about the above 4 steps, it will be pretty much clear whether TOAD is the issue or the GRANT privilege.
Re: Package body not showing. [message #615603 is a reply to message #615602] Thu, 05 June 2014 15:23 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I m a MCA, OCP certified DBA
OP has been here for SIX years!
once again this shows what OCP is worth.

Problem Exists Between Keyboard And Chair
Re: Package body not showing. [message #615604 is a reply to message #615602] Thu, 05 June 2014 15:37 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Lalit Kumar B wrote on Thu, 05 June 2014 22:17
Once OP tells us about the above 4 steps, it will be pretty much clear whether TOAD is the issue or the GRANT privilege.


Problem is behaviour resulting of the usage of TOAD: switching off any possibly existing intelligence.

Re: Package body not showing. [message #615605 is a reply to message #615604] Thu, 05 June 2014 16:19 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You can't blame a gun because it shot someone. You can't blame a car because it hit someone. You can't blame TOAD because its users don't know how to properly use it.

The same view you'd query in SQL*Plus can easily be queried in TOAD, only if you knew which one is it.

Do I know it? Of course not; I'd name it already. Why don't I search? Because it is painful to do that on a mobile phone.
Re: Package body not showing. [message #615607 is a reply to message #615605] Thu, 05 June 2014 23:02 Go to previous messageGo to next message
pradies
Messages: 250
Registered: May 2008
Senior Member

Problem has been solved by some setting at toad level (View >>toad options >> schema browser >> Check box(right panel))


Quote:

Throw away TOAD, it is just b...t, and start to work like a professional using SQL*Plus.

I am a "professional" and behaving like a professional. But few are not, I am using only sql*plus or putty for working on database. Toad is not b...t. most of the developer using this TOAD option as developing in the development. asking all the question in this forum very politely.

Quote:
doubt that TOAD is to blame in this case.


I am not blaming toad, just asking is there any thing missing related to grants or any option related to toad.


Quote:
>I m a MCA, OCP certified DBA
OP has been here for SIX years!
once again this shows what OCP is worth.

Problem Exists Between Keyboard And Chair


Yes I am MCA and OCP ceritified but not knowing about each & every problem. and no one can. whenever any one facing issue first they are searching on net first. Same I am doing. If he/she will not get any solution, then he/she will look for help from other sources. I already mentioned that I already searched on net and followed the link mentioned in my first most post. Problem is not with keyboard and chair, problem with person's attitude. few people having good attitude like Lalit Kumar B but few are not.

Quote:
You can't blame a gun because it shot someone. You can't blame a car because it hit someone. You can't blame TOAD because its users don't know how to properly use it.


Again I am not blaming toad. Just asked if something missing. I am not using this toad frequently. It's related development team problem and we are just trying to solve this. that's IT.








Re: Package body not showing. [message #615608 is a reply to message #615607] Thu, 05 June 2014 23:19 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
pradies wrote on Fri, 06 June 2014 09:32

Problem has been solved by some setting at toad level (View >>toad options >> schema browser >> Check box(right panel))



Hmm, that's why I asked you :
Quote:

4. You try to view the package in object browser, but you only find the spec, and no body.


I have seen many developers with similar questions, that why I can't view any packages in the object browser. Or I only see the spec but no body. Always/most of the times it turns out to be an issue with the tool's settings or preferences.


Re: Package body not showing. [message #615609 is a reply to message #615607] Thu, 05 June 2014 23:29 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid you didn't get my point. I was talking to Michel. I know his opinion about TOAD and I disagree with him. Maybe true professionals (TM) use only SQL*Plus only. I'm not the one, then. I do use it occasionally, but most of the time I'm on TOAD. It lets me view information I need in a much more user-friendly way than character-mode SQL*Plus.

I'm glad you fixed it. As I thought, it wasn't TOAD, but its user who had to properly use it.
Re: Package body not showing. [message #615610 is a reply to message #615578] Thu, 05 June 2014 23:34 Go to previous messageGo to next message
pradies
Messages: 250
Registered: May 2008
Senior Member
Hi,

thanks Lalit Kumar B and Littlefoot for your support and understanding my problem. now the problem has been resolved.

thanks to both of you.
Re: Package body not showing. [message #615615 is a reply to message #615605] Fri, 06 June 2014 01:21 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Littlefoot wrote on Thu, 05 June 2014 23:19
You can't blame a gun because it shot someone. You can't blame a car because it hit someone. You can't blame TOAD because its users don't know how to properly use it.

The same view you'd query in SQL*Plus can easily be queried in TOAD, only if you knew which one is it.

Do I know it? Of course not; I'd name it already. Why don't I search? Because it is painful to do that on a mobile phone.


I can't blame a gun because it shots someone, of course as a gun is made to shot people, but I can blame this gun for itself.

In the same way, I can blame TOAD to show source code. As a developer I never had to use any tool to see the code, my code is not stored in the database but in a code source tool. If I think the code is bad in the (dev) database, I reload it.
As a DBA I had to get the code ONLY when a team thinks there was an error in a delivery and they want to check (and my answer was "why not check the deliver file?", and their implicit answer was "because we do not trust DBA").

TOAD is designed to be misused, this is why it is a bad tool. A tool that does not help to learn its domain but turn their user to dumb people is a bad tool, more is a dangerous tool. I can't number the production downtimes due to TOAD use.

Re: Package body not showing. [message #615617 is a reply to message #615615] Fri, 06 June 2014 02:21 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Michel

As a DBA I had to get the code ONLY when ...

See? We are talking from a different standpoint. I, as a developer, use TOAD every day, the whole day long (unless I'm working on forms, reports, an Apex application or something else). It is by far more convenient to have an editor which is capable of compiling my code and running it, without additional steps of reloading it from source code repository.

My code isn't stored in a database (of course, it exists there), it is kept in numerous files (packages, procedures, whatever). I just found that it is easier to work in TOAD than SQL*Plus. A simple "SELECT * FROM ..." is a nightmare in SQL*Plus, while it is neat in TOAD. I can see what I'm interested in in a matter of seconds, without formatting (COL DNAME FORMAT A10 ... oh, shit, it is too short/long, let me resize it).

To cut a long story short: you don't like it, I do, and there's nothing you can do about it (not that you'd want to).
Re: Package body not showing. [message #615618 is a reply to message #615615] Fri, 06 June 2014 02:37 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Michel Cadot wrote on Fri, 06 June 2014 11:51

TOAD is designed to be misused, this is why it is a bad tool.


Some, few, many wouldn't agree with that statement. Not that I am advocating the use of TOAD or anything else. A tool is meant to make work easy and efficient. Its use/misuse depends on the person and his level of understanding.

By the way, our own OraFAQ wiki says this
Re: Package body not showing. [message #615620 is a reply to message #615617] Fri, 06 June 2014 03:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
See? We are talking from a different standpoint.


You missed the part "As a developer I...". I do not negate the pros for a senior what I say is that it should be forbid for juniors which do not understand what they do.
And it should not mix up developer and DBA stuff. How many times I had to answer to developers that say that TOAD displays a red light for something they do not understand and tell me to fix the database configuration and do not understand my answer anyway? It is just a waste of time and resources. And I repeat I saw many times production down due to TOAD and I also saw many of my clients aware of this and asking me to prevent from any connection to production databases from TOAD.

In short, it is good when you know what you're doing that is when you know how to do it without TOAD. It is a danger in other cases.

Re: Package body not showing. [message #615621 is a reply to message #615618] Fri, 06 June 2014 03:27 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
A tool is meant to make work easy and efficient.


Yes but this one mainly makes juniors dumb.

Quote:
By the way, our own OraFAQ wiki says this


I know what it says, I wrote some parts of it.

I repeat my position, when you know what you are doing (that is what's behind the tool) it makes work easier (I doubt it is more efficient). When you don't, it makes you a danger.

As many advocate for TOAD, I emphasize my against position to prevent from people thinking there are only pros and no cons.

Re: Package body not showing. [message #615624 is a reply to message #615620] Fri, 06 June 2014 03:45 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Forgot to mention, it is not I don't like it, actually I don't care about the features of a tool I don't use. It is I don't like the consequences of its usage, for the database and for the human being.

Re: Package body not showing. [message #615659 is a reply to message #615624] Fri, 06 June 2014 09:52 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You forgot the mankind.

Just kidding! Now, after a long debate, I think I understand what you are saying, and I agree with your last statements. TOAD can be dangerous. In SQL*Plus you have to learn stuff; otherwise, a syntax error prevents you from doing something stupid. With TOAD, you don't have to know anything much, click here & click there and oh shit, where did my data go? At the end, it comes back to individuals.
Re: Package body not showing. [message #615664 is a reply to message #615659] Fri, 06 June 2014 11:10 Go to previous message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
+1

I believe, quality discussions always ends up in complete clarification and understanding.

MC and LF /forum/fa/2115/0/
Previous Topic: description keyword
Next Topic: SQLDeveloper working, SQLPlus does not work
Goto Forum:
  


Current Time: Thu Mar 28 17:58:16 CDT 2024