Assign dynamic statement declaring the block or block start

Hi all

For code below, if I attribute the select statement in the section declare for the corresponding variable, it will improve performance.

For cust_veh_id we have another block cursor to declare, only partial code is provided.


What I wanted to.
declare
v_addr_chg_stmt                 varchar2(2000) := 'select ''Y''
FROM cust_addrs addrs
WHERE customer_id = :v_customer_id
AND updated_date >:p_end_date
and rownum = 1';
Actaul
---------
declare
p_end_date                      date;
v_addr_chg_stmt                 varchar2(2000);
v_mileage_stmt                 varchar2(2000);
begin

select updated_date into p_end_date
from process_log_rfsh
where tran_code ='CAP';

v_addr_chg_stmt :=
'select ''Y''
FROM cust_addrs addrs
WHERE customer_id = :v_customer_id
AND updated_date >:p_end_date
and rownum = 1'
;

v_mileage_stmt :=
'SELECT ''Y'' FROM cust_vehicles_audit
WHERE cust_veh_id=:v_cust_veh_id
AND field_name =''LAST_MILEAGE''
AND added_date > :p_end_date
and audit_date >= trunc(:p_end_date)
and rownum=1'
;
       begin
                 execute immediate v_addr_chg_stmt
                    into v_addr_change_flag
                    using v_customer_id,  p_end_date;
             exception
          when no_data_found then
                 v_addr_change_flag:='N';
             end;
        begin
               execute immediate v_mileage_stmt
                 into v_mileage_change_flag
                using v_cust_veh_id,  p_end_date, p_end_date;
           exception
         when no_data_found then
               v_mileage_change_flag:='N';
           end;
end;
Thank you
Rambeau

Published by: Raghu on January 18, 2013 13:13

Rambeau wrote:
This code is already running in production for a few years.

Not a reason to justify using dynamic SQL.

YOU NEED a JUSTIFICATION FOR the USE of DYNAMIC CODE. In any language.

Once again: WHAT is your justification? If you can't provide that, so why you use code Dynamics?

If you must use dynamic sql statements, performance definition wise to declare the block or start will be better.

No difference - as no method doesn't change the actual SQL cursor run. Nor did the resulting cursor read faster data blocks.

PL/SQL also does not care where the variable assignment happens. The difference is so small and so small, it is not relevant to the performance:

SQL> declare
  2          t1      timestamp;
  3  begin
  4          --// test 1
  5          t1 := systimestamp;
  6          for i in 1..10000 loop
  7                  declare
  8                          num     number;
  9                  begin
 10                          num := 1;
 11                  end;
 12          end loop;
 13          dbms_output.put_line( 'Test 1. '||to_char(systimestamp-t1) );
 14
 15          --// test 2
 16          t1 := systimestamp;
 17          for i in 1..10000 loop
 18                  declare
 19                          num     number := 1;
 20                  begin
 21                          null;
 22                  end;
 23          end loop;
 24          dbms_output.put_line( 'Test 2. '||to_char(systimestamp-t1) );
 25
 26  end;
 27  /
Test 1. +000000000 00:00:00.000040000
Test 2. +000000000 00:00:00.000024000

PL/SQL procedure successfully completed.

SQL>

Tags: Database

Similar Questions

  • The assignment of value to the block multi-record in Oracle's 10 g

    Hi all

    I'm new to form of Oracle 10 g.

    I have a block of several recording that does not rely on the database. I need to assign the value to this block multi-record dynamically the ref cursor.

    I'm trying to set the value as below, but its does not work. Please help me on this.

    loop
         fetch cur Into screenval_rec ;
          exit when cur%notfound ;
          first_record;
       
      :BLOCK1.COL1:= screenval_rec.value1;
        :BLOCK1.COL2 := screenval_rec.value2;
        :BLOCK1.COL3:= screenval_rec.valu3;
      
         next_record;
    End loop;
    
    

    Kind regards

    REDA

    Hi Craig,.

    Thank you for your information.

    But I found the exact cause of this "Invalid cursor error' (ORA-01001) in Oracle forms. It is because of the unique enclosed in quotes the select statement of the REF cursor. I found in the paragraphs below Oracle.

    Note 170881.1 - ORA-1001 calling a stored procedure that contains a REF Cursor Oracle Forms

    Once I deleted the quotes, it's working properly now.

    Thanks again for your help.

    Kind regards

    REDA

  • Continue the block after the exception management

    The guys in the slot block.

    create or replace procedure proc_case
    (p_in IN number)
    is
    begin
    case p_in
    when 1 then
    dbms_output.put_line('its one'); 
    when 2 then
    dbms_output.put_line('its two'); 
    end case;
    dbms_output.put_line('after the exception handler'); 
    exception when case_not_found then
    dbms_output.put_line('its not found'); 
    end;
    

    When the procedure is executed as follows.

    begin
    proc_case(3);
    end;
    

    It shows the statement in the block of exception, but after that it does not run the statement following the exception handler and the outputs of the block, how can I execute the statement after the end case statement. I do not use the Else statement in case because I wanted to understand the logic of this block.

    CREATE OR REPLACE

    PROCEDURE proc_case

    (

    p_in in NUMBER)

    IS

    BEGIN

    BEGIN

    P_in CASE

    WHEN 1 THEN

    dbms_output.put_line ('the one');

    WHEN 2 THEN

    dbms_output.put_line ('two');

    END CASE;

    EXCEPTION

    WHEN case_not_found THEN

    dbms_output.put_line ("' its not found");

    END;

    dbms_output.put_line ("' after the exception handler");

    END;

  • 0xC000021A {fatal system error}, the initial session process or the process of the complete system in unexpected ways with the blocking state 0 x 00000000 (0xc0000034 0x001008ac) the system has been halted

    Hello! I got this message from malware (I clicked to delete) in surfing on firefox and after awhile the explorer.exe closes with an error. I try to open the Task Manager and it says explore cannot be found!
    I rebooted and then I got this message "0xC000021A {fatal system error}, the initial session process or the process of the complete system in unexpected ways with the blocking state 0 x 00000000 (0xc0000034 0x001008ac) the system has been halted" and can't get anywhere.
    I can't even go in safe mode, the same error messages appears.

    Hi James,

    You could try the Startup Repair to see if it solves the problem:

    http://Windows.Microsoft.com/en-us/Windows-Vista/startup-repair-frequently-asked-questions

    Chris
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to get the last DML statement in each block

    Hello

    How can I get the latest DML statements in each block.
    As SYSTEM. LAST_QUERY returns the last select statement, I need to get the last Insert/Update/Delete statement
    in each block.

    Thanks in advance

    Rizly

    Rizly,

    You can use the GET_BLOCK_PROPERTY to get the last query executed on this block.

         MESSAGE(GET_BLOCK_PROPERTY('', LAST_QUERY));
    

    Kind regards

    Manu.

    If this answer is useful or appropriate, please mark. Thank you.

  • Dynamic performance of plsql block of relaxation.

    Dear oracle Experts.
    I'm using the following oracle database.

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    AMT for Linux: release 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production

    I have a problem in the execution of the trigger. I have a small plsql block in the trigger, and I want to run it as a dynamic medium. but it gives the error. Please find the code of the trigger. Here my intension is that the column name used in trigger must be dynamic. In the future, if I want to pass the name of the column, I do without modification in the trigger.
    The error im getting is "ORA-01008: not all variables.

    Or y at - it another way to achieve this goal. Please suggest your ideas. Thank you!!!

    CREATE OR REPLACE TRIGGER ETM_AR_IU
    AFTER UPDATE ON
    EXTERNAL_MAPPING
    REFERRING AGAIN AS NINE OLD AND OLD
    FOR EACH LINE

    DECLARE
    V_COL_NAME VARCHAR2 (30);
    PL_SQL_BLOCK VARCHAR2 (1000);

    BEGIN

    SELECT T.COL_NAME IN THE TRIGGER_TABS_COLS V_COL_NAME T;
    PL_SQL_BLOCK: = '
    BEGIN
    IF: OLD.' | V_COL_NAME | "<>: NEW.'" V_COL_NAME |
    "THEN."
    INSERT INTO hema_clob VALUES (: NEW.'|) V_COL_NAME |') ;
    END IF;
    END;';
    IMMEDIATELY RUN PL_SQL_BLOCK;
    END;

    As immediate execution will execute the code as if it were a separate process of the trigger, this dynamic PL/SQL block is unlikely to have access to the: NEW and: OLD trigger variables.

    Dynamic SQL is pretty bad.
    Dynamic PL/SQL is just stupid.
    Dynamic PL/SQL within a trigger... ' enough said.

  • Error in the block

    Hello

    DECLARE

    LC_DML VARCHAR2 (4000);
    LC_COLUMNS VARCHAR2 (4000);
    LC_VALUES VARCHAR2 (4000);

    P_TAUDIT_TABLE_NAME VARCHAR2 (4000): = 'TEST ';
    P_TAUDIT_RECORD_TYPE VARCHAR2 (4000): = 'T';
    P_TAUDIT_MODIFIED_BY VARCHAR2 (4000): = "YS."

    BEGIN

    LC_COLUMNS: = ' TAUDIT_KEY,
    TAUDIT_TABLE_NAME,
    TAUDIT_RECORD_TYPE,
    TAUDIT_KEY_NAME_1,
    TAUDIT_KEY_VALUE_1,
    TAUDIT_KEY_NAME_2,
    TAUDIT_KEY_VALUE_2,
    TAUDIT_KEY_NAME_3,
    TAUDIT_KEY_VALUE_3,
    TAUDIT_KEY_NAME_4,
    TAUDIT_KEY_VALUE_4,
    TAUDIT_KEY_NAME_5,
    TAUDIT_KEY_VALUE_5,
    TAUDIT_MODIFIED_BY,
    TAUDIT_MODIFIED_ON,
    TAUDIT_TIME_STAMP,
    TAUDIT_MODIFIED_IP,
    TAUDIT_NOTES,
    TAUDIT_LOCK_KEY';
    LC_VALUES: = ' NULL.
    P_TAUDIT_TABLE_NAME,
    P_TAUDIT_RECORD_TYPE,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    P_TAUDIT_MODIFIED_BY,
    SYSDATE,
    NULL,
    NULL,
    NULL,
    NULL';

    LC_DML: = "INSERT INTO T_ID_TABLE_AUDIT_LOG_PUB";

    LC_DML: = LC_DML | CHR (40) | LC_COLUMNS | CHR (41) | "VALUES. CHR (40) | LC_VALUES | CHR (41) | CHR (59);

    IMMEDIATELY RUN LC_DML;

    END;


    If run the block above it displays error

    Error:

    Error report:
    ORA-00911: invalid character
    ORA-06512: at line 56 level
    00911 00000 - "invalid character".

    Why can't it be just...

    declare
      p_taudit_table_name    varchar2(4000) := 'TEST';
      p_taudit_record_type   varchar2(4000) := 'T';
      p_taudit_modified_by   varchar2(4000) := 'PUGAL';
    begin
      insert into T_ID_TABLE_AUDIT_LOG_PUB
        (TAUDIT_KEY
        ,TAUDIT_TABLE_NAME
        ,TAUDIT_RECORD_TYPE
        ,TAUDIT_KEY_NAME_1
        ,TAUDIT_KEY_VALUE_1
        ,TAUDIT_KEY_NAME_2
        ,TAUDIT_KEY_VALUE_2
        ,TAUDIT_KEY_NAME_3
        ,TAUDIT_KEY_VALUE_3
        ,TAUDIT_KEY_NAME_4
        ,TAUDIT_KEY_VALUE_4
        ,TAUDIT_KEY_NAME_5
        ,TAUDIT_KEY_VALUE_5
        ,TAUDIT_MODIFIED_BY
        ,TAUDIT_MODIFIED_ON
        ,TAUDIT_TIME_STAMP
        ,TAUDIT_MODIFIED_IP
        ,TAUDIT_NOTES
        ,TAUDIT_LOCK_KEY)
      values
        (null
        ,p_taudit_table_name
        ,p_taudit_record_type
        ,null
        ,null
        ,null
        ,null
        ,null
        ,null
        ,null
        ,null
        ,null
        ,null
        ,p_taudit_modified_by
        ,sysdate
        ,null
        ,null
        ,null
        ,null);
    end;
    

    ?

    If it were to be dynamic for some reason valid, then something more like...

    declare
      lc_dml                 varchar2(4000);
      lc_columns             varchar2(4000);
      lc_values              varchar2(4000); 
    
      p_taudit_table_name    varchar2(4000) := 'TEST';
      p_taudit_record_type   varchar2(4000) := 'T';
      p_taudit_modified_by   varchar2(4000) := 'PUGAL';
    begin
      lc_columns := 'TAUDIT_KEY,TAUDIT_TABLE_NAME,TAUDIT_RECORD_TYPE
                    ,TAUDIT_KEY_NAME_1,TAUDIT_KEY_VALUE_1
                    ,TAUDIT_KEY_NAME_2,TAUDIT_KEY_VALUE_2
                    ,TAUDIT_KEY_NAME_3,TAUDIT_KEY_VALUE_3
                    ,TAUDIT_KEY_NAME_4,TAUDIT_KEY_VALUE_4
                    ,TAUDIT_KEY_NAME_5,TAUDIT_KEY_VALUE_5
                    ,TAUDIT_MODIFIED_BY,TAUDIT_MODIFIED_ON
                    ,TAUDIT_TIME_STAMP,TAUDIT_MODIFIED_IP
                    ,TAUDIT_NOTES,TAUDIT_LOCK_KEY';
    
      lc_values := 'NULL,:tblname,:recordtype
                   ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
                   ,:modifiedby,SYSDATE,NULL,NULL,null,NULL';
    
      lc_dml := 'INSERT INTO T_ID_TABLE_AUDIT_LOG_PUB ('||LC_COLUMNS||') VALUES ('||LC_VALUES||')'; 
    
      execute immediate lc_dml using p_taudit_table_name, p_taudit_record_type, p_taudit_modified_by;
    end;
    
  • Script to kill the blocking sessions

    We use Oracle 10. We have a database of test used only for training and I need to give to the teacher the ability to kill all sessions blocking when a block continues
    the entire class.
    My idea was to create a simple form on our Oracle containing just a single menu-button when you press on would trigger the script. Press the key
    to kill each session blocking. I have no idea on how to write a script of this nature. Would appreciate any advice.
    Kind regards
    Sandy

    You can use something like this

    SQL> DECLARE
      2  CURSOR c IS
      3  SELECT c.owner,
      4        c.object_name,
      5        c.object_type,
      6        b.SID,
      7        b.serial#,
      8        b.status,
      9        b.osuser,
     10        b.machine
     11   FROM v$locked_object a, v$session b, dba_objects c
     12   WHERE b.SID = a.session_id AND a.object_id = c.object_id
     13   and c.object_name in ('JSW_CRM_C_HR_COIL_INFO','T_SPCL_BARCODE_CRS2');
     14  c_row c%ROWTYPE;
     15  l_sql VARCHAR2(100);
     16  BEGIN
     17  OPEN c;
     18  LOOP
     19  FETCH c INTO c_row;
     20  EXIT WHEN c%NOTFOUND;
     21  l_sql := 'alter system kill session '''||c_row.SID||','||c_row.serial#||'''';
     22  EXECUTE IMMEDIATE l_sql;
     23  END LOOP;
     24  CLOSE c;
     25  END;
     26  / 
    

    Be sure to use your own SQL statement in the CURSOR!

  • Yahoo gave me the block www site; now unable to use firefox on computer laptop win7

    looking for something on yahoo mail. announcement above asked me if I wanted to block - stupid me clicked on it. Now impossible to open what anyone with Firefox. Internet Ex and other work programs. Ran AVG and MBAM and hard reboot, not change. I can try to uninstall Firefox and reinstall but worried this virus can do additional damage to computer laptop may.

    Ideas? I'm in the middle of trying to sell the property out of State.

    You use the extensions (Firefox/tools > Modules > Extensions) that can block content (e.g., Adblock Plus, NoScript, Flash Block, Ghostery)?

    If you then click on their icons in toolbar and search the blocked items.

  • HOWTO call "n" independent instances of 'Decimate (continuous) .vi"without putting instances of"n"of the VI on the block diagram?

    I have a double 2D chart I want to decimate continuously using the ".vi (continuous) Decimate" located in the range of Signal Processing. This VI is set on reentrant preallouee clone because it uses a FGV to save the State of the call to.  What I could do, but do not want to, is having a huge index table and wire 20 + 1 table of DBL to 20 + unique VI instances decimate to ensure that each have their own data space and no 'cross-talk' doesn't happen, then 'picture of generation' all back after the fact.

    I'm almost certain, there is a much cleaner way to do it with only one instance of unique block diagram of the VI decimate using techniques of the call by reference.   I found my way to this link: Preallocated-Reentrant-VI-within-Parallelized-For-Loop that talks about something similar.  After reading pages of four and the detailed help about the function 'Open VI référence' my head is spinning again on what option I want to spend (0x08 or 0x40 + 0x100) to ensure that whenever a slna 2D table come in, each of them is decimated by using the same clone that was used the last time it was called.

    Although the DBL entry 2D array always has the same number of lines, now, it is not always in the future this number and ideal would not force me to create several references strictly typed in VI decimate that will have to change as grows the number of rows in the table 2D static DBL.

    Anyone ready to set up an example VI that takes an array 2D arbitrary of DBL as input, decimating each line using the same clone independent of the "Decimate (continuous) .vi" and outputs the newly decimated 2D Array of LDM?  Assume that each line uses the same factor of decimation and 'Sprawl' set to False.

    Necessity is the mother of all invention and since it upsets me when I read a post that has a similar problem with no resolution, I felt compelled to post mine here.   I'm sure it's better I can do within the current state of LabVIEW.   The only question I have is what happens if I put the call by reference for loop be parallelizable?  That trash completely the nature of 1 to 1 of what I intended?

  • How can I change the scrolling on the block diagram?

    I'm trying to find a way to scroll from left to right with the mouse when you program in the block diagram.  I found that if I hold down the Ctrl key and scroll with the wheel of the mouse while on a case statement, it will travel cases.  With no pressure on the buttons from scrolling with the mouse wheel will allow me to scroll vertically, but how to scroll horizontally?  Thanks for the help.

    If there is then I do not know it.  I have a mouse with a scroll wheel that clicks on the left and right, but it does not work in LabVIEW.

    I just found out that if you hold down the ctrl and shift keys and click and drag on an empty spot you can drag the diagram block autour.  Which is somewhat scrollin

  • How to shrink thin comments on VMFS5? or change the block size?

    Hi all, I'll try to find a way to reduce invited bloating thin-set in service in an environment VMFS5 all.

    We went from 4.1 to 5.1 and then also vmotioned storage all our newly created vm VMFS5 volumes before you delete the old VMFS3 volumes.  During this operation, everyone has forgotten that one of our volumes has been intentionally assigned to a block size of differnet than all the others for the purpose of narrowing of the guests who had swelled upward for some reason any.  Now, we have no way to create something other than a volume of 1 MB block size which prevents us from doing the cleaning routine.  Is there an alternative way to shrink a guest who does not put offline?

    For those who do not know the procedure that I describe, here's how it works:

    You have a 100 GB comments that has only 10 GB of actual data in it, but because of something after bad temporary files, cleaning up old data, etc., that 100 GB had been used at a point of real files but is now only 10 GB in use. You want to recover which is now 90 concerts waste of space because your thin provisioned VMDK is sitting there at 100 GB in size.  With VMFS3, you could create a volume with a block size that was different from that of the volume on which the guest is currently living.   In our environment were all our 1 MB LUN but one that we kept to 2 MB just for that purpose.   When we were getting a little low on space and found guests such as the one in question, we would run a simple command to write zeros to the entire free space:

    Cat/dev/zero > bigfile; RM f bigfile

    Then all you have to do is storage vMotion the guest at the volume of 2 MB and return to its normal domestic and suddenly the VMDK's 100 GB up to 10 GB, all with no impact on the guest.  Without support for the creation of a file system with a different block size in VMFS5, now I'm not aware of a way to reclaim this space in a way that does not require an interruption of the guest.

    You can select the VMFS version when you create a new data store. With selected VMFS3, you will be able to specify the desired size of the block.

    André

  • Gets the block db confusion

    Hello

    Oracle 11.2.0.1

    Windows

    SQL > connect sys/pw as sysdba

    Connected.

    SQL > set autotrace traceonly;

    SQL > select * from scott.emp;

    14 selected lines.

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3956160932

    --------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    --------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |      |    14.   532.     3 (0) | 00:00:01 |

    |   1.  TABLE ACCESS FULL | EMP |    14.   532.     3 (0) | 00:00:01 |

    --------------------------------------------------------------------------

    Statistics

    ----------------------------------------------------------

    1 recursive calls

    0 db block Gets

    4 consistent gets

    0 physical reads

    0 redo size

    1630 bytes sent via SQL * Net to client

    523 bytes received via SQL * Net from client

    2 SQL * Net back and forth to and from the client

    0 sorts (memory)

    0 sorts (disk)

    14 rows processed

    SQL > connect scott/pw

    Connected.

    SQL > set autotrace traceonly;

    SQL > select * from scott.emp;

    14 selected lines.

    Execution plan

    ----------------------------------------------------------

    Hash value of plan: 3956160932

    --------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    --------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |      |    14.   532.     3 (0) | 00:00:01 |

    |   1.  TABLE ACCESS FULL | EMP |    14.   532.     3 (0) | 00:00:01 |

    --------------------------------------------------------------------------

    Statistics

    ----------------------------------------------------------

    23 the recursive calls

    15 db block Gets

    Gets 5 in accordance

    0 physical reads

    872 redo size

    1630 bytes sent via SQL * Net to client

    523 bytes received via SQL * Net from client

    2 SQL * Net back and forth to and from the client

    0 sorts (memory)

    0 sorts (disk)

    14 rows processed

    SQL >

    My question is:

    Why I see 15 db block Gets and 872 redo size when I use only this test db and only I connected as user scott.

    Thank you.

    Sometimes it's the way you have created the data or the current state of the data; Sometimes, it is a characteristic of the test; Sometimes, it's down to strange bugs.

    Get 15 db block gets you every time that you run the query with autotrace activated?

    What happens if you do "autotrace statistics" and avoid generating the plan (just in case the 15 come to fill the plan table - which they shouldn't).

    Autotrace switch, query v$ mystat, v$ statname stats non-nulle, run the query, repeat the query v $ mystat, v$ statname and check the differences - perhaps a few other workload statistics will give you an idea.

    You could activate tracing buffer see which buffers, but perhaps a first step easier is to empty the log again to see what those again records relate: switch log file, run the test (without autotrace), empty the log file (edit the system dump logfile "Filename";).

    Concerning

    Jonathan Lewis

  • Is it possible to divide the block through a transparent partition?

    I have 2 cubes - one who possesses the only sales and who has full P & l (including accounts of sales)

    I would like to make users data from loading in the Sales database and that segment transparent in the P & L data base.  The reason is that they are at a lower level of budgeting in the Sales database so the data is summarized, and then returned to the P & L.

    I tried partitioning and it brings more data perfectly.  Unfortunately, when I run an agg, (even outside auditors coming via the transparent partition), the agg is always RPC calls to the Sales database.  I am partitioning stored members only, so it is not calculated dynamically, but some partitioned are full hierarchies to a specific dimension.  (once again, no dynamic Calc)

    I guess my question is can I part of the block of partition and I agg ignored accounts coming from the Sales database?

    Look at the REMOTECALC setting in the tech reference

  • How to increase the size of the block of local storage

    Hi all

    We have installed Esx 4.0 with 500 GB storage, it does increase the block size default of 1 MB to 2 MB. We need to assign a virtual disk 450 GB for a virtual computer.

    We tried to remove the storage, we get the error "the disk is currently in use".  PL share us the command to run from the console.

    Thanks in advance

    Centhil

    Hello.

    I used an installation based on the script to trackle this problem of disk split into two partitions

    1. Create disk configuration

    Cat < < EOFdisk > >/tmp/diskconfig

    clearpart - alldrives - overwritevmfs

    part/boot - fstype = ext3 - size = 1100 - onfirstdisk

    No part - fstype = vmkcore - size = 110 - onfirstdisk

    part $: esxconsole - fstype = vmfs3 - size = 40000 - maxsize = 40000 onfirstdisk - part $: local - fstype = vmfs3 - size = 40000 - grow - onfirstdisk

    VirtualDisk esxconsole - size = 16607 - onvmfs = $: esxconsole

    party swap - fstype = swap - size = 1600 - maxsize = 1600 - onvirtualdisk = "esxconsole".

    part/var - fstype = ext3 - size = 4000 - maxsize = 4000 - onvirtualdisk = "esxconsole".

    part/home - fstype = ext3 - size = 2000 - maxsize = 2000 - onvirtualdisk = "esxconsole".

    part / opt - fstype = ext3 - size = 2000 - maxsize = 2000 - onvirtualdisk = "esxconsole".

    part/tmp - fstype = ext3 - size = 2000 - maxsize = 2000 - onvirtualdisk = "esxconsole".

    part / - fstype = ext3 - size = 5000 - push - onvirtualdisk = "esxconsole".

    EOFdisk

    In the post installation, you can format the secondary drive

    vimsh - not hostsvc/storage/refreshment

    sleep 5

    / usr/sbin/vmkfstools - c b 2 M s $ESXHOSTNAME vmfs3: local /vmfs/devices/disks/mpx.vmhba0:C0:T0:L0:6 > > /var/log/PostInstall.log

    See you soon,.

    Mary

Maybe you are looking for