PS Script to obtain performance data for 6 months last VM

Hi all

Its time for me to Rightsize the virtual machines before business continues in vSphere 5.0... We all know... vRAM

If I want to import virtual machines from a CSV file and run through the past 6 mth performance data (use CPU Avg and Avg Mem) and remove in a CSV file or htm... Here is what I use, but never to see the output to the top. I mess up something in the region of ForEach.  Help, please!

*********************************

$filelocation = "C:\VMStatsReport.htm".
$ErrorActionPreference = "SilentlyContinue".
$import = import-Csv "C:\listofvms.csv".

{ForEach ($vm in $import)

$Interval = "180".
$IntervalFinish = get-Date
$IntervalStart = $IntervalFinish.addDays (-1 * $Interval)

$CPUAvg = $vm | Get-Stat - Stat Cpu.Used.Summation - start $IntervalStart - finishing $IntervalFinish
$MemAvg = $vm | Get-Stat - Stat Mem.granted.average - start $IntervalStart - finishing $IntervalFinish

$report = @)
$vms = "" | Select-Object VMName "CPU Count", SixMonthCPUAvg, TotalMemory, SixMonthMemAvg
$vms. VMName = $vm. Name
$vms. "" CPU Count "= $vm.summary.config.numcpu
$vms. SixMonthCPUAvg = [String] ([Math]: round ((($CPUAvg |))) Measure-object-propriete value - average). Average), 1))
$vms. TotalMemory = $vm.summary.config.memorysizemb
$vms. SixMonthMemAvg = [String] ([Math]: round ((($MemAvg |))) Measure-object-propriete value - average). Average), 1))
$report += $vms
}

$report | ConvertTo-Html-title "Report VMs" - body "report VMs < H2 > < / H2 > ' | Out-file $filelocation

**************************************************

Thank you

VMSavvy

There are some other problems with the script.

You had the name (a string) of the guest in the $vm variable. The cmdlet Get-Stat does not object to the setting of entity name.

The solution is to use the object returned by Get - VM.

I assumed that your CSV file looks like this

'Name '.

"vm1.

"vm2.

The metric cpu.used.summation is available only when the interval is set to level 3.

So, unless you have history 4 interval set at level 3, use another more common measure for the use of the processor. For example, cpu.usage.average.

$filelocation= "C:\VMStatsReport.htm"
$ErrorActionPreference = "SilentlyContinue"
$import = Import-Csv "C:\listofvms.csv" -UseCulture | %{Get-VM -Name $_.Name}

$report = @()

foreach ($vm in $import) {
    $Interval = "180"    $IntervalFinish = Get-Date    $IntervalStart = $IntervalFinish.addDays(-1 * $Interval)

    $CPUAvg = $vm | Get-Stat -Stat Cpu.Usage.Average -Start $IntervalStart -Finish $IntervalFinish    $MemAvg = $vm | Get-Stat -Stat Mem.granted.average -Start $IntervalStart -Finish $IntervalFinish    $vms = "" | Select-Object VMName, "CPU Count", SixMonthCPUAvg, TotalMemory, SixMonthMemAvg    $vms.VMName = $vm.Name
    $vms."CPU Count" = $vm.summary.config.numcpu
    $vms.SixMonthCPUAvg = [String]([Math]::Round((($CPUAvg | Measure-Object -Property Value -Average).Average),1))
    $vms.TotalMemory = $vm.summary.config.memorysizemb
    $vms.SixMonthMemAvg = [String]([Math]::Round((($MemAvg | Measure-Object -Property Value -Average).Average),1))
    $report += $vms}

$report | ConvertTo-Html -title "VMs Report" -body "

VMs Report

" | Out-File $filelocation

Tags: VMware

Similar Questions

  • Process to get Performance data for the managed entity c#

    Could someone please describe the process for pulling data from the API performance?  The documentation seems a bit muddled.

    Qustions:

    Should you create a custom interval perf or you can use the default settings?

    If I have a performanceManager MOR and a hostSystem MOR what methods should I call on the PerformanceManger object to retrieve the performance counters on the managed entity? I'm trying to get ready time % of a host.  Looks like I need to use the QueryAvailablePerfMetric method to draw the MetricID and then use the QueryPerf to shoot the actual static...

    Any help is appreciated.

    VirtualFisk

    You can use available perfIntervals to extract data.

    You have reason to extract performance data, you must first call QueryAvailablePerfMetric to get metricIds and then pass them in the appeal of QueryPerf.

    Also to check whether or not real-time data are available on the entity you must first call QueryPerfProviderSummary on entity and check the PerfProviderSummary currentSupported property. If she defined as true, real-time data are available and you can pass PerfProviderSummary refreshRate as intervalID in your QueryAvailablePerfMetric call and still pass this refreshRate as intervalID PerfQuerySpec for QueryPerf appeal.

    Please see following code snippet to retrieve data for the managed entity HostSystem (hostMoRef), you can replace it with a managed object of an entity reference





    int counterID;

    int key;

    String group;

    String name;

    String rollup;

    ManagedObjectReference pmRef = _sic.perfManager;

    PerfCounterInfo[] cInfo = (PerfCounterInfo[])getObjectProperty(pmRef, "perfCounter");

    Hashtable PerfByID = new Hashtable();

    for (int i = 0; i < cInfo.Length; i++)

    {

    key = cInfo[i].key;

    group = cInfo[i].groupInfo.key;

    name = cInfo[i].nameInfo.key;

    rollup = cInfo[i].rollupType.ToString();

    Console.WriteLine("ID: " + key + " group: " + group + "." + name + "." + rollup);

    PerfByID.Add(key, group + "." + name + "." + rollup);

    }





    Console.WriteLine("\n---------------------------------------------");

    Console.WriteLine("Entity: " + hostMoRef.Value);

    PerfProviderSummary perfSum = _service.QueryPerfProviderSummary(pmRef, hostMoRef);

    Console.WriteLine("Refresh Rate" + perfSum.refreshRate + "\nCurrentSupported :"

    + perfSum.currentSupported + "\nisSummarySupported :" + perfSum.summarySupported);

    Console.WriteLine("Fetching Perf Metric Ids");

    DateTime curTime = _service.CurrentTime(_svcRef);

    DateTime beginTime = curTime.Subtract(new TimeSpan(1, 0, 0));

    DateTime endTime = curTime;

    int intervalID;



    if (perfSum.refreshRate < 0) {

    intervalID = 300;

    } else {

    intervalID = perfSum.refreshRate;

    }

    intervalID = 300;

    PerfMetricId[] Ids = _service.QueryAvailablePerfMetric(pmRef, hostMoRef, beginTime, false, endTime, false, intervalID, true);

    if (Ids != null && Ids.Length > 0)

    {

    Console.WriteLine("Ids fetched from QueryAvailablePerfMetric API are:");

    for (int k = 0; k < Ids.Length; k++) {

    Console.WriteLine("ID is: " + Ids[k].counterId + " Instance is: " + Ids[k].instance + "Name is: " + PerfByID[Ids[http://k].counterId|http://k].counterId]);

    }

    PerfQuerySpec qSpec = new PerfQuerySpec();

    qSpec.entity = hostMoRef;

    qSpec.metricId = Ids;

    qSpec.format = "csv";

    qSpec.intervalId = intervalID;

    qSpec.startTime = beginTime;

    qSpec.startTimeSpecified = true;

    qSpec.endTime = endTime;

    qSpec.endTimeSpecified = true;

    qSpec.maxSample = 1;

    qSpec.maxSampleSpecified = true;

    PerfQuerySpec[] qSpecs = new PerfQuerySpec[] { qSpec };

    if (hostMoRef != null)

    {

    PerfEntityMetricBase[] perfEntity = null;

    perfEntity = _service.QueryPerf(pmRef, qSpecs);

    if (perfEntity != null && perfEntity.Length > 0)

    {

    for (int i = 0; i < perfEntity.Length; i++)

    {

    PerfEntityMetricCSV pms = (PerfEntityMetricCSV)perfEntity[i];

    PerfMetricSeriesCSV[] vals = pms.value;

    if (vals != null)

    {

    Console.WriteLine("Perf Counters fetched");

    for (int vi = 0; vi < vals.Length; vi++)

    {

    PerfMetricSeriesCSV pmCSV = vals[vi];

    if (PerfByID[vals[http://vi].id.counterId|http://vi].id.counterId].ToString().StartsWith("mem.vmmemctl")) {

    Console.WriteLine("CounterId: " + vals[vi].id.counterId + " Name: " + PerfByID[vals[http://vi].id.counterId|http://vi].id.counterId] + " Instance: " + vals[vi].id.instance + " ----- ");

    counterID = vals[vi].id.counterId;

    //Console.WriteLine("Value in Map: " + PerfByID.get(counterID));

    Console.WriteLine("-------- Value : " + pmCSV.value);

    }

    }

    }

    }

    }

    else

    {

    Console.WriteLine("Performance statistics not available for this entity!");

    }

    }

    }

    else

    {

    Console.WriteLine("Perf Metrics not fetched");

    }

  • create a list of dates for the month of spefic

    I need to create the function that I send two parameters frist for year (2013) and the second prameter for months (09)

    to exit the list of dates this month.

    Hello

    What kind of data do you want to return the function?

    Here is a function that returns a cursor:

    FUNCTION to CREATE or REPLACE days_in_month
    (ENTIRE year
    ENTIRE month
    )
    RETURN SYS_REFCURSOR
    DETERMINISTIC
    IS
    c SYS_REFCURSOR;
    START_DATE DATE: = ADD_MONTHS (DATE ' 2000-01-01')
    , (12 * (year - 2000)) + month - 1
    );
    BEGIN
    OPEN FOR C
    SELECT the LEVEL - 1 AS a_date + start_date
    OF the double
    CONNECT BY LEVEL<= add_months="" (start_date,="">
    -start_date
    ;

    RETURN C;
    END days_in_month;
    /

    You can test it in SQL * more like this:

    M VARIABLE REFCURSOR

    EXEC: m: = days_in_month (2013, 9);

    PRINTING: m

    This function tries to avoid mistakes.  For example, if you pass 0 as the months, it triggers an error; It assumes that you meant the month before 1, i.e. from December of the previous year.

    How can you get pln to use?  Perhaps a pipeline function would be your needs better, or no function at all: just a subquery.

  • Still not the problem of 72% during last month 32-bit Vista upgrade to Windows 7 for the month last 32 bit

    Didn't find any solution for the problem... upgrade vista to W7 ATU ATU stops at 72% and only put back the image of Vista may get the computer working again.
    What I have done:
    1. update of the old programs to W7 compatible.
    2. install the latest drivers SATA (compatible W7)
    3. install the latest audio drivers (compatible W7)
    3. uninstalled my antivirus software
    4 uninstalled RealCNC premium
    5 left the command line sfc/scannow to check and repair corrupt files
    6 disabled all Iltimate options
    7 updated my BIOS (Gigabyte - to a (compatible W7)
    8. no installed PowerDVD 8
    9 uninstalled Radiotracker
    10 uninstalled Acronis Home 11
    11 ran the configuration with all disconnected USB devices
    12 removed two chips of RAM (from 4 to 2 GB of RAM)
    13 Ran MSCONFIG hidden in all Microsoft services services and all the other disabled
    14. off in MSCONFIG also all startup items

    Between each element of cummulating, I ran the installation of W7. Even after the last of them, I always get the 72% jump.
    The blue screen says the same thing every time:
    BAD_POOL_HEADER
    Stop: 0 x 00000019

    Instead of update, I tried a clean install and held without any problem. But because of so many applications installed with many specific configurations, I need the upgrade option.

    My system:
    A Core2Duo, Gigabyte motherboard, 4 GB of RAM, two hard drives, about 200 senior applications and lower installed. The system is connected to a UPS APC"Smart-UPS 1500.

    Any ideas that can help me get the upgrade?

    Windows Update has nothing to do with the upgrade of Windows. Please post future questions about the upgrade in this forum: http://social.answers.microsoft.com/Forums/en-US/w7install/threads

    0 X 00000019: BAD_POOL_HEADER
    A pool header problem is a problem with the allocation of memory for Windows. Device driver problems are probably the most common, but it can have various causes, including defective or other writing problems disc and problems with some routers... [Source: http://aumha.org/a/stop.htm]

    See also: http://msdn.microsoft.com/en-gb/library/ms793223.aspx ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • VCentre Server V4.1 performance data

    Hello

    I suddenly lost performance data for my VM except in real time. I can, however, define a custom for almost a day period, but not the day before.

    My Vcentre Server uses SQL shipped with the product and I don't think that there is a correspondence enterprise manager to look at the database. IM at a loss what changed and have restarted the VC and checked all services running including SQL

    Any suggestions where to look

    Thank you

    Tony

    A KB was written to solve this problem, please see http://kb.vmware.com/kb/1030305 for more information.

    Hope of workaround helps.

    Kind regards

    Arun Pandey

    VMware Inc.

    VCP3, VCP4, HPCP, HP UX CSA

    http://KB.VMware.com/

  • How to complete the data for months current quarter of the last month of the previous quarter

    • Here is the create table and insert the statement how my data is as
      CREATE TABLE SAMPLEDATA (Snapshot_M DATE, Date_Ky DATE, F_Quantities INTEGER)
      INSERT INTO VALUES SAMPLEDATA (SEPTEMBER 1, 2014 ", 1 SEPTEMBER 2014", 14)
      INSERT INTO VALUES SAMPLEDATA (OCTOBER 1, 2014 ", 1 OCTOBER 2014", 13)
      INSERT INTO VALUES SAMPLEDATA (1 NOVEMBER 2014", 1 NOVEMBER 2013', 12)
      INSERT INTO VALUES SAMPLEDATA (DECEMBER 1, 2014", 1 DECEMBER 2013', 11)
      INSERT INTO VALUES SAMPLEDATA (JANUARY 1, 2014 ", 1 JANUARY 2014", 10)
      INSERT INTO VALUES SAMPLEDATA (FEBRUARY 1, 2014 ", 1 FEBRUARY 2014", 90)
      INSERT INTO VALUES SAMPLEDATA (MARCH 1, 2014 ", 1 MARCH 2014", 20)
      INSERT INTO VALUES SAMPLEDATA (APRIL 1, 2014 ", 1 APRIL 2014", 23)
      INSERT INTO VALUES SAMPLEDATA (MAY 1, 2014", 1 MAY 2014', 30)
      INSERT INTO VALUES SAMPLEDATA (JUNE 1, 2014 ", 1 JUNE 2014", 70)
      INSERT INTO VALUES SAMPLEDATA (JULY 1, 2014 ", 1 JULY 2014", 20)
      Desired results set:
      Snapshot_M Date_Ky F_Quantities
      10 1/1/2014-2/1/2014
      10 1/1/2014-3/1/2014
      01/01/2014 41 10/2014
      4/1/2014 5/1/2014 23
      4/1/2014 6/1/2014 23
      4/1/2014 7/1/2014 23

      My requirement is to load the data in the cube.

      So to summarize, data that are loaded onto the month last only a quarter Q1 tax (Jan) should server as a data for the quarter Q2 next month (February, March, April), the data loaded on the last month of Q2 (Apr) will be server as forecast data for Q3 months and so on.

      Thank you in advance.



    with

    SAMPLEDATA as

    (select to_date('09/1/2014','mm/dd/yyyy') snapshot_m, to_date('09/01/2014','mm/dd/yyyy') date_ky, 14 f_quantities of all the double union)

    Select to_date (October 1, 2014 "," mm/dd/yyyy ""), to_date (1 October 2014 "," mm/dd/yyyy"), 13 union double all the

    Select to_date (November 1, 2013 "," mm/dd/yyyy ""), to_date (1 November 2013 "," mm/dd/yyyy"), 12 union double all the

    Select to_date (December 1, 2013 "," mm/dd/yyyy ""), to_date (1 December 2013 "," mm/dd/yyyy"), 11 union double all the

    Select to_date (January 1, 2014 "," mm/dd/yyyy ""), to_date (1 January 2014 "," mm/dd/yyyy"), 10 of all the double union

    Select to_date (February 1, 2014 "," mm/dd/yyyy ""), to_date (1st February 2014 "," mm/dd/yyyy"), 90 union double all the

    Select to_date (March 1, 2014 "," mm/dd/yyyy ""), to_date (1 March 2014 "," mm/dd/yyyy"), 20 union double all the

    Select to_date (April 1, 2014 "," mm/dd/yyyy ""), to_date (1 April 2014 "," mm/dd/yyyy"), 23 union double all the

    Select to_date (May 1, 2014 "," mm/dd/yyyy ""), to_date (1 may 2014 "," mm/dd/yyyy"), 30 union double all the

    Select to_date (June 1, 2014 "," mm/dd/yyyy ""), to_date (1 June 2014 "," mm/dd/yyyy"), 70 union double all the

    Select to_date (July 1, 2014 "," mm/dd/yyyy ""), to_date (1 July 2014 "," mm/dd/yyyy"), 20 union double all the

    Select to_date (August 1, 2014 "," mm/dd/yyyy ""), to_date (1 August 2014 "," mm/dd/yyyy"), 22 of the double

    )

    Select snapshot_m, date_ky, last_value (f_quantities) ignore nulls on f_quantities (order by date_ky)

    of (trunc (add_months (snapshot_m-1), 'q') select snapshot_m, date_ky,)

    -case when trunc (add_months (snapshot_m-1), 'q')! = lag (trunc (add_months(snapshot_m,-1), 'q')) (date_ky order)

    then lag (f_quantities) (date_ky order)

    end f_quantities

    of sampledata

    where date_ky > = date ' 2014-01-01'

    )

    where snapshot_m > = date ' 2014-01-01'

    order of date_ky

    SNAPSHOT_M DATE_KY F_QUANTITIES
    01/01/2014 01/02/2014 10
    01/01/2014 01/03/2014 10
    01/01/2014 01/04/2014 10
    01/04/2014 01/05/2014 23
    01/04/2014 01/06/2014 23
    01/04/2014 01/07/2014 23
    01/07/2014 01/08/2014 20
    01/07/2014 01/09/2014 20
    01/07/2014 01/10/2014 20

    Concerning

    Etbin

  • date min for each month of list

    Hi all

    I need to select only minimal date for each month in this example query:
    select date '2011-01-04' as adate from dual union all 
    select date '2011-01-05' as adate from dual union all 
    select date '2011-01-06' as adate from dual union all 
    select date '2011-02-01' as adate from dual union all 
    select date '2011-02-02' as adate from dual union all 
    select date '2011-02-03' as adate from dual union all 
    select date '2011-10-03' as adate from dual union all 
    select date '2011-10-04' as adate from dual union all 
    select date '2011-10-05' as adate from dual 
    If the result should be:
    04.01.2011
    01.02.2011
    03.10.2011
    How can I make it?
    WITH dates
         AS (SELECT DATE '2011-01-04' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-01-05' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-01-06' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-02-01' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-02-02' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-02-03' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-10-03' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-10-04' AS adate FROM DUAL
             UNION ALL
             SELECT DATE '2011-10-05' AS adate FROM DUAL)
    SELECT TO_CHAR (MIN (adate), 'DD.MM.YYYY') adate
      FROM dates
      GROUP BY to_char(adate, 'YYYY.MM')
    
    ADATE
    --------------------
    03.10.2011
    01.02.2011
    04.01.2011
    
  • Update error... I tried to update for the month and each time it fails

    I tried to perform updates for the month and each time it fails.  I get the same error message... Code 646 WIndows has encountered an unknown error.  I did troubleshooting and you are unable to find assistance.  I don't know much about the workings of the computer, but I know that I should be able to perform these updates.  I think I need it too.  I have 9 at this stage that it cannot load.  Help, please!

    I tried to perform updates for the month and each time it fails.  I get the same error message... Code 646 WIndows has encountered an unknown error.  I did troubleshooting and you are unable to find assistance.  I don't know much about the workings of the computer, but I know that I should be able to perform these updates.  I think I need it too.  I have 9 at this stage that it cannot load.  Help, please!

    This link leads to a response from Bobby Mi, moderator.
    Date: July 6, 2010
    http://social.answers.Microsoft.com/forums/en-us/vistawu/thread/18449f60-C149-4EAF-B8E6-a2880cd7232b

    Bobby Mi response will lead to this tutorial from Microsoft Support:
    http://support.Microsoft.com/kb/2258121

    Hope this can help solve your problem.
    For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • Using the event Script to load the Excel model data for users

    Hello

    Whoever did this in the FDM 11.1.2.1.

    We want to exploit the event Script to load the data validated MDF for a standard template so that users can make some adjustments and then load the same data through the FDM? Is there a better alternative. Basically, trying to avoid making adjs data forms in HFM in view of the number of columns that we have and validations for each line required with adjustments.

    Thank you

    PM

    Hello

    google + Administrator's Guide.

    It's just a matter of thought in the solution:

    -Runs a SQL query to export data from table (TDATASEG). You can filter the query by LOADID

    -Write csv file records

  • POS 5.5 could not obtain data with analytical performance data warehouses

    Hi all

    I have two devices POS running version: 5.5.5.180.

    All of a sudden I can not connect to the Web Client for each device.

    POS status show all services in green on the two Pdvs.

    root@vdp:~/#: dpnctl status all
    Identity added: /home/dpn/.ssh/dpnid (/home/dpn/.ssh/dpnid)
    dpnctl: INFO: gsan status: up
    dpnctl: INFO: MCS status: up.
    dpnctl: INFO: Backup scheduler status: up.
    dpnctl: INFO: axionfs status: up.
    dpnctl: INFO: Maintenance windows scheduler status: enabled.
    dpnctl: INFO: Unattended startup status: enabled.
    
    

    By clicking on the Storage tab, displays the error message: "Unable to get data with analytical performance data warehouses" and no data warehouses are listed.

    • VCenter restarts, Pdvs, doesn't change anything.
    • I can connect to Pdvs very well.
    • CP are created.

    I found similar topics but no response... (POS 5.5 ERROR)

    Open a support case and turned out that the POS password user (a user defined in the domain of the @vsphere.local) that was used to access the vCenter has expired. Apparently, there's a bug in vCenter for some versions that makes them expire in 65 days.

  • Dates for "Oracle Database 11g: Performance Tuning" exam

    Hello!

    Today Oracle posted the info on the new database Oracle 11 g Performance Tuning review required for new certification expertise:

    http://education.Oracle.com/pls/web_prod-PLQ-dad/db_pages.GetPage?page_id=41 & p_exam_id = 1Z0_054 #2

    It is said that pre-registration for the beta version review starts today, however, it does not say when the phase beta begins and ends. Anyone know?

    Thank you
    Marcus

    March 31, 2009 is the current provisional end date for the exam in beta 1Z1-054. This date is subject to change.

    Kind regards
    Brandye Barrington
    Certification Forum Moderator
    Manager certification program

  • script to change the data type of column

    Hi gurus of the oracle.

    I have 190 tables in my database.

    I have the column type CHAR of all these tables data.

    I need to change the data type of CHAR in VARCHAR2 for all these tables...

    There the script to change the data type of all tables at once?

    Please help me in this regard.

    Thanks in advance

    Concerning

    REDA

    Hello

    There is nothing built-in to Oracle SQL to do.  Maybe your front-end has certain characteristics.

    You can write dynamic SQL statements to do.  In other words, you can write a query that the output is a SQL script like this:

    ALTER TABLE TABLE_A CHANGE (A_TXT1 VARCHAR2 (5))

    A_TXT2 VARCHAR2 (10));

    ALTER TABLE TABLE_B CHANGE (B_TXT1 VARCHAR2 (5));

    with one row for each column of type CHAR.  Notice how the first line of output for each table begins with ALTER TABLE... but the later lines at the same table.  Similarly, the last line of a table (which will be the same as the first row, if the table has only one column of type CHAR) to end with a semicolon, but other lines are not.

    Here's a way to generate and execute such a dynamic script in SQL * more:

    -Disable the features that make the output easy to read, but hinder the execution
    SET FEEDBACK OFF
    SET LINESIZE 500
    SET PAGESIZE 0

    -Create fix_char.sql
    COIL c:\some_pathename\fix_char.sql

    SELECT THE CHECK BOX
    WHEN ROW_NUMBER () OVER (PARTITION BY table_name
    ORDER BY column_name
    )  = 1
    THEN 'ALTER TABLE ' | table-name
    || "CHANGE (").
    ELSE «»
    END
    ||        column_name
    ||        "VARCHAR2 (').
    ||        DATA_LENGTH
    ||        ')'
    ||        CASE
    WHEN ROW_NUMBER () OVER (PARTITION BY table_name
    ORDER BY column_name DESC
    )  = 1
    THEN '); "
    Output END AS
    Of user_tab_columns
    WHERE data_type = "CHAR".
    ORDER BY table_name
    column_name
    ;

    SPOOL OFF

    -Turn on the features that make the output easy to read, but hinder the execution
    SET FEEDBACK ON
    SET LINESIZE 80
    SET PAGESIZE 50

    -Fix_char.sql performance
    @c:\some_pathname\fix_char

    It's good to change all the CHARIOT of VARCHAR2 columns.  The CHAR data type is nothing trouble.

  • script/steps to corrupt data blocks

    Please give me some script/not to corrupt data blocks (not the data files).
    I need to check for the recovery test.

    Thank you

    http://www.oracleflash.com/9/How-to-perform-block-media-recovery-using-RMAN.html

  • Problem loading data for Planning Server through ODI

    Hi all

    I am facing problem while loading data for Planning Server through ODI.
    I created the interface with flat as a source of data as file below

    Location data load Cube name POV cost per seat
    Ctbn_PnL of Tidel Equifax, Budget, Working_2010, FY10, Wk1, Local 333
    Ctbn_PnL of Tidel Equifax, Budget, Working_2010, FY10, Wk2, Local 444
    Ctbn_PnL of Tidel Equifax, Budget, Working_2010, FY10, Wk3, 555 Local
    Ctbn_PnL of Tidel Equifax, Budget, Working_2010, FY10, Wk4, Local 666
    Budget, Working_2010, FY10, Wk5, Tidel Equifax, Local 777 Ctbn_PnL
    Ctbn_PnL of Tidel Equifax, Budget, Working_2010, FY10, Wk6, Local 888
    Budget, Working_2010, FY10, Wk1, PADI Ctbn_PnL Equifax, Local 222
    Budget, Working_2010, FY10, Wk2, PADI Ctbn_PnL Equifax, Local 111
    Budget, Working_2010, FY10, Wk3, PADI Ctbn_PnL Equifax, room 345
    Budget, Working_2010, FY10, Wk4, PADI Ctbn_PnL Equifax, Local 346
    Budget, Working_2010, FY10, Wk5, PADI Ctbn_PnL Equifax, Local 347
    Budget, Working_2010, FY10, Wk6, PADI Ctbn_PnL Equifax, Local 349

    And the target as an application of Planinng. Interface has been properly executed, but are not filled with data in the form of Plannning or Essbase.
    I obtained the information in the log file after running the interface:

    2010-05-20 18:45:38, 409 [DwgCmdExecutionThread:null:5] INFO: Oracle Data Integrator adapter for Hyperion Planning - free 9.3.1.1
    2010-05-20 18:45:38, 409 INFO [DwgCmdExecutionThread:null:5]: connection for application [PnL_ODI] [chnveltss03]: [11333] using [admin] username.
    2010-05-20 18:45:39, 800 [DwgCmdExecutionThread:null:5] INFO: successfully connected to the planning application.
    2010-05-20 18:45:39, 800 INFO [DwgCmdExecutionThread:null:5]: loading for the charge of planning options
    Name of the dimension: location like Parent child: false
    Order By entry charge: forgery
    Update the database: true
    2010-05-20 18:45:39, 815 INFO [DwgCmdExecutionThread:null:5]: beginning of the loading process.
    2010-05-20 18:45:39, 815 DEBUG [DwgCmdExecutionThread:null:5]: number of columns in the result set of source does not match the number of columns planning targets.
    2010-05-20 18:45:39, 831 [DwgCmdExecutionThread:null:5] INFO: type of load is a [member of the load dimension].
    2010-05-20 18:45:39, 831 [DwgCmdExecutionThread:null:5] ERROR: file [[Tidel, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 831 [DwgCmdExecutionThread:null:5] ERROR: file [[Tidel, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 847 [DwgCmdExecutionThread:null:5] ERROR: file [[Tidel, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 847 [DwgCmdExecutionThread:null:5] ERROR: file [[Tidel, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 847 [DwgCmdExecutionThread:null:5] ERROR: file [[Tidel, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 847 [DwgCmdExecutionThread:null:5] ERROR: file [[Tidel, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 847 [DwgCmdExecutionThread:null:5] ERROR: file [[Padi, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 862 ERROR [DwgCmdExecutionThread:null:5]: file [[Padi, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 862 ERROR [DwgCmdExecutionThread:null:5]: file [[Padi, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 862 ERROR [DwgCmdExecutionThread:null:5]: file [[Padi, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 862 ERROR [DwgCmdExecutionThread:null:5]: file [[Padi, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 862 ERROR [DwgCmdExecutionThread:null:5]: file [[Padi, null, null, null, null, null, null, null, null, null, null, null, Ctbn_PnL, Budget, null, "Equifax, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 878 [DwgCmdExecutionThread:null:5] ERROR: Record [[null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]] has been rejected by Planning Server.
    2010-05-20 18:45:39, 878 [DwgCmdExecutionThread:null:5] INFO: planing cube refresh initiated.
    2010-05-20 18:45:44, 284 INFO [DwgCmdExecutionThread:null:5]: planning of the cube refresh operation completed successfully.
    2010-05-20 18:45:44, 284 INFO [DwgCmdExecutionThread:null:5]: load the process is complete.


    Please help me in this grace,
    Srinivas

    You are right. The table that you have described is in the format 'Generation' (the highest to the lowest level of the hierarchy). The KM of planning requires data to load in format "Parent/child". You must create multiple interfaces (one for each pair of generation) or use a view to make the transformation.

    While a view seems to be the easier choice, note that ODI will not be able to perform any analysis of lineage of data on the integration process.

    Hope this helps,
    Matt

  • Where can I disable 'Send performance data to Mozilla' or if it is enabled?

    A few hours after the upgrade to Firefox 20, a bar has been shown at the bottom of the window telling me that some data was sent to Mozilla. the bar had a button called "Select what info" (or similar, I do not have a screenshot). By pressing the button doesn't not more opening the page root Options (the one in the row of icons at the top) and hidden bar.

    Help Mozilla on this option (https://support.mozilla.org/en-US/kb/send-performance-data-improve-firefox) has passed: it shows the old Options dialog box and refers to a checkbox control that no longer exists in Firefox 20.

    There is a new Panel in Firefox 20 for options - Firefox button > Options > Options (or tools > Options) > advanced > choice of data

Maybe you are looking for