0

I have this statement:

SELECT passwdlib.piv_insertPasswd(:A1, :A2) 
  FROM DUAL

I am guessing that piv_insertPasswd is the name of function or SP, and passwdlib is the user name. Am i right? If not what is each component?

3 Answers 3

3

passwdlib could be a package name. See http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96624/09_packs.htm

Otherwise, it's a schema name.

Sign up to request clarification or add additional context in comments.

3 Comments

Most likely are right. My sys admin handed me something to debug and I found that statement in the code. I checked the database and there is no such package. Maybe I should check with him to get the rest of the items I need to proceed.
@Haoest passwdlib could also be a public synonym for a different package name
How can you say that without an investigation in the dictionary?It could be also an object type
2

It is more likely that passwdlib is the package name, and that piv_insertPasswd is the name of the function within the package.

Comments

2

Schema, package, object, synonym.

select object_type
from   user_objects uo
where  uo.OBJECT_NAME = 'PASSWDLIB'

select typecode
from   user_types ut
where  ut.type_name = 'PASSWDLIB'

select *
from   USER_METHOD_PARAMS um
where  um.type_name = 'PASSWDLIB'

2° section: added after the post was marked as answered. I think the correct method in this case is to query the dictionary, without it we only try to guess!

Test the object option.

CREATE TYPE TPerson AS OBJECT (
  idno           NUMBER,
  first_name     VARCHAR2(20),
  last_name      VARCHAR2(25),
  email          VARCHAR2(25),
  phone          VARCHAR2(20),

  static FUNCTION getDetails  return varchar2);
/

create type body TPerson as

    static function getDetails return varchar2 is
    begin           
        return 'I am TPerson type ';
    end;
end;
/

select TPerson.getDetails() from dual;

Output

 select TPerson.getDetails() from dual;  

 TPERSON.GETDETAILS()
 --------------------------------------------------------------------------------
 I am TPerson type   

The investigation

select object_type,uo.*
from   user_objects uo
where  uo.OBJECT_NAME = 'TPERSON';


OBJECT_TYPE         OBJECT_NAME                                                                      SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE         CREATED     LAST_DDL_TIME TIMESTAMP           STATUS  TEMPORARY GENERATED SECONDARY  NAMESPACE EDITION_NAME
------------------- -------------------------------------------------------------------------------- ------------------------------ ---------- -------------- ------------------- ----------- ------------- ------------------- ------- --------- --------- --------- ---------- ------------------------------
TYPE                TPERSON                                                                                                              23020                TYPE                02/08/2011  02/08/2011 07 2011-08-02:07:50:57 VALID   N         N         N                  1 
TYPE BODY           TPERSON                                                                                                              23021                TYPE BODY           02/08/2011  02/08/2011 07 2011-08-02:07:50:57 VALID   N         N         N                  2



select typecode,ut.*
from   user_types ut
where  ut.type_name = 'TPERSON';


TYPECODE                       TYPE_NAME                      TYPE_OID                         TYPECODE                       ATTRIBUTES    METHODS PREDEFINED INCOMPLETE FINAL INSTANTIABLE SUPERTYPE_OWNER                SUPERTYPE_NAME                 LOCAL_ATTRIBUTES LOCAL_METHODS TYPEID
------------------------------ ------------------------------ -------------------------------- ------------------------------ ---------- ---------- ---------- ---------- ----- ------------ ------------------------------ ------------------------------ ---------------- ------------- --------------------------------
OBJECT                         TPERSON                        711EFA23BE614F1BAFE0D741324DB215 OBJECT                                  5          1 NO         NO         YES   YES                                                                                              

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.