Passing arrays through multiple PL/SQL procedures and functions

I am maintaining a large PL/SQL application. There is a main procedure that is initially called which subsequently passes information to other PL/SQL functions and procedures. In the end an error code and string is passed to PUT_LINE so it can be displayed. What I would like to be able to do is have an array that stores an error code and string for each error that it comes upon during going through each of the procedures and functions. This would involve passing these codes and strings from function to function within the pl/sql application. What would be the best way to implement this and is it possible to pass arrrays or records to other PL/SQL functions? Thanks.

Here is one simulation ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.20
satyaki>
satyaki>
satyaki>create or replace type n_array is table of number;
  2  /
Type created.
Elapsed: 00:00:07.10
satyaki>
satyaki>CREATE OR REPLACE PROCEDURE Get_Array(array_in IN n_array,
  2                                        array_out OUT n_array)  
  3  IS
  4  BEGIN 
  5    array_out := n_array(); 
  6    FOR i IN 1..array_in.count 
  7    LOOP 
  8      array_out.extend; 
  9      array_out(i) := array_in(i) * 2; 
10    END LOOP;
11  END Get_Array;
12  /
Procedure created.
Elapsed: 00:00:00.89
satyaki>
satyaki>
satyaki>Create or Replace Procedure Set_Array(myArray IN n_array)
  2  is  
  3    i   number(10);  
  4    rec emp%rowtype;  
  5    w n_array:=n_array(1200,3200);
  6    bucket n_array := n_array();
  7  Begin
  8    Get_Array(w,bucket);  
  9   
10    for i in 1..myArray.count  
11    loop 
12      select *  
13      into rec 
14      from emp 
15      where empno = myArray(i); 
16      dbms_output.put_line('Employee No:'||rec.empno||' Name:'||rec.ename);
17      for j in 1..bucket.count
18      loop
19        dbms_output.put_line('Commission Sub Type: '||bucket(j));
20      end loop;
21    end loop; 
22  End Set_Array;
23  /
Procedure created.
Elapsed: 00:00:01.33
satyaki>
satyaki>
satyaki>select * from emp;
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
      7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
      7566 JONES      MANAGER         7839 02-APR-81       2975                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
      7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
      7839 KING       PRESIDENT            17-NOV-81       7000                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7900 JAMES      CLERK           7698 03-DEC-81        950                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
13 rows selected.
Elapsed: 00:00:00.28
satyaki>
satyaki>declare
  2    v n_array:=n_array(9999,7777);  
  3  begin  
  4    Set_Array(v);  
  5  end;
  6  /
Employee No:9999 Name:SATYAKI
Commission Sub Type: 2400
Commission Sub Type: 6400
Employee No:7777 Name:SOURAV
Commission Sub Type: 2400
Commission Sub Type: 6400
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.15
satyaki>
satyaki>Regards.
Satyaki De.

Similar Messages

  • How to test PL/SQL procedures and functions?

    What are the proven ways to test pl/sql procedures and functions? Specifically, procedures and functions that take cursor variables as IN OUT parameter, OR procedure and functions that takes an array as IN parameter?
    Thx.

    HI,
    One way could by using PL/SQL Develper tool, see Tools/Test Manager...
    Also there are others tools, see [Cleaning Up PL/SQL Practices|http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_plsql.html] and specifically oUnit
    Regards,
    PS: Your question is very general, could you provide an specific example you are trying?
    Edited by: Walter Fernández on Nov 11, 2008 4:04 PM - Adding PS

  • Are the Pl/sql procedure and function atomic by themself

    i want to ask a question does oracle pl/sql procedure and function support Atomicity for the database by themself , or they became atomic incase we call them using begin -- end;

    You appear to be discussing transaction scope which is completely independent of PL/SQL blocks like procedures or how you call procedures. It's all in where commits (or rollbacks) are issued.
    If you have a procedure like this
    CREATE PROCEDURE p1
    AS
    BEGIN
      INSERT INTO some_table( key, value ) VALUES( 1, 'Foo' );
      INSERT INTO some_table( key, value ) VALUES( 1, 'Bar' );
    END;where the first statement succeeds and the second statement fails as a result of a duplicate key, there will still be a Foo row in the table but the procedure will have thrown an exception. The caller of the procedure may choose to commit or rollback the change-- that will determine whether the first statement's results are made permanent. If you have a procedure like this,
    CREATE PROCEDURE p1
    AS
    BEGIN
      INSERT INTO some_table( key, value ) VALUES( 1, 'Foo' );
      commit;
      INSERT INTO some_table( key, value ) VALUES( 1, 'Bar' );
    END;the commit will make the first insert permanent regardless of whether the second statement fails no matter what the calling code does (that's one reason that putting commits in stored procedures is generally a bad idea-- the caller is in a much better position to know what other uncommitted work has been done and whether it is safe to commit.
    Justin

  • PL-SQL Procedures and Functions

    Hi All,
    while reading about PL-SQL Procedures I came across a concept, which states that we can not include bind or host variables in procedures because the compiler cannot resolve the reference to bind variable.
    Can someone please explain it more elaborately.
    Thank you.

    983037 wrote:
    while reading about PL-SQL Procedures I came across a concept, which states that we can not include bind or host variables in procedures because the compiler cannot resolve the reference to bind variable. Correct. This code cannot compile as it needs a bind variable to be bound:
    create or replace function GetEmpName return varchar2 is
      empName emp.ename%Type;
    begin
      select
        e.ename into empName
      from emp
      where emp_no = :BIND_VARIABLE;
      return( empName );
    end;Stored code cannot include bind variables as how is Oracle's compiler to know the data type of +:BIND_VARIABLE+ - or execute the function at run-time when the code is already compiled, but missing a bind call to supply a value for +:BIND_VARIABLE+ ?
    So the code needs to look as follows instead:
    create or replace function GetEmpName( empID number ) return varchar2 is
      empName emp.ename%Type;
    begin
      select
        e.ename into empName
      from emp
      where emp_no = empID;
      return( empName );
    end;The empID PL/SQL variable will be treated (transparently) as a bind variable when the SQL SELECT statement in that function is parsed and executed as a SQL cursor.
    You as caller, however need to supply bind variables when calling this function from an external client (e.g. SQL*Plus, Java, C/C++, etc). E.g.
    --// using sqlplus as example - create 2 sqlplus host variables
    var name varchar2(100)
    var id number
    --// assign a value to a host variable
    exec :id := 12345;
    --// execute the stored function code binding host variables as bind variables
    begin
      :name := GetEmpName( :id );
    end;
    --// display host variable
    print name

  • Update the passed XML in a PL/SQL procedure and then use DBMS_XMLSAVE

    hi folks,
    This is a great forum and most of you guys were awesome in replying to complex queries........
    I have a small issue, I am trying to do a bulk insert from my application by constructing an XML result set and pass that XML to the SP as a CLOB and using DBMS_XMLSAVE package to insert it to the oracle table. It works like a charm for me when this is as straight forward as this. But when my requirement is, I need to generate sequence numbers for a particular column (Primary key column), while for other columns I pass values from the UI (as a XML object which my SP accepts as a CLOB), i am at a loss for solution to achieve this. It would mean, that I have to generate the sequence numbers for each row and then update this value to the passed XML clob. Any indicators on how to achieve this?
    I found this solution at one of the thread which might most probably help me,
    declare
    2 l_cnt number;
    3 begin
    4 select count(*) into l_cnt from books,xmltable('/Books/Book' passing object_value);
    5 for i in 1..l_cnt loop
    6 update books set object_value =
    7 updatexml(object_value,'/Books/Book['||i||']/BookID', xmlelement("BookID",sequence_bookid.nextval))
    8 where existsnode(object_value,'/Books/Book['||i||']')=1;
    9 end loop;
    10 end;
    11 /
    But here, they are trying to update a XMLTable book, but in my case the XML is a clob object and not a XML table. Will this solution work for my case as well? Please provide any pointers to me... Thanks...

    First if your version of Oracle has DBMS_XMLSTORE, use that instead.
    Reason: {thread:id=876376} (See Marco's response).
    It is possible you could run into issues, but you should start with DBMS_XMLSTORE.
    Since you will have the XML in the SP, treat the data as an XMLType instead of a CLOB for as long as you can since you need to do UpdateXML on it.
    For your sample PL/SQL code, lines 4-5 are replaced with the WHILE loop shown in Method 2 at
    {message:id=3610259}.
    The UPDATE would be replaced with the following pseudocode
    SELECT UPDATEXML(<l_xmltype_variable>, ...)
    INTO <l_xmltype_variable>
    FROM dual;
    Once your loop is done, l_xmltype_variable would contain your updated XML and then you can use that XMLType directly on the call to DBMS_XMLSTORE or convert it back to a clob via
    l_clob_variable := l_xmltype_variable.getClobVal();

  • Using PL/SQL procedure and function

    In a page i have a VO that uses a Where clause that looks like this
    WHERE attr=package.function
    where the function returns a value of an internal variable valued by another procedure in the package which considers only the Dbuser DBSchema as parameters.
    Do i have to call the procedure in a method like initializeBindigsForPage or i have to put it in another place? And in which mode?
    Thanks Marco

    hi satish,
    i tried ur suggestion, but its shows error like
    declare
    o1 number;
    total_bytes number;
    o3 number;
    unused_bytes number;
    o5 number;
    o6 number;
    o7 number;
    b number:=0;
    str varchar2(2000);
    cursor name is select TNAME FROM TAB WHERE TABTYPE='TABLE';
    begin
    FOR VAL IN name
    LOOP
    DBMS_SPACE.UNUSED_SPACE('XMLUSER',VAL.TNAME,'TABLE',o1,total_bytes,o3,unused_bytes,o5,o6,o7);
    --dbms_output.put_line(VAL.TNAME);
    --dbms_output.put_line(total_bytes);
    --dbms_output.put_line(unused_bytes);
    EXECUTE IMMEDIATE 'select count(*) from '||VAL.TNAME||' ' RETURNING into b;
    --select count(*) into b from VAL.TNAME;
    --execute immediate(str);
    dbms_output.put_line(b);
    insert into space values(VAL.TNAME,total_bytes,unused_bytes,b);
    END LOOP;
    end;
    SQL> @space.sql
    declare
    ERROR at line 1:
    ORA-06547: RETURNING clause must be used with INSERT, UPDATE, or DELETE
    statements
    ORA-06512: at line 19
    wat goes wrong satish?

  • TTClasses interface for PL/SQL procedure and fetching its results

    Hi experts,
    I am using TimesTen Release 11.2.1.3.0;
    I created a simple PL/SQL procedure as follows in timesten-
    Command> create or replace procedure employee(eno in emp.empno%type) is
    > e_name emp.ename%type;
    > begin
    > select ename into e_name from emp where emp.empno = eno;
    > dbms_output.put_line(e_name);
    > end;
    > /
    And then I call it through TTClasses as
    TTCmd cmd, compilecmd;
    compilecmd.Prepare(conn,"alter procedure employee compile;",status);
    cmd.Prepare(conn,"begin employee(1020); end;",status);
    cmd.Execute(..);
    cmd.FetchNext(..);
    Here fetchNext is returning an error -
    [TimesTen][TimesTen 11.2.1.3.0 ODBC Driver]Invalid cursor state
    *** ODBC Error/Warning = 24000, TimesTen Error/Warning = 0
    *** Unable to fetch row for statement: <begin employee(1020); end;>.terminate called after throwing an instance of 'TTError'
    Aborted
    How can I run PL/SQL procedures/functions on TimesTen through TTClasses interface?
    Any help or input would be of great value.
    Thanks

    The issue here is nothing to do with TTClasses. Your PL/SQL procedure executes a SELECT statement (that returns just one row) using an implicit cursor within the PL/SQL procedure and retrieves the value of the ename column into the PL/SQL variable. However it does not them do anything with that value such as pass it back to the caller...
    Similarly, the TTClasses code executes a statement that it is expecting to create an ODBC level cursor 9which thsi PL/SQL invocation will not of course) and it is then trying to fetch from a cursor that does not exist.
    I would recommend that you take a look at the TimesTen PL/SQL documentation (Oracle® TimesTen In-Memory Database PL/SQL Developer's Guide Release 11.2.1) and refer to the section on IN, OUT and IN/OUT parameters. This will show you how you can use OUT parameters to return values to the caller. This technique works fine for ODBC, JDBC and OCi programs but does not sadly currently work with TTClasses. TTClasses has not yet been enhanced to support OUT and INOUT parameters. Of course as you have the source code for TTClasses you could make the necessary modifications yourself.
    I will open a bug requesting that TTClasses support OUT and INOUT parameters but in the meantime if you need this kind of capability you will need to either modify TTClasses yourself or switch to using a different API.
    Chris

  • How to get a list of values used in the WHERE filter of stored procedures and functions in SQL Server

    How can I get a list of values (one or more) used in the WHERE filter of stored procedures and functions in SQL Server?
    How can get a list of values as shown (highlighted) in the sample stored procedure below?
    ALTER PROC [dbo].[sp_LoanInfo_Data_Extract] AS
    SELECT   [LOAN_ACCT].PROD_DT,
                  [LOAN_ACCT].ACCT_NBR, 
                  [LOAN_NOTE2].OFCR_CD, 
                  [LOAN_NOTE1].CURR_PRIN_BAL_AMT, 
                  [LOAN_NOTE2].BR_NBR,
    INTO #Table1
    FROM
                    dbo.[LOAN_NOTE1],
                    dbo.[LOAN_NOTE2],
                    dbo.[LOAN_ACCT]
    WHERE
                    [LOAN_ACCT].PROD_DT = [LOAN_NOTE1].PROD_DT
                    and
                    [LOAN_ACCT].ACCT_NBR = [LOAN_NOTE1].ACCT_NBR
                    and
                    [LOAN_NOTE1].PROD_DT = [LOAN_NOTE2].PROD_DT
                    and
                    [LOAN_NOTE1].MSTR_ACCT_NBR = [LOAN_NOTE2].MSTR_ACCT_NBR
                    and
                    [LOAN_ACCT].PROD_DT = '2015-03-10'
                    and
                    [LOAN_ACCT].ACCT_STAT_CD IN
    ('A','D')
                    and
                    [LOAN_NOTE2].LOAN_STAT_CD IN
    ('J','Z')
    Lenfinkel

    Hi LenFinkel,
    May I know what is purpose of this requirement, as olaf said,you may parse the T-SQL code (or the execution plan), which is not that easy.
    I have noticed that the condition values in your Stored Procedure(SP) are hard coded and among them there is a date values, I believe some day you may have to alter the SP when the date expires. So why not declare 3 parameters of the SP instead hard coding?
    For multiple values paramter you can use a
    table-valued parameter. Then there's no problem getting the values.
    If you could elaborate your purpose, we may help to find better workaround.
    Eric Zhang
    TechNet Community Support

  • How to insert BLOB datatype image using PL/SQL Procedure and SQL Loader

    Hi,
    How to insert an image into database using PL/SQL Procedure and also how to insert using SQL Loader. Please help by giving sample code and process description.
    Thanks,
    Vijay V

    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:232814159006

  • How to test procedures and functions of pl/sql

    I am working as a QA basically i got a new assignment of testing functions and procedures, and packeged bodies. Can any one help me in this matter.
    Please help me.
    Hi i am new to oracle I want to test procedures and functions,
    and packaged bodies of pl/sql.

    It depends on what you meant by "testing". I guess you need to check that routines (functions, procedures, packages etc) in valid state and execute without errors. The simpliest way is to get some development tool like TOAD (http://www.quest.com), Oracle Maestro (http://www.sqlmaestro.com) or PL/SQL Developer (http://www.allroundautomations.com). You can connect with them to database and look at the routine state VALID or INVALID. You can recompile them, run and even debug. I guess this should be enough.
    Alternatively you can do same thing from sqlplus. Of course with lesser comfort. You need to write certain SQL statements. For example i want to find invalid procedures:
    SQL> select OBJECT_NAME, OBJECT_TYPE from USER_OBJECTS where STATUS='INVALID';
    To check how procedures work you need to execute anonymous PL/SQL block like this:
    declare
         /* local variables declaration */
         NAME VARCHAR2(4000);
         PRESIDENT_ID NUMBER(38);
         ID NUMBER(38);
    begin
         /* setting up variables */
         NAME:='MICROSOFT';
         PRESIDENT_ID:='BILLY';
         ID:=NULL;
         /* calling routine */
         GEOMETRY.ADD_COMPANY(NAME,PRESIDENT_ID,ID);
    end;

  • Call a PL/SQL procedure or function from applet

    Could anyone please let me know how I could call a PL/SQL procedure
    or function from a JDBC method from applet with Internet Explorer?

    It depends from where you are calling your PLSQL routine. If it is SQL*Plus then you can use & (ampersand) with the variable to be input at run time.
    If you are executing the PLSQL routine from another application (some front end application) then it's not possible. Because when a procedure is executing at server side, the front end application does not have control, and the control is only transfered back to front end application when the PLSQL routine either completes successfully or throws an exception.
    In either case, you can not go back to the PLSQL routine.
    In this case, what you can do is, write code in your front end application to get that variable value from user and then pass that value to PLSQL routine.

  • Regarding Procedures and functions

    can we pass a cursor,table or ref cursor to a procedure and functions and can a function return cursor,table or ref cursor to a procedure and functions?please if possible give some examples with explanations
    thanks in advance..

    Hi,
    The definition for a Procedure or Function can be edited by selecting Edit from the drop-down menu for the Procedure/Function object in the Browser.
    The definition can then be edited as text, and so Table, REF CURSOR, ... parameters or return types can be added.
    (After completing the edit, select Save from the File menu, or alternatively Close the tab displaying the definition and select Yes to the Save Changes dialog.)
    The Oracle Database PL/SQL Language Reference documentation contains some examples of Procedure and Function definitions.
    David

  • Difference between procedure and function

    hi
    please give solution to below discussion:
    Interviewer: What is the difference between Procedure and Function ?
    Myself: Procedure may or may not return a value and can return multiple values and Function must return a value.
    Interviewer : Can function return multiple values ?
    myself: Yes, It can return multiple values.
    Interviewer: Then, there is no need to use procedures any more, according to your previous answer (function can return multiple values) "we can do all the things by using procedures by using functions". Then why there is differentiation between procedure and function ?
    myself : no reply (simply frustated at this question)
    The above is conversation between me and interviewer.
    Please suggest me what would be my reply to above topic.
    In one book i find that using functions we can return multiple values but it is poor programming practice.
    why this is a programming practice ?
    please suggest me solution
    thanks in advance
    prasanth as.

    Another difference is function must return something. There is no such restriction on procedure.In fact, a procedure CANNOT contain an expression in its RETURN statement.
    SQL> create or replace procedure test_return is
      2  begin
      3    return(10) ;
      4  end ;
      5  /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TEST_RETURN:
    LINE/COL ERROR
    3/3      PLS-00372: In a procedure, RETURN statement cannot contain an
             expression
    3/3      PL/SQL: Statement ignored
    SQL>And, a procedure cannot be called as part of a expression (it must be a function).
    SQL> create or replace procedure test_return is
      2  begin
      3    return ;
      4  end ;
      5  /
    Procedure created.
    SQL> variable x number ;
    SQL> exec :x := test_return ;
    BEGIN :x := test_return ; END;
    ERROR at line 1:
    ORA-06550: line 1, column 13:
    PLS-00222: no function with name 'TEST_RETURN' exists in this scope
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    SQL>

  • How can I use the procedures and functions in my library

    hello, all
    I have a pl/sql library MYLIB.pld, MYLIB.pll and MYLIB.plx.
    How can I invoke procedures and functions there in JDeveloper?
    Thanks.
    Damon

    I am indeed using ADF BC to re-develop the oracle application.
    Here is my situation:
    We have an oracle form application.
    Our objective is to try to re-use the existing sources in the form application as much as possible:
    1. tons of procedures and functions in a pl/sql library(a file with extension name portfolioLib.pll or portfolioLib.plx);
    2. tons of form-level triggers, data-block triggers and item-triggers;
    3. tons of database stored procedures and triggers;
    After doing a research on JDeveloper, we decide to use ADF Swing+ADF BC to re-develop the application.
    My opinion for the above three kinds of sources in our form application is:
    for 1: we try to move most of procedures and functions into database(except Form build-in);
    for 2: we try to wrap those triggers in a SQLJ class;
    for 3: we try to call database procedures and functions with PreparedStatment or CallableStatement;
    I just do a test on a post-query trigger on a data-block:
    I created a sqlj file, named testSQLJ.sqlj in the test.view package;
    I tried to call it in createInstanceFromResultSet of testDeptVOImpl.java which is test.model package,
    I was told that testSQLJ cannot be found there. why?
    How can I call some classes from test.view package in some classes of test.model?
    I read some documents about how to deal with post-query trigger in JDeveloper: create a view with SQL statement, but it seems that it does not support pl/sql statement there.
    Can you give me some opinion about the above stuff?
    I really appreciate your help.
    Damon

  • Differences between procedures and functions.

    a little confusing ..in differences between procedures and functions..
    1. Can a function return only single value?? cant we return multiple values?
    2. Can we use 'out' parameter and 'return' clause at a time in the same function
    thank you

    Hi,
    newbie wrote:
    a little confusing ..in differences between procedures and functions..
    1. Can a function return only single value?? cant we return multiple values?Yes, a function can only return a single value.
    If the return type is some kind of collection or data structure, then that 1 collection or data structure can, of course, actually contain many sep[arate values.
    If you want to return multiple values, use a PROCEDURE with multiple OUT arguments.  (Functions can have OUT arguments, too, but avoid defining functions with OUT arguments.  It can cause a lot of confusion.)
    2. Can we use 'out' parameter and 'return' clause at a time in the same functionSure, but don't take my word for it.  Try it and see.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • SM37: job sends message even when report list is empty

    Dear gurus, I run job over transaction VD59 - the result of this report is sent to recepient via email. Even when VD59 gives no results (no rows), recepient receives empty message. Can I somehow set that in the case of empty result list job sends no

  • Epson R2400 not printing correctly!

    Hi, I hope somebody can advise me, I have problems since installing leopard and can't solve them: 1. When I try to print a photograph from Photoshop CS3 using Leopard, the picture is almost colorless( if I print from CS3 using Tiger the colors are co

  • Cannot set selectOneChoice value during reload (value auto become null)

    Dear all, I have a problem that getting null value in the SelectOneChoice field in a table binded to a view object. If I change that SelectOneChoice to inputText, it works perfectly. The details of the situation is described as follows: I've binded a

  • Idvd6 to burn on an external dvd burner

    I am running Osx 10.3.9 and have idvd4. Unfortunatly i have an external dvd burner and idvd4 will not burn to this. Will idvd6 work on my system as Ive heard this works with an external burner.

  • BOXI R2 logs

    We have a BOXI R2 environment which is running on Windows 2003. Although there are event logs for what is happening on BOXI, we were not able to find anymore logging. Is there some way that we can turn on a more detailed logging (some setting)? What