How to generate Oracle Statistics

Hi Team,
I want to execute 18 tables into the production database to generate statistics.
I have executed below command into the local database for testing. Query searched in Google it self.
EXEC dbms_stats.gather_table_stats(‘SCOTT’,’EMP’,cascade=>TRUE);
This query executed but output not display on console. i.e on Screen.
Please suggest me any one, Is it possible to execute 18 tables in a single command? and How to get this output.
Thanks & Regards,
Venkat

Venkat wrote:
Hi Team,
I want to execute 18 tables into the production database to generate statistics.
I have executed below command into the local database for testing. Query searched in Google it self.
EXEC dbms_stats.gather_table_stats(‘SCOTT’,’EMP’,cascade=>TRUE);
This query executed but output not display on console. i.e on Screen.
Please suggest me any one, Is it possible to execute 18 tables in a single command? and How to get this output.
There won't be any output for the package's execution as it would update the database dictionary only. So check and compare the dba_tables , dba_col_statistics etc view before and after running this package.
HTH
Aman....

Similar Messages

  • How to generate oracle report in PCL format

    Hi,
    We are having an issue in our application where the output report(PDF) is getting generated in the Postscript format.
    The first few lines of the output pdf are like this:
    %!PS-Adobe-3.0
    %%Creator: Oracle Toolkit 2 for Motif 10.1.2.0.2 PRODUCTION
    %%Version: 10.1 2
    %%CreationDate: (Tue Feb 12 09:37:10 2013)
    However, the printer which we are using to print these PDF files accepts only PCL format and the print request is failing.
    Is there a way we can change the generated report format into PCL format.
    Any help would be greatly appreciated as this issue is very critical to our application.
    Thanks in advance.

    We are trying to do this directly passing the below parameters
    desformat=PDF&destype=PRINTER&desname=<PrinterName>
    But the issue is the cached file which is getting generated is in PS format(Its on unix server) and printer is not accepting it.
    Even if we keep the output as file and then print the file using lpr command, result is same since the PDF file is in PS format.

  • How to generate oracle sequence using Database Designer Transformer

    I created Entity Relationship Diagram.I can generate Table relavant to that every entity.(using Database Design Transformer).Normaly the Database Design Transformer tries to find a suitable unique key that can be used as the primary key. If it cannot find one, it creates a surrogate primary key.it create sequence for that surrogate key.But I didn't want that.I want generate sequence only the attribute that have primary key.how can i do

    So a digital pulse??

  • How to generate oracle report output in a comma separated format in reports

    Pls any one can help in generation of oracle report in comma separated format in reports 10g.....
    thanks,
    prasad.
    1,Chennai,Nokiasiemen,Convent junction,5535

    Use desformat=delimited.
    http://download.oracle.com/docs/cd/E15523_01/bi.1111/b32122/orbr_howto007.htm#i1040102

  • How to generate multiple output pdf's from one oracle reports

    how to generate multiple output pdf's from one oracle reports.
    I have a report where I have to generate more than one output files from the same report based on a parameter.
    Each output file is for each parameter.
    Is this possible in oracle reports, is so how ?

    You can better post your question in the reports forum instead of this pl/sql forum.

  • How to generate a report direct in PDF with oracle developer 6i

    hi all
    Please help me about this issue.
    THAT How to generate a report directly in PDF using oracle developer 6i.
    Regards
    Yousuf Ahmed Siddiqui

    Hi,
    You can create the Report directly in PDF by setting some of the Report Parameters
    i.e. DESTYPE, DESNAME AND DESFORMAT as follows before calling the Report.
    DECLARE
         PL_ID          PARAMLIST;
         PL_NAME     VARCHAR2(10) := 'param_list';
    BEGIN     
         PL_ID := GET_PARAMETER_LIST (PL_NAME);
         IF NOT ID_NULL (PL_ID) THEN
                  Destroy_Parameter_List(PL_ID);
         END IF;
         PL_ID := Create_Parameter_List(PL_NAME);
         Add_Parameter (PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         Add_Parameter (PL_ID, 'DESNAME', TEXT_PARAMETER, 'c:\test.pdf');
         Add_Parameter (PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'PDF');
            RUN_PRODUCT (REPORTS, 'REPORT_NAME', ASYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, NULL);
    END;Hope this helps.
    Best Regards
    Arif Khadas
    Edited by: Arif Khadas on Apr 22, 2010 9:24 AM

  • How to check the Statistics generated for a table through DBMS_STATS.

    Hi,
    How to check the statistics generated for a Table through DBMS_STATS.GATHER_TABLE_STATS procedure ?
    Please let me know.
    Thanks !
    Regards,
    Rajasekhar

    Rajasekhar wrote:
    Hi,
    How to check the statistics generated for a Table through DBMS_STATS.GATHER_TABLE_STATS procedure ?
    Please let me know.
    Thanks !
    Regards,
    Rajasekharquery ALL_TABLES

  • How to generate .SQL format file from oracle database?

    How to generate .SQL format file from oracle database?
    I have a database of Oracle 8.1.6,now want to generate script file (including table structure,index,etc.) from it,What should I do?
    Thanks.

    Your question pertains to the Database Export/Import. This forum exclusively focusses on the export/import utilities that come along with "Oracle Portal" which is a web-based tool. Could you please post your question under the RDBMS export/import or migration forum.

  • How important is gathering statistics on SYS objects?

    Hi,
    How important is gathering statistics on Data dictionary tables and other X$ tables in SYS schema. Is it bad to keep the statistics. Recently our Sr.DBA has deleted all the SYS schema stats telling that it will inversely affect the DB performance. Is it true?
    Regards
    Satish

    Hi Satish,
    *10g:*
    A new DBA task in Oracle Database 10g is to generate statistics on data dictionary objects which are contained in the SYS schema. The stored procedures dbms_stats.gather_database_stats and dbms_stats.gather_schema_stats can be used to gather the SYS schema stats. Here is an example of using dbms_stats.gather_schema_stats to gather data dictionary statistics:
    EXEC dbms_stats.gather_schema_stats(’SYS’);
    *9i*
    While it is supported in 9.2 to gather statistics on the data dictionary and fixed views, doing so isn't the norm.
    There is a bug fixed only in 10gR2 (not expected to be back-ported to 9.2) that caused this error. The fix is – don’t generate statistics against SYS – especially not the Fixed tables.
    For this query, let's see if we can get a better plan by removing statistics or by getting better statistics, or if we need to do something else to tune it. Take the SYS statistics as before, but with gather_fixed => false.
    I would like for you to test first by deleting the statistics on these two X$ tables and see how the query runs (elapsed time, plan).
    delete_table_stats('SYS','X$KQLFXPL');
    delete_table_stats('SYS','X$KGLOB');
    Then you can take statistics on them using gather_table_stats and check again (elapsed time, plan).
    gather_table_stats('SYS','X$KQLFXPL');
    gather_table_stats('SYS','X$KGLOB');
    The issue with this is that the contents of these fixed views, particularly x$kqlfxpl, can change dramatically. Gathering fixed object statistics may help now and cause problems later as the contents change.
    Warning, this is a bit dangerous due to latch contention, see the following note. I've supported a couple of very busy systems that were completely halted for a time due to latch contention on x$kglob due to monitoring queries (particularly on v$open_cursors).
    Note.4339128.8 Ext/Pub Bug 4339128 - Heavy latch contention from queries against library cache views.
    Hope this answers your question . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference":
    http://www.dba-oracle.com/bp/s_oracle_tuning_book.htm

  • Creteria for generating optimizer statistics

    Dear membes,
    Oracle 10.2.0.2
    os : HP-UX 11i
    I want to know is there any creteria for generating optimizer statistics
    for the production database, like we have a creterai for rebuilding indexes
    through checking the index_stat table.
    Is there any tables present in database for this kind pre checking before
    generating the optimizer statistics.
    Thanks.

    VIRENDER SINGH wrote:
    Dear membes,
    Oracle 10.2.0.2
    os : HP-UX 11i
    I want to know is there any creteria for generating optimizer statistics
    for the production database, like we have a creterai for rebuilding indexes
    through checking the index_stat table.
    Is there any tables present in database for this kind pre checking before
    generating the optimizer statistics.First of all I hope you've heard that rebuilding indexes is something that should only be done under very rare circumstances, see e.g. here or here.
    Since you're on 10g already you should be aware of the fact that the database is coming with a pre-configured default statistics collection job that runs every night and attempts to gather statistics on stale objects (either with no statistics at all or more than 10% changes since the last statistics gathering).
    If you're having an application that modifies large chunks of data in batch jobs, then you should consider gathering statistics right after these batch modifications because otherwise it might take too long until the default job is activated and refreshes the statistics and many execution plans until then might suffer from the incorrect/outdated statistics.
    Ideally you should know your application and data and work out when to gather the statistics and in particular how to gather the statistics and in some cases even use hand-crafted statistics (using the DBMS_STATS.SET__STATS procedures) that lead the optimizer in the desired direction.
    There are many potential pitfalls to consider, e.g. the default method for generating histograms has changed in 10g to "FOR ALL COLUMNS SIZE AUTO" which means you'll get histograms for columns that are used in WHERE clauses (when using equal or range comparisons) and have skewed data or contain large gaps in the values. This was not the case in 9i and not always does the existence of histograms change execution plans for the better, in particular if you're using bind variables.
    In addition 10g introduced the possibility of "out-of-range" predicates which means that the optimizer takes into account if a predicate value is outside the recorded minimum and maximum value of the column. If the gap is becoming significant the selectivity is adjusted and eventually you get an estimate of 1 (or actually 0 adjusted to 1) rows which can have dramatic effects on your execution plans.
    This means you need to be careful if the default "staleness" of 10% changes is applicable to your particular situation otherwise you might be confronted with execution plans that either deteriorate over time and/or "switch" at a certain point in time to a really "bad" plan to due the adjusted selectivity caused by the "out-of-range" predicates. If this is the case you should consider refreshing the statistics more often (using your own logic/job) to avoid such situations.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How to generate jasper report in pdf format using swing

    hi all,
    im new to swing and jasper.. can anybody provide me some example on how to generate the jasper report in pdf format? i will call the reportManager from sessionBean.. below is my code:
    1)delegate:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    GenerateReportDto generateReportDto = getAuditTrailServiceRemote().generateIntoPdfReport(fileName, outputFileName, parameters);
    return generateReportDto;
    2)sessionBean:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    //Map parameters = new HashMap();
    ReportManager reportManager = new ReportManager();
    3)ReportManager()
    public void generateIntoPdfReport(String fileName, String outputFileName, Map parameters) {
              Connection conn = null;
              try {
                   conn = dataSource.getConnection();
                   //Generate the report to bytes
                   File reportFile = new File(fileName);               
                   byte[] bytes =
                        JasperRunManager.runReportToPdf(
                             reportFile.getPath(),
                             parameters,
                             conn
              //conn.close();
              //Write the bytes to a file
              ByteBuffer buf = ByteBuffer.wrap(bytes);
              File file = new File(outputFileName);
              // (if the file exists)
              boolean append = false;
              // Create a writable file channel
              FileChannel wChannel = new FileOutputStream(file, append).getChannel();
              // Write the ByteBuffer contents; the bytes between the ByteBuffer's
              // position and the limit is written to the file
              wChannel.write(buf);
              // Close the file
              wChannel.close();
              } finally {
                   if (conn != null) {
    conn.close();
    Any help would be highly appreciated. Thanks in advance

    Hi ,
    One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
    Read for further info in 'PL/SQL Packages and Types Reference'.
    If you have access to OEM ... you can configure this there using wizard.....
    Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
    http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
    My greetings,
    Sim

  • GENERATING ORACLE REPORT IN ADF

    Hi,
    i need to generate offer letter for student.
    an admin will need to generate offer letter of student bases on their intakeId, branchId, degId, and typeofferletter.
    currently im doing this in adf form. from here how to transfer the information in adf form into offer letter template and print it in pdf?

    Hi,
    actually there are two questions in one:
    1: How to call an Oracle Reports from ADF?
    Answer is to use the Oracle Reports URL to request a report. The data submitted by an ADF form could be passed as URL parameters or - if sensitive information is involved - saved in a temporary table for reports to look it up. Have a look at for an option to download the PDF by referenring the Reports URL http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12419/tagdoc/af_fileDownloadActionListener.html
    2: How to generate PDF from ADF
    Jasper Reports, BI Publisher or POI are the options people use for reporting in ADF. Jasper Reports and BI Publisher allow the creation of PDF documents based on form content submitted from ADF
    Frank

  • Best Practices:: How to generate XML file from a ResultSet

    Hi all,
    Could someone please suggest the best practices of how to generate an XML file from a resultset? I am developing a web application in Java with Oracle database and one of my tasks is to generate an XML file when the user, for example, click a "download as XML" button on the JSP. The application is basically like an Order with line items. I am using Struts and my first thought has been to have an action class which will extend struts's DownloadAction and through StAX's Iterator API to create an XML file. I intend to have a POJO which will have properties of all columns of my order and line items tables so that for each order I get all line items and:
    1. Write order details then
    2. Through an iterator write line items of that order to an XML file.
    I will greatly appreciate for comments or suggestions on the best way to do this through any pointers on the Web.
    alex

    Use a OracleWebRowSet in which an XML representation of the result set may be obtained.
    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/oracle10g/webrowset/Readme.html
    http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/jcrowset.htm

  • How to generate a row in report to compute total?

    Hi:
    I need help to generate a report. In an accounting report, I need to make sum for each client regarding outstanding balance. The format of report is following:
    invoice#, invoice date, invoice amount, paid amount paid date, write off, outstanding balance
    Client Name: Baker Express / Debtor Name: Kurt Weiss inc.
    137308001, 04/18/2012, 438.07, 537.07, 06/05/2012, , (99)
    137308002, 04/18/2012, 100, 90, 06/05/2012, 10,
    client Total: total payment:627.07, total outstanding balance: (99)
    another client and debtor pair
    My question is how to generate total payment and total outstanding balancefor every pair of client and debtor. And there are multiple pairs. I tried to use group by, but how can I display every invoice tuple as well in the report?
    Any help would be appreciated.
    Sam

    One method would be to use ROLLUP in your SQL
    http://www.oracle-base.com/articles/misc/rollup-cube-grouping-functions-and-grouping-sets.php

  • How to generate a report in pdf from a stored proc

    Hi, i need guidance on how to generate a report in pdf from an oracle stored proc.
    The environment is oracle 10gas + 10gdb.
    On a specific event, a PL/SQL stored procedure is called to do some processing and at the end of the processing to generate report which has to be sent to the printer (and optionally previewed by the user).
    Can anyone assist me with this?

    Hi ,
    One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
    Read for further info in 'PL/SQL Packages and Types Reference'.
    If you have access to OEM ... you can configure this there using wizard.....
    Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
    http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
    My greetings,
    Sim

Maybe you are looking for