Export import stats

Hi
Oracle 9i
If I export entire schema stats, can I import only specific index stats?

hi
exec DBMS_STATS.export_schema_stats('&usrname','&tabname')
This syntax will run in 10g. It may fail on 8i – 9i databases with some objects. That’s why I prefer the script on these versions
Generate a script that import statistics on the clone database
The purpose of this script is to generate one import statistics command per table, the source is the table created on step 1.
&tabname = the table created on the previous step to hold the statistics
&usrname = The name of the owner of &tabname
---- script to generate import table stats start here ----------
set linesize 130 pagesize 0
spool impstats.sql
select 'exec dbms_stats.import_table_stats('||chr(39)||owner||chr(39)||','||chr(39)||table_name||chr(39)||',null,'||chr(
39)||'&tabname'||chr(39)||',null,true,'||chr(39)||'&usrname'||chr(39)||')'
from dba_tables where owner ='&usrname'
pls also check full documents
http://blogs.oracle.com/AlejandroVargas/gems/HowtoExportandImportStatisti.pdf
hope this helps
zekeriya

Similar Messages

  • EXPORT IMPORT  STATEMENT NOT WORKING

    hI
       I AM USING THE FOLLOWING STATEMENT BUT THE VALUES ARE NOT COMING IN THE TABLE ACTOR_TAB1
    SUBMIT ZDISPLAY3 WITH P_MFRNR = P_MFRNR
                       WITH P_GFELD = P_GFELD AND RETURN
    IMPORT ACTOR_TAB1 = ACTOR_TAB1 FROM  MEMORY ID 'KAKAL_INS'.
    IN REPORT ZDISPLAY3 I AM USING THE FOLLOWING STATEMENT
      EXPORT ACTOR_TAB = ACTOR_TAB TO MEMORY ID 'KAKAL_INS'.
    IN INTERNAL TABLE ACTOR_TAB1 VALUE IS NOT COMING CAN ANY BODY TELLY WHY VALUE IS NOT GETTING POPULATED

    Hi kota,
    1. When u use memory id, make sure of the
    following points.
    a) The memory id is SAME as the variable name
    b) Memory id should be in CAPITAL
    c) When u want to import,
    the variable name should be same as original one,
    and should be declared in the same fashion only.
    regards,
    amit m.

  • EXPORT & IMPORT Statements..

    Dear Friends,
    Edited by: madan mohan reddy on Feb 19, 2008 11:53 AM

    hi
    good
    check this link hope this would help you to solve your problem.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9df735c111d1829f0000e829fbfe/content.htm
    thanks
    mrutyun^

  • Export/Import subpartition stats

    I hope someone can give me a workaround for this, because it's causing our reports to take longer than they should!
    Background:
    We have some sub-partitioned tables on a 10.2.0.3 database, partitioned daily on the date column, with the subpartitions based on a list of values.
    Overnight, various reports are run. Each report loads its data into the table, and then produces a file based on the data that's been loaded for that report. It is not practical (IMO) to analyze the tables after each report has loaded its data, due to other reports loading their data at the same time.
    As the amount of data loaded into the tables each night does not vary significantly, we export the stats from a previous partition and import them into the new partition as part of the partition housekeeping job (stats imported from old partition, old partition gets dropped, new partition created with same name as the old one, and stats imported). This is done using dbms_sql.export_table_stats and dbms_sql.import_table_stats.
    However, one report which currently loads 43million rows is taking 4.5 hours to run. The size of the load file increases daily, but looking at the history of the report, each relatively small increase causes the report to run a disproportional amount longer (ie. an increase of a similar amount of rows on one night can add twice as much time onto the length of the report than the increase the previous night did).
    We've just implemented some changes to improve the buffer sizes, etc, on the database, in a bid to reduce some of the waits, but this has not improved matters much - the report now runs in 4 hours.
    We know this report can run faster, because in testing, we saw the report run in 60 minutes! Subsequent investigation shows that this was after the partitions had been analyzed, whereas the slow report ran prior to the partitions being analyzed, despite the stats being there for the partition.
    I have now tested the export/import stats process and found that they do not import the stats for the subpartitions. This looks like it is a large part of why the report takes longer before the relevant partitions/subpartitions have been analyzed than it does afterwards.
    Does anyone know of anyway that I can export/import the stats at a subpartition level? (I tried putting a subpartition name in the partition parameter, but I just got an error about it being an unknown partition name.)
    Any help, ideas or workarounds on this will be gratefully received!

    *** Duplicate Post - Please Ignore ***

  • Using set/get parameters or export/import in BSP.

    Hi All,
    Is it possible to use set/get or export/import in BSP?
    We need to set/export some variables from a BADI and get/ import them in the BSP application.
    Code snippet will be of great help..
    Thanks,
    Anubhav

    Hi Anubhav,
    You can use the Export / Import statements for your requirement,
    from the BADI use EXPORT to send the variable data to a unique memory location
    with IDs
    e.g.
    *data declaration required for background processing
          DATA: WA_INDX TYPE INDX.
    **here CNAME is the variable you want to export
    EXPORT PNAME = CNAME TO DATABASE INDX(XY) FROM WA_INDX CLIENT
                SY-MANDT ID 'ZVAR1'.
    and in the BSP application use the IMPORT statement to fetch back the values
    set with the IDs above.
    IMPORT PNAME = LV_CNAME
      FROM DATABASE INDX(XY) TO WA_INDX CLIENT
      SY-MANDT ID 'ZVAR1'.
    deletes the data to save wastage of memory
      DELETE FROM DATABASE INDX(XY)
        CLIENT SY-MANDT
        ID 'ZVAR1'.
    Regards,
    Samson Rodrigues

  • EXPORT - IMPORT in BACKGROUND JOB

    Hello ABAP Gurus,
    There are two programs I am using.
    In 1st Program I am Exporting the Data to the ABAP Memory and then after that scheduling the second program in background from 1st Program through
    1 ) JOB_OPEN
    2 ) SUBMIT
    3 ) JOB_CLOSE
    Now I am trying to Import the data that is Exported in the second program which is scheduled in background.
    But I am not able to Import it.
    My question is that - Does EXPORT - IMPORT Statements works in such scenario when background job is scheduled.
    As it is working fine if, I only submits and does not put in the Background  JOB.
    Looking forward for the answer.
    Helpful answers will definately be awarded.
    Thanks in Advance
    Sudhanshu Garg

    Hi Sudhanshu,
    Export/import to memory uses ABAP memory which will not be accessible by the background job.
    No need of creating the structures in dictionary
    You can use the Table INDX for storing your data in the database.
    See the link below for an example.
    http://help.sap.com/saphelp_45b/helpdata/en/34/8e73a36df74873e10000009b38f9b8/content.htm

  • Export memory statement not working between two methods

    hello all
    i m implementing one BADI MB_MIGO_BADI .this BADI is having 2 methods 1)LINE_MODIFY and 2)PBO_DETAIL.
    the followng is the code in LINE_MODIFY methd
    DATA : c_flag TYPE c .
      TYPES:BEGIN OF tp_ecppa,
            prvsy     TYPE /sapsll/prvsy_spi,
            ecpid     TYPE /sapsll/ecpid_spi,
      END OF tp_ecppa.
      DATA:wl_ecppa TYPE tp_ecppa.
      IF cs_goitem-matnr IS NOT  INITIAL.
       SELECT  prvsy ecpid UP TO 1 ROWS FROM /sapsll/ecppa INTO wl_ecppa WHERE prvsy = cs_goitem-matnr.
       ENDSELECT.
       IF wl_ecppa-ecpid EQ 'DE3203CWIP'.
          c_flag = 'X'.
       ENDIF.
      ENDIF.
    SET PARAMETER ID 'PMEM' FIELD c_flag.
      export c_flag from c_flag  to memory id 'mem1'.
    the following is the code in PBO_DETAIL method
    METHOD IF_EX_MB_MIGO_BADI~PBO_DETAIL.
      IF SY-UNAME = 'E494049' or sy-uname = 'E491754'.
        DATA:C_FLG TYPE C .
        CLEAR C_FLG.
        if gf_class_id eq i_class_id.
    GET PARAMETER ID 'PMEM' FIELD c_FLG.
       Import c_flg to c_flg from memory id 'mem1'.
    IF C_FLG = 'X'.
    E_CPROG = 'ZP1_SCREEN'.
    E_DYNNR = '0001'.
    E_HEADING = 'GTS'.
    ENDIF.
    endif.
    endif.
    free memory id 'PMEM'.
    ENDMETHOD.                    "IF_EX_MB_MIGO_BADI~PBO_DETAIL
    but the new tab is not displayed in MIGO . so i think there is some mistake in  export memory statement .
    so could you please check if i have used export/import statements correctly.

    If problem is rectified, Please mark as answered.
    Sujay

  • How to find export statement for Import statement ?

    hi experts,
    I am having an IMPORT....from memory ID  statement in my program.
    how could i find the location of EXPORT ...to memory ID statement for the IMPORT statement.
    Pls help
    saravanan.

    Not possible if you are just trying to find it without knowing the links between your program and the other programs. You have to know all the objects that relate to the process that your program is automating and then you can probably dig into those related programs to see if there is an EXPORT statement there. But it is not as simple as double clicking on the IMPORT statement or doing a WHERE-USED on the memory ID.

  • Export and import statements

    HI,
    I've developed a report which calls another standard report, which exports values to memory.
    i will import those values to my program. I am calling that standard program in b/g mode.
    I've used wait statement to make the program to wait for a while to update the exported values in the database cluster. This is working fine for small amount of data like 100 records like that.
    It's not working when data is more like more than 500 records. If i run the report in debugging mode i am getting output. But if i run directly (F8) the values are not exporting to memory and not getting the output. Not able to import data with F8, even i increase the wait time and used commit statment in the program.
    what wud be the problem and how can we rectify it?
    points assured for quick response.
    regards,
    Pra

    Hi Praneet,
    Consider the use of CALL FUNCTION <function> STARTING NEW TASK for your background process. Add
    PERFORMING subr ON END OF TASK.
    to continue processing.
    Put the export/import data into function interface.
    Regards,
    Clemens
    Message was edited by:
            Clemens Li

  • Import statement .. what does it do ??

    Hi All,
    What is IMPORT statement doing ??
    IMPORT order_items_in to w_order_items_in from MEMORY ID
    'FREEGOODSTERMS'.
    can you kindly explain what this statement is doing ?
    I was by my friend that this is used to pass order_items from one session to this sesssion, but when I searched for FREEGOODSTERMS, I could find export after this statment. I was wondering how can import me first and then export.
    Please let me know.
    Thanks
    venkat.

    Hello Venkat,
    Sorry for late reply..
    Please see the program which other program submitting somewhere.
    if they are using multiple purpose then export and import statement may possible in one include.
    Best way just use where used list for that include and other programs searching like export and submit..
    For better understanding about export and import then see the below sample programs.
    Create one program and paste below code :
    REPORT  ZTEST_AMEM1.
    tables : lfa1.
    data : begin of i_lfa1 occurs 0 ,
           lifnr like lfa1-lifnr,
           name1 like lfa1-name1,
           land1 like lfa1-land1,
           end of i_lfa1.
    start-of-selection.
    select lifnr
           name1
           land1 from lfa1
           into table i_lfa1 up to 100 rows.
    Export
    export i_lfa1 to memory id 'SAP'.
    submit ztest_amem2 and return.
    write:/ 'hello'.
    Now create one more program  and paste below code :
    REPORT  ZTEST_AMEM2.
    data : begin of j_lfa1 occurs 0,
           lifnr like lfa1-lifnr,
           name1 like lfa1-name1,
           land1 like lfa1-land1,
           end of j_lfa1.
    start-of-selection.
    import i_lfa1 to j_lfa1 from memory id 'SAP'.
    loop at j_lfa1.
    write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.
    endloop.
    Thanks
    Seshu

  • Length error occured in IMPORT statement

    Hello everyone,
    i hv one requirment in PO print(ME23N). in po print asset no nt display without changing other format.
    so that i first copy both smartform and driver program, in that i made certain changes such that i declare the patameter p_ebeln and i comment to data statement of p_ebeln & p_ebeln = nest-objky.
    then i join asset no (anek-anln1) with the help of inner join. then in smartform i gave condition that if bsart = 'ZCAP'
    wa_final-anln1 = gv_anln1.
    endif.
    i import gv_anln1 in smartform and exported in deriver program.
    both are synthetically currect but when i gave print preview dump is occured.
    length error occured in IMPORT statement
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was
         not caught in
        procedure "%GLOBAL_INIT" "(FORM)", nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        During import the system discovered that the target object has
        a different length than the object to be imported.
    what i do?

    Hello,
    can u send me coding for that?
    program line is already created for that
    and their first coding is like that,
    if gv_bsart = 'ZCAP'.
    wa_final-matnr = space.
    endif.
    and in text they fetch matnr no.
    but as per requirement they want asset no when bsart = 'ZCAP'
    how that asset no will come.
    matnr comes there is bsart is other that ZCAP, but bsart = ZCAP they want asset no instead of matnr.

  • Length error occurred in IMPORT statement.

    Hi All,
               while exexuting a program i got dump saying that Length error occurred in IMPORT statement. through ST22 i came to know that both import and export structres are not same. Import structure is longer than the export structure.
             I tried in SDN but i coudnt find any solution. can you please suggest how to solve this.
    Thanks in advance,
    Sreekala.

    Hi,
    Maybe what you can do si....
    Program X
    data: v_var(20) type c.
    export v_var.
    Program Y
    data: v_var(20) type c,
             v_var2(50) type c.
    import v_var.
    v_var2 = v_var.
    Create a variable that is exactly the same with the exporting parameter, then just assign it to a local variable declared in the 2nd program.
    Hope this helps.
    Benedict

  • Problem with EXPORT IMPORT PROCESS in ApEx 3.1

    Hi all:
    I'm having a problem with the EXPORT IMPORT PROCESS in ApEx 3.1
    When I export an application, and try to import it again. I get this error message
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 16, column 28: PLS-00103: Encountered the symbol &amp;quot;牃慥整㈰㈯⼴〲㐰〠㨷㐵㈺′䵐&amp;quot; when expecting one of the following: ( - + case mod new not null &amp;lt;an identifier&amp;gt; &amp;lt;a double-quoted delimited-identifier&amp;gt; &amp;lt;a bind variable&amp;gt; avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp in
    As a workaround, I check the exported file and found this
    wwv_flow_api.create_flow
    p_documentation_banner=> '牃慥整⠤㈰㈯⼴〲㠰〠㨷㠵㈺′äµ
    And when I replace with this
    p_documentation_banner=> ' ',
    I can import the application without the error.
    somebody knows why I have to do this??
    Thank you all.
    Nicolas.

    Hi,
    This issue seems to have been around for a while:
    Re: Error importing file
    I've had similar issues and made manual changes to the file to get it to install correctly. In my case, I got:
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful.<br>ORA-02047: cannot join the distributed transaction in progress<br>begin execute immediate 'alter session set nls_numeric_characters='''||wwv_flow_api.g_nls_numeric_chars||'''';end;There are several suggestions, if you follow that thread, about character sets or reviewing some of the line breaks within pl/sql code within your processes etc. Not sure what would work for you.

  • Regarding Distribution Monitor for export/import

    Hi,
    We are planning to migrate the 1.2TB of database from Oracle 10.2g to MaxDB7.7 . We are currently testing the database migration on test system for 1.2TB of data. First we tried with just simple export/import i.e. without distribution monitor we were able to export the database in 16hrs but import was running for more than 88hrs so we aborted the import process. And later we found that we can use distribution monitor and distribute the export/import load on multiple systems so that import will get complete within resonable time. We used 2 application server for export /import but export completed within 14hrs but here again import was running more than 80hrs so we aborted the import process. We also done table splitting for big tables but no luck. And 8 parallel process was running on each servers i.e. one CI and 2 App servers. We followed the document DistributionMonitorUserGuide from SAP. I observerd that  on central system CPU and Memory was utilizing above 94%. But on 2 application server which we added on that servers the  CPU and Memory utilization was very low i.e. 10%. Please find the system configuration as below,
    Central Instance - 8CPU (550Mhz) 32GB RAM
    App Server1 - 8CPU (550Mhz) 16GB RAM
    App Server2 - 8CPU (550Mhz) 16GB RAM
    And also when i used top unix command on APP servers i was able to see only one R3load process to be in run state and all other 7 R3load  process was in sleep state. But on central instance all 8 R3load process was in run state. I think as on APP servers all the 8 R3load process was not running add a time that could be the reason for very slow import.
    Please can someone let me know how to improve the import time. And also if someone has done the database migration from Oracle 10.2g to MaxDB if they can tell how they had done the database migration will be helpful. And also if any specific document availble for database migration from Oracle to MaxDB will be helpful.
    Thanks,
    Narendra

    > And also when i used top unix command on APP servers i was able to see only one R3load process to be in run state and all other 7 R3load  process was in sleep state. But on central instance all 8 R3load process was in run state. I think as on APP servers all the 8 R3load process was not running add a time that could be the reason for very slow import.
    > Please can someone let me know how to improve the import time.
    R3load connects directly to the database and loads the data. The quesiton is here: how is your database configured (in sense of caches and memory)?
    > And also if someone has done the database migration from Oracle 10.2g to MaxDB if they can tell how they had done the database migration will be helpful. And also if any specific document availble for database migration from Oracle to MaxDB will be helpful.
    There are no such documents available since the process of migration to another database is called "heterogeneous system copy". This process requires a certified migration consultant ot be on-site to do/assist the migraiton. Those consultants are trained specially for certain databases and know tips and tricks how to improve the migration time.
    See
    http://service.sap.com/osdbmigration
    --> FAQ
    For MaxDB there's a special service available, see
    Note 715701 - Migration to SAP DB/MaxDB
    Markus

  • Export/Import and Client Copy

    Hi All,
    Could you please help me with what are the major differences between Export/Import...client copy...and a System Refresh.How they differ from each other.
    Regards
    Rajesh

    Hello Rajesh ,
    I have capture some data from SAP Help :
    Local Copy: Copying Clients Within a System:
    You can improve the performance of the client copy by, for example, by excluding tables or packages, with Edit -> Expert Settings.
    You can exclude tables from the client copy, for example if they are not relevant for the target client, in the Tables tab
    Copying Clients Between Systems (Remote Copy):
    The same product is installed, with the same release, in both systems
    The client copier can copy a client into another system. The systems can be on different platforms. You can change the client number.
    When you copy a client from one system to another, the data is transferred directly via the RFC interface - there is no intermediate storage on hard disk.
    Transporting Clients Between Systems ;Client export (SCC8):
    The client copier can copy a client into another system, which can be on a different platform. You can change the client number.
    You are no longer required to transport clients before you can copy them between systems. You can make a remote copy instead.
    Up to three transport requests are created, depending on the selected copy profile and the existing data.
    The transport request for texts is e.g. only created if the source client contains customer texts.
    <sid>KO<no>  cross-client data
    <sid>KT<no>  client-specific data
    <sid>KX<no>  texts and forms
    The data export is performed automatically asynchronously. The output of the export includes the names of the transport requests that are to be imported.
    Import transport requests into the target client (STMS)
    Choose one of the transport requests of the client transport in the Transport Management System (TMS). The other transport requests belonging to this client transport are then automatically added in the correct order.
    Import these transport requests into the target client.
    client import postprocessing (SCC7)
    You need to perform postprocessing activities to adapt the runtime environment to the current state of the data.
    Copy by Transport Request :
    This function transports customizing changes that have been recorded in a transport request between two clients in a system.
    You can choose whether you only copy the object list of the request or also the object lists of unreleased tasks in the request.
    Entries in the target client are overwritten or deleted according to the key entries in the transport request.
    Choose Administration -> System administration -> Administration -> Client admin. ->Special Functions -> Copy Transport Request.
    <a href="http://help.sap.com/saphelp_nw70/helpdata/en/69/c24c0f4ba111d189750000e8322d00/frameset.htm">For more info Click here</a>
    Regards ,
    Santosh Karadkar

Maybe you are looking for

  • Sensors aren't working

    I don't know if this is the place for such a post,but when i run "sensors",I get the following output : No sensors found! Make sure you loaded all the kernel drivers you need. Try sensors-detect to find out which these are. and when i run sensors-det

  • Delete a selected Library in Aperture

    How do I Delete a Library in Aperture 3.1, especially the Sample Library. Is it possible?

  • Badi in me21n

    Hi all, I have got an requirement to create a BADI for the tcode Me21n. The requirement is , whenever I put a netprice for a purchase group (PG)- material wiese, it has to check a ztable  where amount will be maintained purchase group wise. If it exc

  • Could not determine workspace for application... OWA_UTIL or REQUEST_CHARSE

    Hello, I have a problem with our production/test server running Oracle 10g and APEX 3.0. Sometimes, when I try to log into APEX I get that Could not determine workspace for application... error... After few page refreshes, it works. I had the same pr

  • Help adding an "upload file" button to an interactive form in ID CS6

    Hello, I would like to add a button for users to upload a file to the interactive form I am creating in InDesign CS6. I would like those filling out the form to be able to click a button that opens their finder/windows and then gives them the option