Attempt to add a new data with a script store

I have an interview put in place where I remove a store of data once a week and he re-clone of our SAN.  I'm stuck with the script to add to the store of data back.

I try to get the LUN ID of the new store of data to add.

What I have so far is:

I have remove the vSphere data store and delete the SAN volume.

Then for a list of the currently available SCSI LUN:

Get-VMHostStorage - RescanAllHba

Get-ScsiLun | Select CanonicalName | Out-file c:\scripts\Before.txt-largeur 120

$Before = get-Content c:\scripts\Before.txt

I have it dumped to a file to make sure, that it was not truncated at all.

Then, I create the new volume on the SAN and get the new list LUNS:

Get-VMHostStorage - RescanAllHba

Get-ScsiLun | Select CanonicalName | Out-file c:\scripts\After.txt-largeur 120

$After = get-Content c:\scripts\After.txt

Then to set the variable to the new LUN ID:

$LunID = compare-object $Before $After

The problem I have is that the $LunID variable is set to

@{InputObject = eui.0134d870bf1f182f6c9ce90064ee16c5; {SideIndicator == >}

Instead of the value eui.0134d870bf1f182f6c9ce90064ee16c5 that I need.

Is there a way when I set the variable or run the object - compare to select only the part of this line?

The result should be in $LunID.InputObject.

Tags: VMware

Similar Questions

  • Please let me know how I can add a new column with a constraint not null, table already has data, without falling off the table... Please help me on this issue...

    Hello

    I have an emp_job_det with a, b, c columns table. Note that this TABLE ALREADY has DATA OF THESE COLUMNS

    IAM now add a new column "D" with forced not null

    Fistly I alter the table by adding the single column "D", if I do, the entire column would be created with alll of nulls for the column DEFAULT D

    ALTER table emp_job_det Add number D; -do note not null CONSTRAINT is not added

    Second... If I try to add the constraint not null, get an eoor as already conatained null values...

    (GOLD)

    In other words, if I put the query

    ALTER table emp_job_det Add number D NOT NULL; -THROWS ERROR AS TABLE ALREADY CONTAINS DATA

    So my question is how how can I add a new column with a constraint not null, table already has the data, without falling off the table

    Please help me on this issue...

    Add the column without constraint, then fill the column. Once all the rows in the table are given in the new column, and then add the constraint not null.

  • What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.

    Mr President.

    What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.

    --SL_CUSTOMERS table data
    
    
    INSERT INTO SL_CUSTOMERS VALUES(1,'Kamrul Hasan',NULL,NULL,'Moghbazar', 'Dhaka','0456789123',NULL,NULL,NULL,'Y',NULL);
    INSERT INTO SL_CUSTOMERS VALUES(2,'Rabiul Alam',NULL,NULL,'Motijheel', 'Dhaka','0567891234',NULL,NULL,NULL,'Y',NULL);
    INSERT INTO SL_CUSTOMERS VALUES(3,'Shahed Hasan',NULL,NULL,'2-G/1,2-2,Mirpur', 'Dhaka','0678912345',NULL,NULL,NULL,'Y',NULL);
    
    
    
    

    CREATE SEQUENCE  "ALIZA"."SL_CUSTOMERS_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
    
    
    CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG 
    BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS"   
    FOR EACH ROW   
    BEGIN   
    IF :NEW.CUSTOMER_ID IS NULL OR :NEW.CUSTOMER_ID < 0 THEN  
      SELECT SL_CUSTOMERS_SEQ.nextval   
        INTO :NEW.CUSTOMER_ID  
        FROM DUAL;   
      END IF;   
    END;   
    /
    
    
    
    

    When I try to insert several records with the seq.nextval it gives error

    violation of primary key.

    INSERT INTO "ALIZA"."SL_CUSTOMERS" (CUSTOMER_NAME) VALUES ('sdfsd')
    ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated
    ORA-06512: at line 1
    
    
    
    
    One error saving changes to table "ALIZA"."SL_CUSTOMERS":
    Row 4: ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated
    ORA-06512: at line 1
    
    
    
    
    
    
    
    

    Concerning

    Mr President.

    I find the solution by creating a function before the triiger

    as below

    CREATE SEQUENCE  "ALIZA"."SL_CUSTOMERS_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
    
    CREATE OR REPLACE FUNCTION get_SL_CUSTOMERS_vId RETURN VARCHAR2 AS
    BEGIN
       RETURN SL_CUSTOMERS_SEQ.NEXTVAL;
    
    END;
    /
    
    CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG
    BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS"
    FOR EACH ROW
    DECLARE
    dummy VARCHAR2(200);
    BEGIN
      dummy := get_SL_CUSTOMERS_vId();
      :NEW.CUSTOMER_ID := dummy;
    END;
    /  
    

    It works very well

    Thank you all for the suggestions.

    Concerning

  • Cannot add a new data store

    Let me preface this post by saying that I am an extreme noob to VMWare... Have only used MS HyperV in the past but looking to oust most of my hardware with VMWare on the recommendation of a colleague.

    On the problem.

    I have a server Dell PowerEdge 2900 with 32 GB of RAM and 8 TB of disk space.

    I installed ESXi yesterday and you can see my original data store, called "datastore1", which is only 325 GB.

    I try to add a new data store, but when I go to 'Add storage' in vSphere, select ' disk/LUN", the list is empty.

    I know I'm missing something, but don't know where to look.  What should I do to add a new datasore and subsequently more storage to my VMWare environment?

    DRM for all help!

    To add a data store storage must be allocated to the vSphere server.  There is also a size limit of 2 TB less 512 bytes per LUN for a vSphere.   Try a few small LUN and see if they appear as available when you add a data store.   I have included a link pdf maximum configuration for vSphere 4.1

    http://www.VMware.com/PDF/vSphere4/R41/vsp_41_config_max.PDF

    If you have found this device or any other useful post please consider the use of buttons useful/correct to award points

    Twitter: http://twitter.com/mittim12

  • Failed to get the disk partition information when you add the new data store

    Hello

    Update my ESX to version 4 Update 1 (4.0.0, 256968). Now, I'm trying to add a new data store to a cluster in vCenter and receive the following error message when I will review the current structure of the disc "error when configuring the host: failed to get the disk partition information. When I click back, then next, there's no error message but in the formatting window, I get the error "Object reference" not set to an instance of an object.

    I see this question has been asked before, but I can't seem to find an appropriate response. Anyone? The interface using CLI instead of vCenter isn't an option (alignment VMFS, workload and so on)

    I use Dell R900 with an EMC Symmetrix VMax SAN

    The size of the LUN I want to add is 741 GB

    Concerning

    Marius Aulie

    If you have a virtual machine for Windows test, you could do the following, to ensure that the logic unit number has a clean partition table:

    -set the LUN as a GROSS physical to virtual machine device

    -Run diskpart, select the drive and run the CLEAN command

    -detach the LUN to the virtual machine

    -try to create the data on the LUN VMFS store

    The size of the block of the data store where the VM test can be a problem with the above. Due to the size of the LUN, the size of the block of the data store must be at least 4 MB. Attach the LUN to a physical test system could be an alternative.

    André

  • Cannot add the new data store

    VM dear supporters,

    My vSphere environment: 1 vCenter Server Foundation, 3 vSphere 4.0 Enterprise 5.0 and vSphere Client 5.0

    1. read the error message in the attachment:

    "hostdatastoresystem.queryvmfsdatastorecreateoptions...". »

    2. already the ESX02 reboot but still unable to add the new data store.

    New size of the data store = 3.1 TB

    Need to vmsupport on this subject.

    Thank you

    Hello

    Size Max LUN VMFS is 2 TB-512 MB in vSphere 4 (your hosts are in version 4), if you want to add 3.1 TB LUN first upgrade ESX hosts to version 5

  • Add a new column with DEC

    Hi all

    I have tab_trans of transactions table which has nearly 20 million records.
    He has entries of all transactions. If any transaction is canceled or partially canceled it also stored there.
    To know entirely cancelled transactions currently, we need calculate the sum of the amount of the transaction based on trans_date and trans_id.
    To avoid this, I want to add a new column to the table. But it takes a lot of time hell.
    This is the structure of the table.
     
    Trans_id     Trans_date     Ref_trans_id     Ref_trans_date     Trans_amount         Trans_ind        
    10000     2/2/2010 13:12:10                                   100                      0        
    10001     8/2/2010 12:43:55                                   300                      0        
    10002     11/2/2010 09:23:24     10000     2/2/2010 13:12:10        -20                      1        
    10003     22/2/2010 10:32:45     10000     2/2/2010 13:12:10        -40                      1        
    10004     23/2/2010 09:45:23     10001     8/2/2010 12:43:55        -300                      1        
    10005     24/2/2010 07:30:23                                   500                      0      
    
    So I decided to create a temp_table using CTAS from tab_trans add the rest_amount column and update it with trans_amount in CTAS itself.
    
    create table temp_tab_trans as select Trans_id,Trans_date,Ref_trans_id,Ref_trans_date,Trans_amount,Trans_amount rest_amount from tab_trans ;
    
    Then I find out the rest_amount using correlated query.
    
    update  temp_tab_trans a  set rest_amount =nvl (select sum(trans_amount) from tab_trans b where b.ref_trans_date=a.trans_date and b.trans_id=a.trans_id),trans_amount) where trans_id=0;
    
    My intended result is :
    
     
    Trans_id     Trans_date     Ref_trans_id     Ref_trans_date     Trans_amount           Trans_ind          Rest_amount
    10000     2/2/2010 13:12:10                                      100                    0         40
    10001     8/2/2010 12:43:55                                      300                    0         0
    10002     11/2/2010 09:23:24     10000     2/2/2010 13:12:10           -20                    1        -20
    10003     22/2/2010 10:32:45     10000     2/2/2010 13:12:10           -40                    1        -40
    10004     23/2/2010 09:45:23     10001     8/2/2010 12:43:55           -300                    1       -300
    10005     24/2/2010 07:30:23                                      500                    0        500
    IE > partially/fully cancelled transactions should refresh the rest_amount in the original transaction (where trans_id = 0).

    After the temp_tab_trans, I create indexes as in tab_trans and deposit of tab_trans and rename temp_tab_trans to tab_trans.


    Can I do the update in the ETG itself? Can someone help me...

    Hello

    You can get the sum without a subquery using the analytical SUM function, like this:

    CREATE TABLE     temp_tab_trans
    AS
    SELECT     t.*
    ,     CASE
              WHEN  trans_ind = 0
              THEN  SUM (trans_amount)
                   OVER ( PARTITION BY  NVL (ref_trans_id,   trans_id)
                          ,          NVL (ref_trans_date, trans_date)
                        )
              ELSE  trans_amount
         END     AS rest_amount
    FROM     tab_trans     t
    ;
    

    If you wish to post, CREATE TABLE and INSERT statements for your sample data, and then I could test it.

  • Add the new data store

    Hello

    I'm sorry if someone already asked this question before.

    I'm just starting with VMWARE.

    my main at work gave me an old DELL Poweredge 2950 and asked me to install esxi 5 and set up a network and separate area to work with.

    This server got a limitation of 400 GB of HARD drive. I want to use the external USB HDD as additional storage. I got the rank of server 2 TB external HARD drive to use.

    in the start-up phase, is to recognize the HARD drive, but when I want to add as a data store, it does not show anything.

    is there a way I can use the HARD disc as data store extra or not. If I can, can someone please help me with this.

    Thank you

    Krishna

    Unless this HARD drive can be connected to a supported interface card you won't have much luck. You don't mention the interface - if "Server Grade" arrives as meaning 'external SAS port to support RAID card' then it should 'work '.

    From what you describe, I'm imagining a USB - this is not taken care of for a data store.

  • How to add FK in data with the option off maker

    Hello

    I'm designing a new scheme where I have to create the new tables with FK. I want to create the FK with option off, I see no possibility to do so in the Data Modeler. I can see the option to not generate, but it will not create the FK with option off.

    Can anyone help please?

    Thank you
    Vishal Gupta

    For every person who says 'I can manage the integrity of data loading data', there is a person who cannot.

    I worked in large single database systems, we had 1.25PB (Yes petabytes) of the disk and I've never seen an improvement in the performance of the deactivation of the constraints that have made a difference worth having.

    On the other hand I was paid a lot of money to clean up the mess after the fact, when the promise of the integrity of the data by code failed to materialize.

  • How to add the new page with the new preferences marginal?

    Hello

    can someone tell me? How to add new page with specific preferences marginal? is it possible to add the margin setting when adding page?

    Part of engineering substances comes with Google when necessary. (I think)

    nt-considered-harmful http://blog.boyet.com/blog/javascriptlessons/javascript-for-c-programmers-the-with-stateme / ... and much more can be found "with statement considered as harmful.

    There is nothing wrong with the definition of the properties on one line, except that it becomes progressively harder to read, understand, maintain, and update:

    myDoc = app.activeDocument;
    var myLastPage = myDoc.pages.add(LocationOptions.AT_END, undefined, {marginPreferences:{bottom:"6p", left:"6p", right:"4p", top:"4p"} });
    

    Note that since you are using "LocationOptions.AT_END", you don't have to use a reference to any page. This is only necessary when you want to insert a page anywhere except at the end or the beginning.

  • Can I add a new page with editing in the browser in Muse?

    Is it possible to add a new page in the browser by using capacities within the Muse of edition?

    Lol you can only edit existing pages within the existing limits.

    Mylenium

  • How to add a new data source

    Hello

    If anyone can help, I need to add a new connection to oracle OBIEE and the database database. How can I achieve this, I have to define an ODBC connection or there at - he of the underlying configuration files on the server that need to be updated?

    Thank you

    Hello
    You must set up a new odbc connection

    another import directly---> OIC 10 / 11g--> give the tnsname, the username, the password

    Thank you
    Saichadn.v

  • HP envy 750: attempt to add to new PC SATA drive

    You want new 750-150xt to which I want to add my old Pavilion 6380 640 GB SATA drive.  6380 road was only the disk and the disk to boot under Windows 7 64-bit.  Envy has a 256GB SSD as boot drive and a data HD 1 TB drive.

    Pulled out of 6380 and added to the Bay, third player hooked up a new "SATA3" on MB black SATA cable and power cable to the drive then gave.  Noticed in passing that my SATA cable did not have a ground wire wrapped with her which was attached to the chassis of the new PC.

    By turning on the PC, it would not go beyond the HP splash screen.   Disconnected former player and removed, and the envy of 150 started very well except the logon screen "grated" for 1-2 seconds, then stabilized.  Seems to work normally.

    FYI - SATA3 socket on MB was a red taken versus black and only available SATA labeled sockets.  Others were all occupied.

    Any thoughts?

    So what is the connected CD drive? Must be the SATA 2. If she jumps from the 1 SATA to SATA 3 something should be available here. The question is not only the availability of a place to connect, it is that the software has progressed where you were with this player and Windows 8/10 uses a completely different approach to find and boot from hard drives.

  • Issue of SDRS to vCloud Director after you add the new data store to the Cluster of DTS

    Hi people,

    We use vCloud Director 5.5 in a vSphere full 5.5 environment.

    We have several DTS Cluster in vSphere and connected to vCloud Director.

    Following problem.

    When I add a data store to a Cluster of DTS and connect this to the corresponding storage profile data store, the storage profile is not available to vCloud Director more.

    After removing the new store data in the cluster of DTS, the profile becomes available again.

    Any ideas?

    Concerning

    Jean

    How did you the storage profile associated with the data store?  via c# client or vSphere web client?

    If you did the wrong way (c#) there no storage class label appropriate against it.

    A data cluster store has the storage class who would have all preparations of data contained inside.

    I think that you should check the service class is associated properly in vSphere web client (before adding to the DS Cluster).  Once it displays correctly, and then add the data store to the cluster.

  • Last update adds a new tab with social media links to the exsisting homepages. How can I stop this?

    When I open Firefox, my home pages (4) shall, after a slight delay, a new tab appears with links to social media and the new tab is active. I want to stop the new tab to open!

    Uh-oh, you may have installed a non official package containing the update. If your download history indicates the source, can report you here?

    Your "more system details' shows the extension MySearchDial. I recommend you to remove that from the addons page (if possible) or from the control panel.

    Either:

    • CTRL + SHIFT + a
    • Firefox orange (or the Tools menu) button > Add ons

    In the left column, click Extensions. Then find MySearchDial and remove (or at least turn it off).

    If necessary, open the Control Panel, uninstall a program, then click on "installed on" heading of the column to bring recent infections, uh, additions, upward.

    Hopefully he cleaning?

Maybe you are looking for

  • Average arithmetic

    Hello! Does anyone have the VI of average arithmetic OpenG (at least that table 2D). I installed the OpenG digital package, but he can find. Or maybe better yet, someone at - it a VI or a good solution for the calculation of the average of the column

  • How can we get the bootloader again closed?

    Hello I unlocked the bootloader on my Xperia thumb with "fastboot.exe-i 0x0fce oem unlock 0 x."course. " Since then refused SUS or PCCompanion update to a newer version of Android. It appears the error code "2003". How can we get the bootloader again

  • Problems with changing colors

    As far as I know, I'm running Vista Basic and Aero for my color scheme.  Don't know which, it seems not switch back.  in any case, I would like to change the color of my windows, but when I go to the customization and windows color and appearance, it

  • using mail app - view all outlook emails

    When I use IE 10 in outlook mail access it displays emails to June 2013 (when I opened the account). My mail app goes back only 30 days. I think I got him to show last month. How to reset my email application to display all THE EMAILS? Is no longer a

  • Printer HP LaserJet 1020 Unrecoginzed on Windows 8

    Hello My printer is HP LaserJet 1020. It worked perfectly when I plugged in my laptop HP running Windows 7. However, when I connected the printer to my Asus X202E Windows 8 64 bit and installed the latest driver downloaded from the HP Web site, a mes