Query to find when the given schema last refreshed ?

I need to find out the given database schema, when did last get refresh using impdp or import or SQL Loader?

If schema refresh is carried out by dropping schema then Created column in DBA_USERS will show your answer.
Else if its carried out by dropping the tables, then you can check the created and last_ddl_time in DBA_OBJECTS
Select username,created from dba_users where username='U1';
SELECT OWNER,OBJECT_NAME,CREATED,LAST_DDL_TIME FROM DBA_OBJECTS WHERE OWNER='U1';
Please keep forum clean by Marking your Post as Answered or Helpful if Your question is answered.
Thanks & Regards,
SID
(StepIntoOracleDBA)
Email : [email protected]
http://stepintooracledba.blogspot.in/
http://www.stepintooracledba.com/

Similar Messages

  • SQL Query to find when the data was committed

    Hi,
    In oracle how do we find the when the row as committed into DB(Timestamp):
    Eg:
    If insert 1000 records from the application i want to know what is exact time the data was committed in the DB.
    Regards
    NM

    NM wrote:
    Hi,
    Thanks for your Input.
    The Query returned the following.But I want something like this 7/6/2011 6:43:54.23:32:00000 PM(Includes micro seconds)
    SELECT ora_rowscn,orderid FROM tibex_order  where orderid='0NEC.000OXNVE9JYSNQC' ;
    12541143230,0NEC.000OXNVE9JYSNQC
    SELECT SCN_TO_TIMESTAMP(ORA_ROWSCN) FROM tibex_order where orderid='0NEC.000OXNVE9JYSNQC' ;
    7/6/2011 6:43:54.000000000 PMRegards
    NMIt's already giving it to you in nano-seconds.
    What's with this format:???
    But I want something like this 7/6/2011 6:43:54.23:32:00000 PM
                                            ^ ^  ^  ^^^
                                            | |  |  ||+-- what is this colon for?
                                            | |  |  |+--- hundredths of seconds
                                            | |  |  +---- tenths of seconds
                                            | |  +------- seconds
                                            | +---------- minutes 
                                            +------------ hour

  • Query to find when was Receive location last modified

    How can I find the date when was the receive location configuration last modified?

    You need to query the BizTalkMgmtDb database to get details.
    select DateModified from BizTalkMgmtDb..adm_ReceiveLocation
    where name='XXXX'
    Replace XXXX with your receive location name.
    HTH,
    Rachit

  • The document type does not match any of the given schemas. batching

    I am aggregating messages(batching) in Orchestation by calling pipeline. I have send pipeline where I have standard assemble component and custom pipeline in encode to assign some values .
    When I test it I get following error There was a failure executing the send pipeline: "Zones._870.Pipeline.Send870Pipeline, Zones.870, Version=1.0.0.0, Culture=neutral, PublicKeyToken=51b3a99d8425ff5a" Source: "ZonesAssignGUID" Send
    Port: "SendToAX870" URI: "C:\File_Out\Ingram\870\%MessageID%.xml" Reason: The document type "http://schemas.microsoft.com/dynamics/2011/01/documents/Message#Envelope" does not match any of the given schemas.  
    Can somebody help me how to resolve this issue? 

    Yes this is configured schema as envelope schema. This one is deployed in biztalk . I tried whatever suggest below query and return one record. Not sure but looks like error message misguiding here.
    select * from BT_DocumentSpec where msgtype like '%http://schemas.microsoft.com/dynamics/2011/01/documents/Message#Envelope%'

  • Query to find out the time used by an user for an application

    Hello All,
    I want to know the query to find out the whole time used by the user for an application. Please view the below data
    Employee:
    SNO EMP_ID EMP_NAME EMP_DATE LOGIN_TIME LOGOUT_TIME
    1 10 Visu 21-Nov-2010 06:30:00 07:30:00
    2 10 Visu 21-Nov-2010 06:40:00 07:20:00
    3 10 Visu 21-Nov-2010 06:50:00 07:50:00
    4 10 Visu 21-Nov-2010 07:30:00 08:30:00
    5 10 Visu 21-Nov-2010 09:30:00 10:30:00
    By checking the above data we can say that the total time Visu used the application is
    8.30 - 6.30 (From 1,2,3,4 records) = 2hrs
    10.30 - 9.30 (Based on 5th rec) = 1hr
    So the total time Visu used the application would be 3 hrs = 180 mins.
    Could you please help me in getting the result from that data using a query?

    odie_63 wrote:
    I think it may be solved with analytics too.
    with t1 as (
                select 1 sno,10 emp_id,'Visu' emp_name,'21-Nov-2010' emp_date,'06:30:00' login_time,'07:30:00' logout_time from dual union all
                select 2,10,'Visu','21-Nov-2010','06:40:00','07:20:00' from dual union all
                select 3,10,'Visu','21-Nov-2010','06:50:00','07:50:00' from dual union all
                select 4,10,'Visu','21-Nov-2010','07:30:00','08:30:00' from dual union all
                select 5,10,'Visu','21-Nov-2010','09:30:00','10:30:00' from dual
         t2 as (
                select  emp_id,
                        emp_name,
                        emp_date,
                        to_date(emp_date || login_time,'DD-MON-YYYYHH24:MI:SS') login_time,
                        to_date(emp_date || logout_time,'DD-MON-YYYYHH24:MI:SS') logout_time
                  from  t1
         t3 as (
                select  t2.*,
                        case
                          when login_time < max(logout_time) over(
                                                                  partition by emp_id,emp_date
                                                                  order by login_time
                                                                  rows between unbounded preceding
                                                                           and 1 preceding
                            then 0
                          else 1
                        end start_of_group
                  from  t2
         t4 as (
                select  t3.*,
                        sum(start_of_group) over(partition by emp_id,emp_date order by login_time) grp
                  from  t3
         t5 as (
                select  emp_id,
                        emp_date,
                        min(login_time) login_time,
                        max(logout_time) logout_time
                  from  t4
                  group by emp_id,
                           emp_date,
                           grp
    select  emp_id,
            numtodsinterval(sum(logout_time - login_time),'day') time_spent
      from  t5
      group by emp_id
      order by emp_id
        EMP_ID TIME_SPENT
            10 +000000000 03:00:00.000000000
    SQL> SY.

  • Query to find out the list of user who have delete access

    Hi,
    I need a query to find out the list of users who have delete access on perticular folder/universe/ reports  in infoview.
    Please advice.
    Regards,
    Neo.

    orton607 wrote:
    thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
    thanks,
    ortonThis is not possible. The best you could do is to have a good guess.
    Or how would you parse some dynamic statement as this:
       v_suffix := 'loyees';
       v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
       execute_immediate(v_sql);
    ...What is the table name? How do you want to parse that?
    Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts.

  • Query to find all the view name and their size in GB

    Hi,
    What is the query to find all the view name and their size in GB.I am aware of joining all_views and user_segments but this is not serving the purpose.is there any table i need to join to get the desired result
    Thanks

    You could of course be thinking of views as they are stored in other RDBMS' as some of them actually create the view as a table on the database with a copy of the data in it and maintain that data as the base tables are updated.
    As already mentioned, Oracle just stores the SQL of the View and executes that SQL when the view is queried.
    Alternatively, Oracle also has "materialized views" which are created as snapshots of the data and will have a size. This data is updated (refreshed) based on the parameters used when creating the materialized view which means that it will either be, commonly, when a commit is issued or when a refresh is explicitly requested (refresh on demand).

  • Output map: Document Type does not match any of the given schemas

    On a send port, we have a map that uses a custom xslt. We were hoping to somehow design the map so the output was essentially a generic xs:any schema.  But unless we ad a reference from our map assembly to the assembly that holds the actual schema for
    the message pertaining to the map out put we get an error:
    The Messaging Engine failed while executing the outbound map for the message going to the destination URL "C:\BizTalk\Test\%MessageID%.xml"
    with the Message Type http://test#testmessage. Details:"Document type "outputtest#outputtestmessage" does not match any of the given schemas.
    Is there a way to avoid having to have the reference? 

    Hi ,
    In BizTalk messages are distinct from each other based on the message type . In your case http://test#testmessage (Namespace#RootNode)
    Now coming to your case have you verified whether you have a schema type matching the response is deployed with the solution. The easy way is to look into specific BizTalk application schema node .
    If not ,What you can do is to create a new schema for output having "TestMessage" as record and any element inside it. After that apply a mass copy
    funtiod from source t destination(in your case any type schema created).
    Thanks
    Abhishek

  • The document type does not match any of the given schemas

    Hi,
    I have created an envelope schema.To precisely process inbound envelope documents,in the xml disassembler component i have used the Documentspec and envelopespec properties.
    in the properties i have the the schema name,Assemblyname
    but i have got the error like The document type does not match any of the given schemas.
    I have verified the schemas have deployed properly.
    can you help me on this?

    Hi Sujith,
    As pointed out by Johns lot's of thing can cause this. You have to analyze lot of things, but this kind of error indicates that the message type that you are debatching is not deployed. For Example :
    If you are debatching on Order than Order schema should be deployed in the admin console.
    One more point that you need not to specifiy Documentspec and envelopespec properties until and unless there are multiple schema's of same message type deployed in different assembly. The dissasembler component will automaticaly disassemble the messages
    just looking after the body XPATH.
    Regards,
    Rahul Madaan

  • ADF how can i execute a query with parameters when the page renders

    hi
    i am using ADF web 11g
    i need to execute a query with parameters when the page renders
    thanks

    hello,
    I'm a fan of Java code, I really am.
    But when you use ADF, you decided to move to a more declarative environment.
    So why not do it declarative, the adf way?
    In your pagedef insert a action binding.
    This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
    Create an invokeAction in your pagedef and set the condition.
    This example refreshes(Action 2 is execute query) the data.
    First the method binding:
        <action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
                DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
        <invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
    -Anton
    PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming.

  • Need query to find out the sum till a period

    Hi,
    I need to write one query to find out the cumulative sum of raw_cost of table pa_budget_lines till the specified period, I tried to do this by analytical function, but that is not working in Report 10g. Can anybody help me in this.
    Thanks

    not familiar with report but could you do something like this
    with t as
      select 1 grp, 10 * level the_cost, add_months (sysdate,  level) effective_dt from dual connect by  level < 11 union all
      select 2 grp, 5 * level the_cost, add_months (sysdate,  level) effective_dt from dual connect by  level < 11
    input as
      ( select null grp, null the_cost, null running_total,  v_eff_dt effective_dt   from dual)
    select * from(
    select t.grp, t.the_cost, sum(t.the_cost) over (partition by t.grp order by t.effective_dt) running_total, t.effective_dt,
           lead(t.effective_dt) over (partition by t.grp order by t.effective_dt) next_effective_dt,
           input.effective_dt  inp_eff_dt
    from t, input
    where inp_eff_dt between effective_dt and next_effective_dtv_eff_dt would be the input date you are interested in

  • Query to find out the Activities done against a table

    Hi,
    One table has been truncated and data reloaded into the table by the user. But at latter stage user deny that activity. I believe all these activities stored in any oracle 10g database table.
    Need a query to find out the activities done on a specific date say 6th Sep.
    This is too urgent. Thanks in advance

    Hi,
    Welcome to the forum!
    If you don't have enable table auditing maybe you can see last_ddl_time column of user_objects view:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> select * from test2;
          COL1       COL2       COL3
             1          1          3
             1          2          3
             1          3          3
    SQL> select to_char(uo.created, 'DD/MM/YYYY HH24:MI:SS'), to_char(uo.last_ddl_time, 'DD/MM/YYYY HH24:MI:SS') from user_objects uo where uo.object_name = 'TEST2';
    TO_CHAR(UO.CREATED,'DD/MM/YYYY TO_CHAR(UO.LAST_DDL_TIME,'DD/M
    12/09/2009 12:20:26            12/09/2009 12:20:27
    SQL> truncate table test2;
    Table truncated
    SQL> select to_char(uo.created, 'DD/MM/YYYY HH24:MI:SS'), to_char(uo.last_ddl_time, 'DD/MM/YYYY HH24:MI:SS') from user_objects uo where uo.object_name = 'TEST2';
    TO_CHAR(UO.CREATED,'DD/MM/YYYY TO_CHAR(UO.LAST_DDL_TIME,'DD/M
    12/09/2009 12:20:26            12/09/2009 14:01:21
    SQL> Regards,

  • Query to find all the suppliers who has their invoices on hold

    Hi All,
    Query to find all the suppliers who has their invoices on hold (at least 1) .
    Thanks,
    Vamshi

    Pls find the script to find the Hold invoies for those suppliers 
    select aps.VENDOR_NAME,aia.INVOICE_NUM,aia.INVOICE_AMOUNT
    from ap_suppliers aps,ap_invoices_all aia,ap_holds_all aha
    where aia.VENDOR_ID = aps.VENDOR_ID 
    and aia.INVOICE_ID = aha.INVOICE_ID 
    and aha.RELEASE_REASON is null
    Thanks
    Hari

  • Is there a way to find out the given parameter is statis or Dynamic ?

    Hi All,
    Can some one tell me the best way to find out the given parameter is static or Dynamic?
    Thanks & Regards
    Rajesh Meda

    Well, Actually  I know there is a way for checking from RZ11 transaction.
    1.I need to prepare report with all the ABAP parameters  in the system that can be changed on fly
    2.I believe there is one ABAP report that will specify all the dynamic parameters. I need the report name
    Thanks & Regards
    Rajesh Meda

  • When was a SCHEMA last analyzed?

    Hi all,
    How do I know when was our PROD schema last analyzed?
    Thanks

    843228 wrote:
    If I run EXPLAIN PLAN to check my slow running my sql query, is it mandatory that my schema should be latest analyzed? as in today.No. If you want the optimizer to generate an accurate plan, the object statistics need to be accurate. For a mature system, the fraction of rows in a given table that change in a single day is generally quite small so object statistics on most objects in most systems are likely to be accurate for relatively long periods of time.
    Justin

Maybe you are looking for