Pular para o conteúdo
  • Este tópico contém 4 respostas, 5 vozes e foi atualizado pela última vez 13 anos, 5 meses atrás por santosclay.
Visualizando 5 posts - 1 até 5 (de 5 do total)
  • Autor
    Posts
  • #104068
    DBA_LUCAS
    Participante

      Boa tarde !

      Estou com o seguinte impasse para criar uma tela , tem alguma forma de consulta no banco que me retorne o NOME do parametro e o tipo do parametro de uma procedure Oracle ?

      Obrigado,

      att,

      #104070
      Fábio Prado
      Participante

        Lucas, acredito que não! A dba_source, campo text naõ atende sua necessidade?

        Att,

        Fábio Prado
        http://www.fabioprado.net

        #104072
        Manoel872
        Participante

          Opa,

          Utiliza o describe.

          Describe

          Att,

          Manoel Jr.

          #104079
          CLAYTONCMA
          Participante

            Lucas, boa tarde!

            Acredito que para descobrir os parâmetros, só mesmo debugando a procedure em tempo de execução. Outra alternativa é criar um objeto de teste que retorne como output os parâmetros que você precisa.

            #104083
            santosclay
            Participante

              Boa tarde a todos.

              Galera a tempos não posto no forum, espero a partir de hoje voltar a ativa.

              Lucas se não entendi errado sua dúvida acredito que uma consulta atraves dos catalogos a seguir possam te ajudar:

              -- Consulta 1 | Relação de procedures e funções de uma package ou owner
              SELECT *
              FROM ALL_PROCEDURES ALL_PROCEDURES
              WHERE ALL_PROCEDURES.OWNER = 'NOME DO OWNER'
              AND ALL_PROCEDURES.PACKAGE_NAME = 'NOME DA PACKAGE'

              -- Consulta 2 | Relação de argumentos de uma função ou procedure
              SELECT *
              FROM ALL_ARGUMENTS ALL_ARGUMENTS
              WHERE ALL_ARGUMENTS.OWNER = 'NOME DO OWNER'
              AND ALL_ARGUMENTS.PACKAGE_NAME = 'NOME DA PACKAGE'
              AND ALL_ARGUMENTS.OBJECT_NAME = 'NOME DA FUNCTION OU PROCEDURE'
              ORDER BY ALL_ARGUMENTS.POSITION;

              Para as duas consultas inclua uma clausula “WHERE PACKAGE_NAME IS NULL” para o caso da função ou procedure não possuir relação com uma package.

              Recomendo a criação de uma procedure ou função que retorne essas informações ao sistema.

              A seguir o detalhamento dos campos retornados nas consultas:

              –ALL_PROCEDURES

              ALL_PROCEDURES.OBJECT_NAME is ‘Name of the object: top level function/procedure/package/type/trigger name’;
              ALL_PROCEDURES.PROCEDURE_NAME is ‘Name of the package or type subprogram’;
              ALL_PROCEDURES.OBJECT_ID is ‘Object number of the object’;
              ALL_PROCEDURES.SUBPROGRAM_ID is ‘Unique sub-program identifier’;
              ALL_PROCEDURES.OVERLOAD is ‘Overload unique identifier’;
              ALL_PROCEDURES.OBJECT_TYPE is ‘The typename of the object’;
              ALL_PROCEDURES.AGGREGATE is ‘Is it an aggregate function ?’;
              ALL_PROCEDURES.PIPELINED is ‘Is it a pipelined table function ?’;
              ALL_PROCEDURES.IMPLTYPEOWNER is ‘Name of the owner of the implementation type (if any)’;
              ALL_PROCEDURES.IMPLTYPENAME is ‘Name of the implementation type (if any)’;
              ALL_PROCEDURES.PARALLEL is ‘Is the procedure parallel enabled ?’;

              –ALL_ARGUMENTS
              *Em destaque as colunas que poderão lhe ajudar

              ALL_ARGUMENTS.OWNER is ‘Username of the owner of the object’;
              ALL_ARGUMENTS.OBJECT_NAME is ‘Procedure or function name’;
              ALL_ARGUMENTS.PACKAGE_NAME is ‘Package name’;
              ALL_ARGUMENTS.OBJECT_ID is ‘Object number of the object’;
              ALL_ARGUMENTS.OVERLOAD is ‘Overload unique identifier’;
              ALL_ARGUMENTS.SUBPROGRAM_ID is ‘Unique sub-program Identifier’;
              ALL_ARGUMENTS.ARGUMENT_NAME is ‘Argument name’;
              ALL_ARGUMENTS.POSITION is ‘Position in argument list, or null for function return value’;
              ALL_ARGUMENTS.SEQUENCE is ‘Argument sequence, including all nesting levels’;
              ALL_ARGUMENTS.DATA_LEVEL is ‘Nesting depth of argument for composite types’;
              ALL_ARGUMENTS.DATA_TYPE is ‘Datatype of the argument’;
              ALL_ARGUMENTS.DEFAULT_VALUE is ‘Default value for the argument’;
              ALL_ARGUMENTS.DEFAULT_LENGTH is ‘Length of default value for the argument’;
              [b]ALL_ARGUMENTS.IN_OUT is ‘Argument direction (IN, OUT, or IN/OUT)’;
              ALL_ARGUMENTS.DATA_LENGTH is ‘Length of the column in bytes’;
              ALL_ARGUMENTS.DATA_PRECISION is ‘Length: decimal digits (NUMBER) or binary digits (FLOAT)’;
              [/b]ALL_ARGUMENTS.DATA_SCALE is ‘Digits to right of decimal point in a number’;
              ALL_ARGUMENTS.RADIX is ‘Argument radix for a number’;
              ALL_ARGUMENTS.CHARACTER_SET_NAME is ‘Character set name for the argument’;
              ALL_ARGUMENTS.TYPE_OWNER is ‘Owner name for the argument type in case of object types’;
              ALL_ARGUMENTS.TYPE_NAME is ‘Object name for the argument type in case of object types’;
              ALL_ARGUMENTS.TYPE_SUBNAME is ‘Subordinate object name for the argument type in case of object types’;
              ALL_ARGUMENTS.TYPE_LINK is ‘Database link name for the argument type in case of object types’;
              ALL_ARGUMENTS.PLS_TYPE is ‘PL/SQL type name for numeric arguments’;
              ALL_ARGUMENTS.CHAR_LENGTH is ‘Character limit for string datatypes’;
              ALL_ARGUMENTS.CHAR_USED is ‘Is the byte limit (B) or char limit (C) official for this string?’;

              Um grande abraço e espero ter contribuido na solução da sua questão.

              Clayton dos Santos

            Visualizando 5 posts - 1 até 5 (de 5 do total)
            • Você deve fazer login para responder a este tópico.