1 Reply Latest reply on Jun 8, 2020 5:03 PM by jaramill

    Need help getting dbms_utility.get_time variable working in sqlplus script

    2841314

      I have never asked for help here, but here goes.

       

      i am trying to create an sqlplus sql file that can connect to a database.a

       

      I need to find the time to connect via a variable so that I can test the difference.

      So I am trying to use dbms_utility.get_time

       

      I have seen examples, on

       

       

      set serveroutput on

       

      variable ntime number

       

      :ntime := dbms_utility.get_time

       

      connect

       

      :ntime := (DBMS_utility.get_time - :ntime) / 100 to get it into seconds.

       

      I have never been able to see the value of :ntime

       

      But I never see the :ntime value

       

      NOTE: I want to do this programatically so I AM not going to use sqlplus set timer on

       

      And I was told I cant do a execute immediate of connect with a block.

       

      Help