Export import stats

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

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(
from dba_tables where owner ='&usrname'
pls also check full documents
hope this helps

Similar Messages


                       WITH P_GFELD = P_GFELD AND RETURN

    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.
    amit m.

  • EXPORT & IMPORT Statements..

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

    check this link hope this would help you to solve your problem.

  • 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!
    We have some sub-partitioned tables on a 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..

    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
    *data declaration required for background processing
    **here CNAME is the variable you want to export
                SY-MANDT ID 'ZVAR1'.
    and in the BSP application use the IMPORT statement to fetch back the values
    set with the IDs above.
      SY-MANDT ID 'ZVAR1'.
    deletes the data to save wastage of memory
        ID 'ZVAR1'.
    Samson Rodrigues


    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.

  • 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.
       IF wl_ecppa-ecpid EQ 'DE3203CWIP'.
          c_flag = 'X'.
      export c_flag from c_flag  to memory id 'mem1'.
    the following is the code in PBO_DETAIL method
      IF SY-UNAME = 'E494049' or sy-uname = 'E491754'.
        DATA:C_FLG TYPE C .
        CLEAR C_FLG.
        if gf_class_id eq i_class_id.
       Import c_flg to c_flg from memory id 'mem1'.
    IF C_FLG = 'X'.
    E_DYNNR = '0001'.
    E_HEADING = 'GTS'.
    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.

  • 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

    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

    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.

    Hi Praneet,
    Consider the use of CALL FUNCTION <function> STARTING NEW TASK for your background process. Add
    to continue processing.
    Put the export/import data into function interface.
    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
    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.

    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 :
    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.
    select lifnr
           land1 from lfa1
           into table i_lfa1 up to 100 rows.
    export i_lfa1 to memory id 'SAP'.
    submit ztest_amem2 and return.
    write:/ 'hello'.
    Now create one more program  and paste below code :
    data : begin of j_lfa1 occurs 0,
           lifnr like lfa1-lifnr,
           name1 like lfa1-name1,
           land1 like lfa1-land1,
           end of j_lfa1.
    import i_lfa1 to j_lfa1 from memory id 'SAP'.
    loop at j_lfa1.
    write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.

  • 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.
    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?

    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.
    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,

    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.

  • 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
    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.

    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

    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.

    > 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.
    --> FAQ
    For MaxDB there's a special service available, see
    Note 715701 - Migration to SAP DB/MaxDB

  • 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.

    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

  • Error in filling the table.

    Hi to all         I am trying to fill the setup table for 2lis_03_bf.But i am getting the following error : No extract structure active or no bw connected. when i intimated to onsite team this very simple issue i ahve to active the D.S.When i checked

  • Sales Analysis - Error

    Hi I assigned the role 'com.sap.pct.best.EC_Sales' and was able to see a menu 'Sales Analysis'. I have created the System alias as 'SAP_BW_BP'. When i click on the link it gives an Error. Portal Runtime Error An exception occurred while processing a

  • Comparison of text features with

    Hi! We are using oracle text ( at one customer (CLOBS + BLOB CONTEXT indizes)! Which new oracle text features (which really work properly) could motivate us to migrate to If someone has already experience with oracle text in 10gR2 p

  • Table scrolling...

    I have a user who is using the compensation workbench and they are wanting the ability to scroll vertically through the table while the headings stay stationary as you can do in Microsoft Excel. The specific page she is using is: /oracle/apps/ben/sel

  • I cannot see the verification letters when asked to type them in. What can I do?

    If I need to post on Craigslist, etc, they will ask me to type the letter seen above, and I cannot see any letters there. Therefore, I cannot post on any website . What can I do? These are verification letters/numbers.