Basic use of ESXCLI

Hi guys,.

Sorry to be a dummy, but I am really struggling with doing the esxcli in my work environment. I have two PC with installed esxcli. On the Win7 machine I don't know even how to start the CLI and on the Ubuntu machine, I know how to start but I'm struggling with the syntax of the command. Basically, I wanted to try to force a shutdown of a virtual machine on one of our three hosts, but I don't know how to specify the one that I want to connect.

I started to follow the instructions here: VMware KB: turn off a virtual machine on a host ESXi

But when I type:

Esxcli vm process list

He asks me to specify the host.

So I tried:

Esxcli vm 10.3.0.72 process list

and then she complains about syntax.

Can you please point me to the right direction?


I have two 5.5 hosts and a 5.0 host.


See you soon,.

Martin

The syntax you ar using may require you to first ptty/ssh on the server and then run the command.

If you want to run it remotely you must - Server put it as:

esxcli - Server 10.0.0.1

Tags: VMware

Similar Questions

  • spatial memory - should my Vista Home Basic use 21 GB of memory

    should my Vista Home Basic use 21 GB of memory on a computer acer laptop

    Memory RAM - it seems that you may have about the hard disk space that is different.

    It is normal that Windows Vista use 21 GB of hard drive space.

  • Problem with the release of setting in the form using get-esxcli

    Hello... I tried to format information obtained using get-esxcli.  According to me, the question is to do with the default value fit for the typpe of info I receive.  Instead of get 3 columns, with one row for each parameter name and its configured default information /, I get the following... Name                                          Default                                        Configured                                    ----                                          -------                                        ----------                                    {acpiDbgLevel, allowNonNX, auditMode, autoC... {0, FALSE, FALSE, TRUE,...}                    {0, FALSE, FALSE, TRUE,...} Is anyone able to help out how I can change the formatting to what I was... Here's the code... function get-55HOSTAdvancedSettings ($vmobj) {$55HOSTAdvancedSettingsreport = @ () ForEach ($esxhost in $vmobj) {$settings = (get-esxcli - vmhost $esxhost).system.settings.kernel.list ($false) $row = "" |}} Select-Object Name, by default, configured $row. Name = $settings. Name $row. Default = $settings. Default $row. Set $settings =. {Set $55HOSTAdvancedSettingsreport += $row} if ($OutputToCSV) {$55HOSTAdvancedSettingsreport |} {Export-Csv - NoTypeInformation - UseCulture-path $CSVOutput - Append} else {Write-output $55HOSTAdvancedSettingsreport}} thanks in advance

    With

    $esxcli.system.settings.kernel.list () | FT - AutoSize

    I get the result in three columns.

  • Unidentified network Local Access only on Vista Home Basic using Ethernet.

    Have 2 laptops not identified network Local Access only on Windows Vista Home Basic.  One is a Toshiba and the other is a Dell.  I can use the Ethernet on the Toshiba to one of the The Fire Dept. I work at. (From lastweek, haven't checked since.)  I can't go to the other Station.  Get Local access to the unidentified network only.  I get also home and when I checked the Dell, get the same message.  I can connect wirelessly.  How can I solve the unidentified network problem?

    Hello

    If your system is running Hello , Netmagic or any other party 3rd network try to uninstall.

    Try also.

    Type Cmd in the search text box.

    Press Ctrl-Shift-Enter keyboard shortcut to run a command as administrator prompt.  Allow the elevation.

    Type route delete 0.0.0.0 press ENTER.

    Type ipconfig/flushdns press enter

    Restart your computer.

    Jack-MVP Windows Networking. WWW.EZLAN.NET

  • Impossible to upgrade to windows vista ultimate from vista home Basic using the upgrade disc

    I bought a disc "to upgrade use only" Windows Vista Ultimate at my University and tried to upgrade my current version of Windows (Vista Home Basic).

    At the stage where I had to select the 'Upgrade' or 'Custom' installation option, I noticed that the interface was telling me, 'Upgrade Disabled"with a message that has been along the line"this version of windows is already installed and cannot be upgraded."
    I know that the upgrade disc was probably intended for the upgrade from an earlier version of Windows like XP, but I assumed that because Microsoft also sells discs "Anytime Upgrade" to do exactly what I'm trying to accomplish this I would have had no problem.
    For any help or suggestion that contact would be greatly appreciated.
    Thank you in advance.

    It's all about Service Pack.
    We don't know what you have.

    If Service Packs came pre-installed on the operating system, there is no way to uninstall them.
    You will need to swap the disk to upgrade to a later version that includes the missing Service Pack.

    In this case, your upgrade disk has NO Service Pack installed with it.

    Take it back to the University, if you cannot uninstall SP1 operating system.

    See you soon... Mick Murphy - Microsoft partner

  • Assistance with the scrip value perpetually bulk bookings using Get-ESXCLi

    I was expecting a little help here. Ive written a script which must on a "Perpetually reserved" lun using Powercli & Get-ESXICli, however when I run the following command locally on a host computer to confirm it worked and LUN are marked respectively, I find that the result is False

    esxli store feature list | grep reserved

    Ive written script is below. IM aware there are easier ways to get the IDs and get hostnames, etc. However im more concerned about the actual action of the script in the creation of the reserve.

    Param(
      $RootCredentials = (Get-Credential)
    )
    
    
    $RDMDisks = ("naa.60002ac0000000000000003e00002b3e","naa.60002ac0000000000000002800002b3e","naa.60002ac0000000000000003f00002b3e","naa.60002ac0000000000000002b00002b3e","naa.60002ac0000000000000002d00002b3e","naa.60002ac0000000000000002f00002b3e","naa.60002ac0000000000000003100002b3e","naa.60002ac0000000000000003500002b3e","naa.60002ac0000000000000003600002b3e","naa.60002ac0000000000000003700002b3e","naa.60002ac0000000000000003800002b3e","naa.60002ac0000000000000003900002b3e","naa.60002ac0000000000000004100002b3e","naa.60002ac0000000000000003b00002b3e","naa.60002ac0000000000000002600002b3e","naa.60002ac0000000000000002700002b3e","naa.60002ac0000000000000002900002b3e","naa.60002ac0000000000000002a00002b3e","naa.60002ac0000000000000002c00002b3e","naa.60002ac0000000000000002e00002b3e","naa.60002ac0000000000000003000002b3e","naa.60002ac0000000000000003300002b3e","naa.60002ac0000000000000004000002b3e","naa.60002ac0000000000000003c00002b3e","naa.60002ac0000000000000003200002b3e","naa.60002ac0000000000000003400002b3e")
    $TargetHosts = ("Server190","Server191","Server192","Server193","Server194","Server195","Server196")
    
    
    
    
    Foreach ($ESXHost in $TargetHosts) {
    
    
    Connect-VIServer $ESXHost -Credential $RootCredentials
    }     
    Start-Sleep -Seconds 3
    Foreach($esxcli in Get-ESXCli) {
                                          Foreach ($ESXHost in $TargetHosts){
                                                          Foreach ($Disk in $RDMDisks) {
                                                                     $esxcli.storage.core.device.setconfig($false, $Disk, $true)
                                                   }
                                       }
                               }
    Foreach ($ESXHost in $TargetHosts) {
    Disconnect-VIServer $ESXHost -Confirm:$false |Out-Null
    }
    

    Thanks in advance for any help.

    To set the flag on all ESXi nodes in a cluster, the script needs a little change

    $vmName = "VMwithRDM"
    
    $vm = Get-VM -Name $vmName$rdm = Get-HardDisk -DiskType rawPhysical -Vm $vm$vmhosts = Get-Cluster -VM $vm | Get-VMHostforeach($esx in $vmhosts){  $esxcli = Get-EsxCli -VMHost $esx  Get-HardDisk -DiskType rawPhysical -Vm $vm | %{    $esxcli.storage.core.device.list($rdm.ScsiCanonicalName) |    Select @{N="Time";E={"{0:g}" -f (Get-Date).TimeOfDay}},Device,IsPerenniallyReserved
    
        $esxcli.storage.core.device.setconfig($false,$rdm.ScsiCanonicalName,$true)
    
        $esxcli.storage.core.device.list($rdm.ScsiCanonicalName) |    Select @{N="Time";E={"{0:g}" -f (Get-Date).TimeOfDay}},Device,IsPerenniallyReserved  }}
    

    The logic is now as follows:

    1. Get the ROW (s) physical connected to the virtual computer (if your RDM is virtual, you will need to change the DiskType, add them both to the setting)
    2. Get all nodes in ESXi cluster where the virtual machine is configured, and then run the codeblock to each node
      1. The current flag of the RDM LUN parameter list
      2. Change the flag
      3. The current flag of the RDM LUN parameter list

    See a few ways to enter code PowerCLI under the new SW forum on how to enter the syntax coloring.

  • First HP Calculator: basic use

    It is my first graphic calculaot, so forgive me ignorance please.

    When I go into the menu of CASES and I immediately want to simplify an equation or expression, how can I get the simplify() upward on the screen? (The only way I can make it work's first press a number as 1 in order to activate the cursor in the box, and then press BACKSPACE and press the increase).

    How do I type an opening parenthesis, or a SINGLE closing paren without having to use () and then removing the extra parenthesis, I want? Too simplified example, if I type 2 + 2 and then decide to go back and put 2 + 2 in parentheses. I have to go to start, press (), then remove the supplement), then go to the end and press () and remove the extra (.)

    How can I evaluate simple equations like x 8 = 16 so that x = 2? Now when I press ALPHA 8 (time) x, SHIFT (period) = 2 and press to enter. It rewrites only 8 * x = 2 on the screen. I'm expecting a x = 2 in response.

    How to simplify (c ^ 3d ^ 5) ^ 2 * (cd ^ 3) ^ 3, then he gives me the right answer rather than rewrite the expression and then give me the right answer? (Right of reply: c ^ 9 ^ 19)

    How can I make the proot() function returns accurate values? For example, proot (2y ^ 2 + 7y + 6) should return positive 3 and 4 positive, no - 2, and -1.5.

    When I go into the menu of CASES and I immediately want to simplify an equation or expression, how can I get the simplify() upward on the screen? (The only way I can make it work's first press a number as 1 in order to activate the cursor in the box, and then press BACKSPACE and press the increase).

    The trick is to first press the space key.  However, it is usually best to simply type the expression first of all, press ENTER, and then simplify the press.  In this way the unedited original expression is in the history so that you can tap it and re - use.

    How do I type an opening parenthesis, or a SINGLE closing paren without having to use () and then removing the extra parenthesis, I want? Too simplified example, if I type 2 + 2 and then decide to go back and put 2 + 2 in parentheses. I have to go to start, press (), then remove the supplement), then go to the end and press () and remove the extra (.)

    Method 1: Shift Vars (characters), then tap the bracket you want.

    Method 2: (shift return) back for an opening parenthesis;  cursor - right back, for a closing parenthesis ().

    How can I evaluate simple equations like x 8 = 16 so that x = 2? Now when I press ALPHA 8 (time) x, SHIFT (period) = 2 and press to enter. It rewrites only 8 * x = 2 on the screen. I'm expecting a x = 2 in response.

    Type this: solve (8 * x = 16)

    Suggestion: Tap box tool, the CASES tab, solve, and then explore this menu by highlighting one of the Solve funstions and press the help key.  There are a lot of powerful options it.

    How to simplify (c ^ 3d ^ 5) ^ 2 * (cd ^ 3) ^ 3, then he gives me the right answer rather than rewrite the expression and then give me the right answer? (Right of reply: c ^ 9 ^ 19)

    First of all, to avoid the "implicit multiplication.  Since variables can have more than one letter, the first cannot know you mean c * d when you type cd.  He thinks you mean a variable called "cd".

    Your example should be typed as (c ^ 3 * d ^ 5) ^ 2 * (c * d ^ 3) ^ 3.  Prime simplifies correctly as.

    How can I make the proot() function returns accurate values? For example, proot (2y ^ 2 + 7y + 6) should return positive 3 and 4 positive, no - 2, and -1.5.

    Your example solves 2y ^ 2 + 7y + 6 = 0.  Premium solutions are correct:

    * (- 1.5) 2 ^ 2 + 7 + 6 = 0 *(-1.5)

    *(-2) 2 ^ 2 + 7 + 6 = 0 *(-2)

    2 * 3 ^ 2 + 7 * 3 + 6 = 45

    2 * 4 ^ 2 + 7 * 4 + 6 = 66

    Another approach: factor(2y^2+7y+6).  First returns (y + 2) *(2*x+3).  As you can see, defining each factor equal to zero gives the first solutions given above (-1.5 and -2).

    Hope that helps!

  • HP question first basic use - how can I enter constraints?

    I would like to be able to specify constraints for graphical representation of a function, a function of problems. Let us look at the graphic representation first. For example, I would draw sin(x) a specific interval such as halves of the halves negative pi positive pi. On a TI-nSpire, the vertical bar is used as a symbol to do this kind of thing - sin (x) |-pi/2 < x < pi/2. where pi is the symbol for pi.

    I don't know if there is another way to do it, but using the case model would work.  0/0 makes the function not defined outside the - pi / 2 and pi/2 limits.  If you want, after you enter the model, the function can be edited and "0/0" can be removed.

  • Need to access info "header / properties" and the use of a 'peek-a-boo' feature that allows an opening not assigned an e-mail message. BOTH are necessary.

    When the list of "incoming mail is received, a few times an e-mail will have a familiar name, BUT the message is NOT the person I know.» A header would reveal which is the familiar name of MASKING. It is located on the right click of an email entering under "properties.", for those who use the Windows Mail service. Upon activation, two panels are available: "general", line information base; and the jury of "Details". [email protected]

      Here is the "Details" on your recent request:
    

    Return-Path: < 8fd.10.Ragingmt =rochester.rr.com@mxsp4.email-od.com>
    Received: from dnvrco-pub-iedge - vip.email.rr.com ([107.14.70.244])

             by dnvrco-fep24.email.rr.com
             (InterMail vM.8.04.01.13 201-2343-100-167-20131028) with ESMTP
             id <20150527165815.TQBS12014.dnvrco-fep24.email.rr.com@dnvrco-pub-iedge-vip.email.rr.com>
             for <[email protected]>; Wed, 27 May 2015 16:58:15 +0000
    

    Return-Path: < 8fd.10.Ragingmt =rochester.rr.com@mxsp4.email-od.com>
    Received: from [64.151.119.54] (helo [64.151.119.54:45118] =mail24.smtprelayserver.com)
    by dnvrco-iedge04 (envelope-from < 8fd.10.Ragingmt =rochester.rr.com@mxsp4.email-od.com>)
    (ecelerity 3.5.0.35861 r (Momo - dev:tip)) with ESMTP)
    ID 05/42-22770-6A7F5655; Wednesday May 27, 2015 16:58:15 + 0000
    DKIM signature: v = 1; a = rsa-sha1; d =email - od.com; i=@email-od.com; s = dkim;
    c = relaxed/relaxed; q = txt/dns; t = 1432745904; x = 1435337904;
    h = content-type: mime-version: subject: to: to: date: message-id: reply - to;
    BH = BorokUNlliKkKGt/h0t9J5QZRXM =;
    b = ivSHJkJVgtIuuPbdKelm8wrP9MTDBOfWi38tURaeWYyE7irIYrzg8PjdIXA/r9B3Uc8l1gJJ9blRBU2jcN + jKV4C2 + / 5tSrQSrfiqa9l5xBx81Fm8Winq6uvCxyTCUwioUwJ21eUR7FDAXlDmcg7fbRBoG2b4 + f0CvQLBrdPNxU =
    X-wire-Info: OGZkLjEyLjhhMDAwMDA3NmJmNzIzLlJhZ2luZ210PXJvY2hlc3Rlci5yci5jb20 =
    Received: from r2.us - West - 2A .aws .in .socketlabs .com ([54.186.58.227]) by mail30.email - od.com
    with ESMTP; Wednesday, may 27, 2015 12:58:23-0400
    Received: from support3.webapp.phx1.mozilla.com ([63.245.216.223]), of r2.us - West - 2A .aws .in .socketlabs .com
    with ESMTP; Wednesday, may 27, 2015 12:58:14-0400
    Content-Type: multipart/alternative;

      I do NOT have this option on the right-clicked menu.
    
      Yes, I have been fooled, BUT, with a name of an extended family member, who questions such?  However, the message came from an unknown party, pushing some product from Oprah.   I check now.
    
      There are also e-mails I may NOT wish to indicate that I have "read" them via the formal opening process.  I call this the "peek-a-boo" method of opening an e-mail, as it is NOT a formal opening, per my research.  The point is that NOT all you see on the screen IS what you ARE seeing.  Thus the old saying: "Seeing IS believing.", is NOT true.   This is a more current peeking process, an advancement on the old "300 watt bulb behind the envelope" method of finding out contents withOUT opening the letter.  This applies to a sender I am familiar with BUT, the current topic is NOT of interest to me.   Thus, I can use the "Delete" function with complete satisfaction.
    
      Therefore I wish to know HOW I can gain these two features on THUNDER BIRD e-mails?
    

    Thomas J. Baglin
    [email protected]
    27/05/2015

    R.M. said

    Thank you, you, Matt.
    Regarding the "peek-a-boo," about 15 years ago, it was somewhat revealed the Web that some shippers had the ability to detect IF you had opened their missive.

    This is handled by the Web beacons. Thunderbird blocks remote images by default. Web beacons work only if you enable the remote images in specific email.

    From THIS time, it is the GOVERNMENT that has the ability to detect if you open all or part of your receipts "Entrants".

    Interesting point of view, but not quite corr4ect. f they have access to a mail server IMAP "could" determine the status of mail on this server. In the case of POP e-mail that could determine if it has been downloaded. While I do not trust of Government oversight. About the only time where they would do that would be when they are already studying you as an individual. It's a slow late then.

    So, WHY Windows Mail offers this function and the T-bird, NO mail?

    I played with Visual basic using integrated Internet Explorer about 15 years ago and it was a simple toggle to change the display of the HTML displayed in the source. So I would say it is in windows mail, because he was already in Internet explore and it made for a very simple to implement the functionality. Just expose the existing functionality. After all the composition and rendering in Windows mail used Internet explorer.

    Although the header can help tremendously, , what I SEE is NOT NECESSARILY WHAT THAT REALLY is the content of the e-letter.

    This is a feature of Thunderbird. It uses the display names from your address book on incoming mail. You can disable it in the menu (alt + T) tools > options > advanced > reading and posting.

    If the follow-up can be done via the 'Key STROKE' method, and YOU do NOT know of it, then a "peek-a-boo" is useful to have, huh?

    Keyloggers are all also able to capture screens and clicks. If your number more ahead.

    It makes me feel, I have a FEW C-O-N-T-R-O-L that I CHOSE to read, and what I based on the content and subject.

    Seriously. encryption of e-mails with s/mime and free email certificates will do more to protect your mail that any kind of fake check before you read. Most of the people may face apparently not having a certificate of personal mail to encrypt their mail and like most internet technologies, we get the lowest common denominator. This is the plain text that scours the internet to an ordinary human-readable text.

    Please when using these forums not your text indent. This is what makes it become very difficult to read and not wrap. I don't know that that is how you were taught in school. I learned the same thing. But it must comply with the requirements of the opportunity.

  • Can what internet security program I use Mac OS 10.6.8?

    I can't upgrade my OS 10.6.8 because I use Creative Suite 2 for my (small) freelance graphics business; If I update I lose all my programs! I had Norton Internet Security (by Comcast) during many years for 2 PCs and my iMac, but received notices that they are abandoning support for my Mac OS. Any ideas? An older version of antivirus protection will be able to protect the Mac (s) on our home wireless network? [I have a Titanium PowerBook most basically used only by my husband to watch his fantasy football league!] Help, please!

    First of all, you must completely remove Norton product you have because it has never protected anything whatsoever and has just been slowing down your Mac all those years.  Therefore, you will never miss it.

    Second, if you use a modern version of Mac OS, you wouldn't need any security software because Mac never received subsequently and still haven't.  Installation of security software 3rd party on a Mac is the potential to make your Mac less secure than it was without him.

    Finally, OS 10.6.8 is not supported since early 2014.  So, even if it's a Mac, it may simply not yet use this computer on the Internet more.  Therefore, it is time to move your business forward and invest in a new Mac and the new Adobe software.  You can now subscribe to the new Adobe products for a lot less you would have already paid to buy them in the past.

  • Using of FPGA VHDL IP and analog output

    I use a system with Labview 2014 PXI. I've got Labview FPGA to program and run the card PXI-7854R.

    I have the VHDL Code I want to use to control an analog output of the card. I use the IP integration node for this now but I also tried it making the process CLIP and still have not been successful. The problem that arises is that the IP integration node must be in a timed loop, while the analog output indicates that it cannot be put in a timed loop. Is there a way to provide an output of VHDL analog outputs of the card?

    I tried to embed a loop timed within a while loop, but it still does not work.

    I can't download the VI due to the policy of the company, but suppose I'm generating a sine wave in my VHDL code which must lead to the analog output of the card (the actual wave is company owner information but it is generated by a glance to the top of the table as a sine wave VHDL would be).

    In an attempt to work the problem I retried import CLIP of the HDL code in a new project in Labview and VI. I'm still not sure about why it did not work with each other when I tried it.

    For anyone who seeks to solve this problem:

    I basically used this tutorial for the process CLIP: http://www.ni.com/tutorial/7444/en/

    It also explains the differences between the CLAMP and the IP integration node.

  • A Vista Home Premium key is usable in Vista Home Basic?

    Hi all

    A friend asked me to reinstall her PC at home that does not have Vista Home Premium installed and a key tag takes precedence over the box - but no recovery on the HARD drive partition

    I only have media for Vista Home Basic used as well as the thought that the key Premium would work with Basic as it's a version below, but it is not.

    Is it possible to activate Basic with a premium key has it or can I use a copy of premium to operate?

    Thank you very much

    Jason

    "Is there a way to activate Basic with a premium key has it or can I use a copy of premium to operate?

    There is NO way to do it.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Vista Media recovery obtaining and/or using the Vista recovery on your computer Partition to factory settings .

    There is no Vista free download legal available.

    Contact your computer manufacturer and ask them to send a recovery disk/s Vista set.

    Normally, they do this for a cost of $ small.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Or borrow a good Microsoft Vista DVD (not Dell, HP, etc).
    A good Vista DVD contains all versions of Vista.
    The product key determines which version of Vista is installed.

    There are 2 disks of Vista: one for 32-bit operating system, and one for 64-bit operating system.

    If install a cleaning is required with a good DVD of Vista (not HP, Dell recovery disks):

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu

    http://support.Microsoft.com/default.aspx/KB/918884

    MS advice on the conduct of clean install.

    http://www.theeldergeekvista.com/vista_clean_installation.htm

    A tutorial on the use of a clean install

    http://www.winsupersite.com/showcase/winvista_install_03.asp

    Super Guide Windows Vista Installation

    After installation > go to the website of the manufacturer of your computer/notebook > drivers and downloads Section > key in your model number > get latest Vista drivers for it > download/install them.

    See you soon.

    Mick Murphy - Microsoft partner

  • Windows 7 Home Basic disk partition.

    Yesterday I created a disk partition in my laptop of friends using Windows 7 home basic. Now, I am unable to send it back. When I try to format it by using the default settings the error I get is. "The dynamic disk is not supported by this server." Later, I got to know that dynamic disk is not supported by Home Basic. Now what to do? I am unable to use the 150 GB partition I've done unless I format it. Is it possible that I can use this space?

    Create a separate partion to "ease the burden on partition win" is not actually going to achieve something IE doesn't go to lighten everything, leave them are part of this disk.

    I guess that if you view disk 0 to disk management shows a system reserved about 100 MB, and C the boot partition, and you already have 4 partitions on basic and if you add another partition, it must be configured as dynamic.

    You cannot convert dynamic to basic use in victory built tools.

    When you create the recovery discs, and I hope that you have done this now, if you ever have to recover your system, you will lose all you have created the partitions and all data.

    Bottom line, your goal/plan to create a separate partition is incorrect. Go back and expand C to consume all the free space.

  • How RMI is used to connect to a Hyperion planning?

    Hello

    We want to document how RMI connects to Hyperion planning under the hood for our security team. Can you please help us understand this process or point us to a document?

    Thank you

    Andy

    It is basically using the Protocol Java RMI that is running on a port by default 11333, if you do a search on the internet you can find more information on Java RMI, it is only really used now (11.1.2.3) by ODI to contact the planning

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • When using the merge and when to use updated

    Hi friends,

    Given the best performance... purpose of this discussion is when we should use statement UPDATE and when we should use MERGE statement in oracle update of thousands of records.

    Kindly Guide.

    Kind regards

    Himanshu

    Hello

    Looking for a couple to a few rules that you can use to decide whether to use the MERGE or UPDATE, without actually testing two meanings?

    If so, use MERGE when

    (1) (sometimes) need to add new lines

    (2) it is simpler.  This includes special cases

    (2A) an UPDATE statement uses a subquery in the SET clause and then (mostly) repeats the same subquery in the WHERE clause

    (2B) you want to use the analytical functions or CONNECT BY in a subquery

    These rules are NOT guaranteed to work in all situations.

    Kimmy says:

    Hello

    ... My requirement is only UPDATED records about 200 to 500K (NOT followed by update of insertion).

    So the rule (1) above does not apply in this case.

    What I observed in the update using a MERGE statement and UPDATE is:

    Update with the MERGER was faster however explain the bytes consumed to the query plan MERGE has been compared more update.

    Use the tool that works best for your needs.  If users are complaining that something shows more bytes used in a plan to explain, so maybe it's a reason for the UPDATE.

    Where I work, where is the fastest is usually more important.

    In addition, I want to get clearity

    1. "if I should use MERGE if I need to update recrods using the unique table" as shown below: OR update will be good to use in this case:

    MERGE INTO MKT_DATA inmkt

    C using (SELECT Customer_Code, region, State OF CUSTOMER_DATA)

    ON (inmkt. Distributor_Code = c.Customer_Code AND inmkt. DISTRIBUTOR_CODE IS NOT NULL)

    WHEN MATCHED THEN

    Updated the inmkt VALUE. Distributor_Region = c.Region,

    inmkt. C.State = Distributor_Province;

    UPDATE MKT_DATA inmkt

    SET (inmkt. Distributor_Region, inmkt. Distributor_Province) =

    (SELECT c.Region, c.State OF CUSTOMER_DATA c

    WHERE c.Customer_Code = inmkt. Distributor_Code)

    WHERE inmkt. DISTRIBUTOR_CODE IS NOT NULL;

    2 statements above are not equivalent.

    The UPDATE statement changes all the lines in the table mkt_data that have a distributor_code, this distributor_code be in the table customer_data or not.

    You want something that is equivalent to the MERGE statement, you can use:

    UPDATE MKT_DATA inmkt

    SET (inmkt. Distributor_Region, inmkt. Distributor_Province) =

    (SELECT c.Region, c.State

    OF CUSTOMER_DATA c

    WHERE c.Customer_Code = inmkt. Distributor_Code

    )

    WHERE THERE ARE

    (SELECT 1

    CUSTOMER_DATA C2

    WHERE the c2. Customer_Code = inmkt. Distributor_Code

    )

    ;

    It basically uses the same auxiliary request 2 times (article 2 (a), so I would use MERGE if these are the results I wanted.

    If you have a foreign key constraint, which ensures that each distributor_code in mkt_data will match a line in customer_data, then the 2 statements above will produce the same results.  In this case, I find the UPDATE statement simpler and probably use it rather than MERGE.

    2. to Updating huge amount of records MERGER must be used instead of update?

    I don't know of all short reign as the "use X whenever you have more than 100,000 lines".

    3. If in the update, I need to use several tables then I have to use MERGE?

    MERGE IN MKT_DATA2 t

    WITH THE HELP OF)

    SELECT DISTINCT srt. Sales_Id, tmkt. Cust_Code, srt. PRODUCT_CENTER

    OF srt, CUSTOMER_DATA c, MKT_DATA2 tmkt SALESTERR_PL

    WHERE tmkt.state_Id = 10423

    AND tmkt. Business = 'MARKETING'

    AND c.CUST_CODE = tmkt. Cust_Code

    AND c.Rollup_Code = srt. CUST_CODE

    AND srt. PRODUCT_CENTER = tmkt.PL

    ) d

    WE (t.state_Id = 10423

    AND t.BA = 'MARKETING'

    AND t.Cust_Code = d.Cust_Code

    AND t.PL = d.PRODUCT_CENTER

    AND t.Cust_Code IS NOT NULL

    )

    WHEN MATCHED THEN

    UPDATE SET t.Sales_Id = d.Sales_Id;

    UPDATE MKT_DATA2 tmkt

    SET Sales_Id = (SELECT SALES_ID OF SALESTERR_PL srt

    WHERE the srt. CUST_CODE = (SELECT ROLLUP_CODE FROM CUSTOMER_DATA c

    WHERE c.CUSTOMER_CODE = tmkt. Cust_Code)

    AND srt. PRODUCT_CENTER = tmkt.PL)

    WHERE business = 'MARKETING'

    AND state_Id = 10423;

    Once again, those who are not equivalent.  The UPDATE statement can change more lines than the MERGE statement.

    In addition, you can use the MERGE statement:

    MERGE IN MKT_DATA2 t

    WITH THE HELP OF)

    SELECT DISTINCT srt. Sales_Id, tmkt. Cust_Code, srt. PRODUCT_CENTER

    OF srt, CUSTOMER_DATA c, MKT_DATA2 tmkt SALESTERR_PL

    WHERE tmkt.state_Id = 10423

    AND tmkt. Business = 'MARKETING'

    AND c.CUST_CODE = tmkt. Cust_Code

    AND c.Rollup_Code = srt. CUST_CODE

    AND srt. PRODUCT_CENTER = tmkt.PL

    ) d

    WE (t.Cust_Code = d.Cust_Code

    AND t.PL = d.PRODUCT_CENTER

    )

    WHEN MATCHED THEN

    UPDATE SET t.Sales_Id = d.Sales_Id

    WHERE t.state_Id = 10423

    AND t.BA = 'MARKETING'

    - AND t.Cust_Code IS NOT NULL - does not need, said subquery 'c.CUST_CODE = tmkt. Cust_Code ".

    ;

    If you would care to publish the sample data, I was able to test this.

    4. when the UPDATE is preferred over the MERGER?

    In simple cases, including situations where all you need to know are on the line itself, such as:

    UPDATE emp

    SET sal = sal * 1.05

    Job WHERE NOT IN ('MANAGER', 'PRÉSIDENT')

    ;

Maybe you are looking for