Question on Exporting Table Stats to another database

I have a question exporting Table Stats from one schema in database A to another schema in another database B.
Currently running Oracle 9.0.2.6 for unix in both prod and dev.
Currently table stats are gathered using the ANALYZE TABLE command. We currently don't use the DBMS_STATS package to gather table statistics.
Question:
If I execute DBMS_STATS.EXPORT_TABLE_STATS in database A can I import them to database B if I'm only using the ANALYZE TABLE to gather table stats? Do I need to execute the DBMS_STATS.GATHER_TABLE_STATS package in database A prior to excuting DBMS_STATS.EXPORT_TABLE_STATS ?
The overall goal is to take table stats from Production in its current state and import them into a Development environment to be used for testing data / processes.
Yes we will be upgrading to Oracle 10 / 11g in near future.
Yes we will be changing our method of gathering table stats by using the DBMS_STATS package.
Thanks,
Russ D

Hi,
If I execute DBMS_STATS.EXPORT_TABLE_STATS in database A can I import them to database B if I'm only using the ANALYZE TABLE to gather table stats? You need using the DBMS_STAT package for get and export statistics process if you want migrate the stats to other database.
Do I need to execute the DBMS_STATS.GATHER_TABLE_STATS package in database A prior to excuting DBMS_STATS.EXPORT_TABLE_STATS ?Yes, you need executing first DBMS_STATS.GATHER_TABLE_STATS.
Good luck.
Regards.

Similar Messages

  • Import/export table stats in 11i

    Hi, Experts:
    A table stats is old in the prod instance and i want to import the stats from a test instance (the same table). I appreciate you if you can tell me the steps.
    Thanks and regards

    Hi;
    What is Db version?EBS version?
    Why u dont run gather stat? If you insist to make import see
    imp STATISTICS             import precomputed statistics (always)
    Regard
    Helios

  • Question on gather table stats.

    Guys,
    I am trying to gather stats on a table and it is taking a long time to finish up ( it had been running for about 28 hours ), after dropping some partitions and creating couple of partitions by splitting the part lead partition I executed the below command for gathering the stats on the table along with the newly created partitions. Our database in on Oracle 10g and OS is windows 2003 server. Can someone please let me know if I am missing any parameters.
    exec dbms_stats.gather_table_stats (-
    ownname => 'TRACK', -
    tabname => 'TRK_DTL_STAGE', -
    estimate_percent => dbms_stats.auto_sample_size, -
    cascade => true, -
    degree => 5);
    Thanks for all your help.

    user12055522 wrote:
    Thanks for the reply. I am not seeing any waits and also I see activity against this session as I looked in the long ops. Will I be better off to kill the current session and just grab the stats for the partitions which I created from the split.How can that be possible that you do not see any waits, it could be that you did not cared to check.
    Killing the existing session would be your decision and i do not see any problem in doing that so far with it.
    Regards
    Anurag

  • PLD export to another Database with 8.8

    HI Experts,
    I looked at the Delta Training on the changes on the PLD and Crystal reports. I want to know how to export a PLD to another database, but did not see where the original file (.b1p) will be stored.
    I need this to enable me to use the Report and Layout Import wizard.
    Any help will be appreciated.
    Marli

    Hi Marli
    yes u can transfer with the Use of Copy Express Addon Given by Sap itself .
    Run Copy express....>File...>New Work Sheet ....>enter ur the company user id and pwsd for  base company ....> then OK .
    select customization -
    >Print Layouts...>Documents & report click on this and list of plds vill appear select the layout which u need to transfer to another database and  go to File menu and save configuration as Xml file ..
    Take the back up of the target company before  transfering the layout
    After that from the same file menu click on Copy configuration to target company  file &  enter the id and pswd now the layout vil be transferred and after finishing copying a message will be populated as copy process is completed .so now open ur transferred datbase and see ur layout has come r not ....
    cheers
    Regards
    Jenny

  • Help on export sybase iq tables with data and import in another database ?

    Help on export Sybase iq 16 tables with data and import into another database ?

    Hi Nilesh,
    If you have table/index create commands (DDLs), you can create them in Developper and import data using one of methods below
    Extract/ Load table
    Insert location method : require IQ servers to be entered in interfaces file
    Backup/Restore : copy entire database content
    If you have not the DDLs, you can generate them using IQ cockpit or SCC.
    http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01773.1604/doc/html/san1288042631955.html
    http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01840.1604/doc/html/san1281564927196.html
    Regards,
    Tayeb.

  • How to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.

    how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method.  thanks

    INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
       SELECT col1, col2, col3, ...
       FROM   sourcedb.dbo.tbl
    Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to copy file from one table to another table at another database

    I need to transfer my tables from one workspace and schema to another workspace and schema. Basically I need to create again all the tables at this new schema. How could I transfer data from tha table at old schema to the table at new schema when this table has files stored in it? (data type is blob)
    thank you so much,
    Silver

    Hello Silver,
    Depending which database you're using (if it's available) I would recommend to use datapump.
    Datapump allows you to copy an entire schema to another database, it's the "new" export/import you might now.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/
    REWARDS: Please remember to mark helpful or correct posts on the forum

  • Moving data from one table to another table in a diferent Database..

    I need to move the data of one table from one database to another table in a different database, is there a way to do this. Do I need the systemn password? or the password of the schema that own the table is enough? the tables are name different, same columns but different name. I know I can do it via sqlldr(creating a file...then runing the ctl file..etc), but I am wonder if it is a different way of doing it?
    Thank you

    Your question is more suitable for the Database-General forum @ General Database Discussions
    (You'll find more DBA's over there, although some of them take a glance over here as well every now and then ;) )
    Do not forget to mention the versions of both databases...

  • Copy table from one database to another database

    Hi,
    I am new to SQL and I have a question on copying a table.
    QUE: copy one table with huge data(around 60millions of rows) from one database to another database(have to create a new table) in the same server. 

    Hi ,
    By mistake ,I understood you want to copy on different server .
    I have rectify above.On same server we can copy Table in many way ;
    As I mentioned Above you can use ;
    select * into [Destination Database].[dbo].[NewTableName] from [SourceDatabase].[dbo].[Category]
    Second;
    select * into [Destination Database].[dbo].[NewTableName] from [SourceDatabase].[dbo].[Category] Where 1=2
    Insert into [Destination Database].[dbo].[NewTableName]
    select * from [SourceDatabase].[dbo].[Category]
    Thanks

  • Question on Creating Table From Insert statement

    Hi,
    I want to create a table using a DBlink from another database using the create/insert statement. Will it also transfer the constraints or do I have to do it manually afterwards? Thanks.
    Create table T1
    SELECT a,b,c from T2 from DB@dblink;

    As discussed above, the constraints, indexes, triggers are not copied. Only NOT NULL constraints are copied.
    Look at this thread Re: Copying table structure.
    for copying triggers/indexes from source table to destination table.
    Thanks,
    Navaneeth

  • Create table statement goes to hang state..in ODI.. in BI database

    Our development team is trying to create an external tabe to another database's schema. ODI is creating the connection bridge inside. I don't know how. But whenever they fire this query it is going to hang state. where as same code is running fine from another database.
    The users by which they are connceting to the source database to fire this query are having same privileges.
    For one database it is working fine as the table is created at the target database and in proper schema but for another it is not working and hanging...(not giving any result)
    Databases are used for BI work and having almost same configurations.
    I have checked the Target database v$session view. It is giving me <enq: PS - contention> event
    and three rows are returning with <PX Deq: Table Q Close> event for other two following rows....
    can anybody throw some light on this? waht should I do now. as killing the blocking session is not solving the problems
    Here is an example of the query executed :
    CREATE TABLE SCHEMA_NAME.C$_0ODS_JDE_F0004
    ( C1_DTSY, C2_DTUCD1, C3_DTRT, C4_DTJOBN, C5_DTUPMJ_DT, C6_DTMRTY, C7_DTDL01, C8_DTPID,
    C9_DTMRCT, C10_DTLN2, C11_DTCNUM, C12_DTUSEQ, C13_DTUSER, C14_DTCDL, JRN_SUBSCRIBER, JRN_FLAG, JRN_DATE )
    ORGANIZATION EXTERNAL
    ( TYPE oracle_datapump
    DEFAULT DIRECTORY DIR_SCHEMA_NAME
    LOCATION ('X58030417C$_0ODS_JDE_F0004_1.EXP' , 'X58030417C$_0ODS_JDE_F0004_2.EXP')
    PARALLEL 2 AS
    SELECT
    NVL(TRIM(F0004.DTSY), ' ') C1_DTSY, NVL(TRIM(F0004.DTUCD1), ' ') C2_DTUCD1, F0004.DTRT C3_DTRT,
    TRIM(F0004.DTJOBN) C4_DTJOBN, J2DT(DTUPMJ, DTUPMT) C5_DTUPMJ_DT, NVL(TRIM(F0004.DTMRTY), ' ') C6_DTMRTY,
    TRIM(F0004.DTDL01) C7_DTDL01, TRIM(F0004.DTPID) C8_DTPID, F0004.DTMRCT C9_DTMRCT, F0004.DTLN2 C10_DTLN2,
    F0004.DTCNUM C11_DTCNUM, F0004.DTUSEQ/10 C12_DTUSEQ, TRIM(F0004.DTUSER) C13_DTUSER,
    F0004.DTCDL C14_DTCDL, ' ' AS JRN_SUBSCRIBER, 'I' AS JRN_FLAG, SYSDATE AS JRN_DATE
    FROM SCHEMA_NAME.F0004 F0004 WHERE (1=1)
    -Regards,
    Saha

    Saha, did you ever get an answer to this? I have the same issue. I thought maybe it had to do with grants on the directory, but that hasn't helped anything.
    Dan

  • Table Data From One DataBase to another

    Dear Fellows,
    There are two DataBases running in my NT Server. I want to pull data of a table from other database. Does any body know how can I do it if I dont want to export and then import.
    Thanks in advance
    Danish

    Please find the help for SQL*PLUS command COPY.
    It will be useful when you want to copy datas from one database from another database without using import & export.

  • Export tables, sequence, and package question

    Hi all,
    I've export table like: exp username/password file=export.dmp log=export.log tables=A statistics=none.
    The export statement above just export only the table "A" structure not the table "A" data. So, how can I move all the data from table "A" to table "B".
    How do I export the sequence, and package and its data also?
    Thank you very much
    Kevin

    Can you create a DBlink in order to do the insert into B select * from A.
    Also, you can use the SQL*Plus Copy command.
    Here are some links for COPY command:
    <br>Copying Data
    <br>copy command
    <br>copy command vs sql*loader
    <br><br>
    Here is a link for moving code:
    <br>exporting packages,function etc. from one user to another.

  • Export tables in a database

    Hi
    I am trying to export the 2 tables using the following command:
    exp obl/obl file=C:\TEMP\dbtables.dmp tables=(Table1, Table2);
    But everytime it exports the first table and then gives the following error:
    EXP-00011: obl.; does not exist
    Export terminated successfully with warnings.
    Does anybody has any idea about it?

    Yes Table2 is an existing table. If I reverse the order of the tables i.e use (Table2, Table1), it exports Table2 and then again gives the same error. I dont know why this is happening.
    I tried another database with 2 different tables and there also i got the same error.
    Seems there is something wrong in my command but cant find out what it is

  • How to update date in a table from another database

    Hello,
    I am trying to code a way to Update my Testing database from another database. In the coding below the database that has the updated data ends in Restore.
    Use ClientDB_MASTER_Restore
    Truncate Table ClientDB_MASTER_Testing.dbo.Activity_Tracking_AZ
    GO
    SELECT * INTO ClientDB_Master_Testing.dbo.Activity_Tracking_AZ
    FROM Activity_Tracking_AZ
    Go
    I know with this Technique the table must be truncated if not deleted first.  There is probably a better way to do this which I'm very open to.  I'm also looking for coding that will roll back any changes made should an error occur.
      As always, any help is greatly appreciated.
    David92595

    USE ClientDB_MASTER_Testing
    go
    SET XACT_ABORT ON
    BEGIN TRANSACTION
    Truncate Table dbo.Activity_Tracking_AZ
    -- SET IDENTITY_INSERT dbo.Activity_Tracking_AZ ON
    INSERT dbo.Activity_Tracking_AZ (col1, col2, ...)
    SELECT col1, col2,
    FROM ClientDB_MASTER_Restore.dbo.Activity_Tracking_AZ
    -- SET IDENTITY_INSERT dbo.Activity_Tracking_AZ OFF
    COMMIT TRANSACTION
    If you find it boring to type the column lists, just find the table in Object Explorer, and drag the columns node to where you want the column list.
    You need the SET IDENTITY_INSERT command if the table has an IDENTITY column.
    By wrapping the code in a transaction, you are not left with an empty table if the INSERT fails. The command SET XACT_ABORT ON makes sure that the batch is aborted and rolled back in case of an error.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • Advanced? Network Setup Help

    Hi All, I revisited my network problems (posted earlier) and everything is now working peachy. My current setup: cable modem -> airport extreme -> wireless computers (wan) | ---> linksys router ---> VOIP |--> Buffalo Linkstation |--> wired computer O

  • Battery life while recording

    I would like to buy a creative mp3 player but i need to record conventions transmited by fm frequency. I need at least 8 hours of battery life to record a hole day. I also work out, so i need a leight mp3 player. Does the "Zen V Plus" or the "Zen nee

  • Oracle ADF Mobile getting array of objects from webservice

    hi, i am trying to fetch a certain number of records using a webservice call and then storing in the SQLLite DB in the mobile. i understand i can create a data control using the webservice > then? my webservice returns an array of objects. how can i

  • Check lot printing

    Dears, I have configured the cash journal printing to be printed in pdf, but i could not set check lot to be printed as pdf .so, can anyone help me in how to print check lot from FBCJ in PDF form Thanks a lot and appreciating your quick response

  • Taking a screenshot while touching the screen with iOS6

    Hello, Ever since I updated my iPhone 4S to the new iOS6 I noticed I can't take screenshots while touching the screen, for example - if I want to take a screenshot of a text message while rolling up the screen (so that only a certain part of the scre