synonyms cannot be recompiled when arrays are deleted and recreated?

Hello

I have a synonym pointing to a table.


(1) when I remove and recreate a table...

is it not enough to recompile the synonym? I have to drop the synonym as well and re-create again?

(2) when I add new columns to a table synonym also will appear the new column?

Thanks in advance
REDA

Your first question is answered below. You can see the synonym didn't need to be re-created or compiled or whatever it is.

Your second question... synonyms is not the columns. Thinking of views instead of SYNONYMS?

SQL> create table t(c number);

Table created.

SQL> insert into t values (42);

1 row created.

SQL> commit;

Commit complete.

SQL> create synonym t_syn for t;

Synonym created.

SQL> select * from t_syn;

                   C
--------------------
                  42

SQL> drop table t;

Table dropped.

SQL> create table t(c number);

Table created.

SQL> insert into t values (42);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from t_syn;

                   C
--------------------
                  42

Tags: Database

Similar Questions

  • Files size columns pane does not update when files are deleted

    Version of Thunderbird 38.4.0 day the "Total"-column, when files are deleted, but the column "size" in unchanged.»

    I use the 'size' as you mentioned above to remind myself to keep my records.

    When you delete a message, it is "marked as deleted" and from your point of view, it disappears from the eg: Inbox and moves to the folder "Deleted/trash".

    In reality, it's still in the Inbox, looks and "marked as deleted.

    This makes it much easier to retrieve a message deleted if made in error.

    To remove all traces of messages "marked as deleted", you need to compact your folders.
    Right click on "Inbox" and select "compact".

    Or do all the folders 'file' > 'Compact '.

    You will also notice that when you empty the "Junk" folder, it also still shows a size until you compact the fodler.

    Compaction, it's something, you should do regularly especially on the Inbox and Junk folders as they propbably make the most of the activity when it comes to deletion.
    Compaction is a way to keep your files and to create a space.

    If you were not compact, then it is advisable to create abackup first, just in case there is a hidden file corruption.

    More info on:
    How to keep your health thunderbird:

    Compaction - what it does and why it is important.

    Backup:

  • Cannot hear sound when it is online and when trying to install flash player then it show ATL file DLL missing, please reinstall the program

    Cannot hear sound when it is online and when trying to install flash player then it show ATL file DLL missing, please reinstall the program

    Hello

    We are pleased to hear that you were able to find a solution to the question and I thank you for the information provided. Do not hesitate to contact us, in the case where you face other problems in the future.

  • Music files are deleted and not in the trash. RealPalyer? iTunes? And my hard drive has failed. I'm not a backiup error code

    Well I'm puzzled! I was ofline for a week, but I have recently installed to realpayer, also have itunes and media center. Well, someone removed my music! Beegees to mr. bungle, the files are gone! not in the trash, Whats up? No one else has access to my computer. It's a dvV9620 HP Pavillion w / vista.
    I installed to bitcomet and just installed malwarebytes anti-malware. already running mcaffe suite only.
    ALSO, I got a message from one of my drives is going to die, its my DATA d, the disk drive is ok. I'm doing a backup but cnanot, it gives me an error code: 0 x 80070002. Plan on replacing soon with a bigger drive.
    None of my videos are deleted, lost stuff from youtube.
    I can't understand where will my music! Help!  And since I downloaded RealPlayer, I noticed that when I burn a disc with windows media center, it burns in cda instead of mp3 format. Just who prevailed here?

    Thanks, I was able to make a creation of HP recovery disk, which I hope is what will be needed for the installation. my D drive is a failure, will pull on it, install a 500 GB on my cdrive, and put the old drive to 120 GB of drive c as the d drive.
    any advice is welcome.
    Deleting files of MUSIC thing - appears only full albums and CD have been affected, none of the songs from youtube are touched, weird...
    I checked under my PC USERS, delete a user called ASP.NET, have no idea where it came from, bitcomet blocking in the future.
    SUX having to rip my CD in my media library again... I have hacked huh?

  • Why it triggers the validation of the obligation when rows are deleted?

    Hello


    My standard Page, Modal I do my secondary Page. I have a grid in my subpage. Record of grid has some
    Required fields. I also have a box in my secondary page, when this box is checked, my grid will be hidden and lines
    be deleted.


    WE CHANGE THE CHECKBOX FIELD:

    & myRowset = GetRowset (Scroll.MY_GRIDRECORD);


    If MY_RECORD. CHECK_BOX_FIELD = 'Y' Then
    GROUPBOX. Visible = False;
    I = 1 & at & myRowset.ActiveRowCount
    & myRowset.DeleteRow (1);
    -End;
    & myRowset.HideAllRows ();
    On the other

    GROUPBOX. Visible = True;
    & myRowset.ShowAllRows ();
    End - If;



    WE CHANGE THE SCOPE OF MY OK BUTTON:

    & myRowset = GetRowset (Scroll.MY_GRIDRECORD);


    If MY_RECORD. CHECK_BOX_FIELD = 'Y' Then
    I = 1 & at & myRowset.ActiveRowCount
    & myRowset.DeleteRow (1);

    -End;
    End - If;

    EndModal (1);


    Be default checkbox is not checked, and I press OK, it saves even there is no row in my grid but
    Whenever I checked or not checked the checkbox, then press OK.

    Error comes:
    The highlighted area is required. You must enter a value for it before you continue. (15,54)

    The specified field is required, but has no value.

    My question is, I am remove the record grid OK lines as well as the change of field checkbox if the box is checked then why it triggers the validation of the requirement?

    That shouldn't be the case. You could try to encode like this; where you only use the DeleteRow when you press the OK button and not when you press the checkbox. Be sure to include the step - 1, otherwise it will fail anyway.

    ON FIELD CHANGE OF CHECK BOX :
    
    If MY_RECORD.CHECK_BOX_FIELD = "Y" Then
    GROUPBOX.Visible = False;
    &myRowset.HideAllRows();
    Else
    GROUPBOX.Visible = True;
    &myRowset.ShowAllRows();
    End-If;
    
    ON FIELD CHANGE OF MY OK BUTTON :
    
    &myRowset = GetRowset(Scroll.MY_GRIDRECORD);
    If MY_RECORD.CHECK_BOX_FIELD = "Y" Then
    For &i = &myRowset.ActiveRowCount to 1 Step -1
    &myRowset.DeleteRow(&i);
    End-For;
    End-If;
    
    /* Save and do further processing */
    
  • Virtual machines on NFS data warehouses freeze when snapshots are deleted

    I'm running 3 ESXi 4.1 update 1 guest (essentials more license) with shared storage on a NetApp FAS2040 accessible via NFS. 5.2 PHD virtual is deployed for backups. Each time the backup is completed on a virtual machine and the snapshot is removed, the virtual machine in question freezes completely (not yet responding to pings) for 10 to 30 seconds. The issue is documented in the following VMware article:

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1031106

    However, while the article claims that the problem has been resolved in a fix, I persist it despite running on the last level of patch (build 433742). Is that all that I should have done after installing the latest patch? If the issue is not yet fixed, is there one solution other than to switch to iSCSI?

    According to Ko, the patch is ESXi 4.1 patch ESXi410-201104402-BG contains vmware-tools. One thing to try is maybe upgrade your vmware tools in the virtual machine? (I don't know if you have upgraded)

  • Find the right Partition for swap Partiton when there are PARTITION and SUBPARTITION

    Hi all

    I have a small problem:

    I want to find the right cause of partitions of the partition key.  I have a partition and a Subpartition (sample - table in annex).

    I leave the database to generate the partition (and name), the name is generated. I need to find for the exchange of partition

    the right of Partition has cause of a given value of the partition key (in this case EVOD_PART_DATE and 20141101 value).

    When I try to find the right partiton name, I would use generally not:

    SELECT DISTINCT dbms_rowid.rowid_object(ROWID) data_object_id
       FROM F_CONTRACT_EVENT
       WHERE  EVOD_PART_DATE = TO_DATE ('20141101','YYYYMMDD')
    

    Okay, I get 2 rows, I'm expecting one, but cause the result are the subpartions, I get this:

      SELECT *  FROM ALL_OBJECTS WHERE DATA_OBJECT_ID IN ( 155159,155154);
    

    I see:

    EVO_DM    F_CONTRACT_EVENT    SYS_SUBP4292    155159    155159    TABLE SUBPARTITION
    EVO_DM    F_CONTRACT_EVENT    SYS_SUBP4287    155154    155154    TABLE SUBPARTITION
    

    But I don't want the subparts, I want the PARTITON!

    The table:

    CREATE TABLE "EVO_DM"."A0_F_CONTRACT_EVENT" 
       ( "EVOD_DDATE_ID_VALID_FROM" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DDATE_ID_VALID_TO" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DTIME_ID_START" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DSUST_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCHAN_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DARTI_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCAMP_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DUSAG_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DOPSY_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DDEVI_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DSHOP_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DPLFO_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DACCO_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DDECL_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DOBJT_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DOFFR_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCNTR_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCURR_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DCONT_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DIVWC_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "DD_SUBSCRIPTION_ID" VARCHAR2(50 BYTE) DEFAULT '~' NOT NULL ENABLE, 
        "SINGLE_ISSUE" NUMBER(8,0) DEFAULT 0, 
        "SUBSCRIPTION" NUMBER(8,0) DEFAULT 0, 
        "RENEWAL" NUMBER(8,0) DEFAULT 0, 
        "CONVERSION" NUMBER(8,0) DEFAULT 0, 
        "DOWNLOAD" NUMBER(8,0) DEFAULT 0, 
        "UPDATES" NUMBER(8,0) DEFAULT 0, 
        "NET_VALUE_IN_EUR" NUMBER(10,4) DEFAULT 0 NOT NULL ENABLE, 
        "GROSS_VALUE_IN_EUR" NUMBER(10,4) DEFAULT 0 NOT NULL ENABLE, 
        "COMMISSION_IN_EUR" NUMBER(10,4) DEFAULT 0 NOT NULL ENABLE, 
        "TAX_IN_EUR" NUMBER(10,4) DEFAULT 0 NOT NULL ENABLE, 
        "POSITION_NR" NUMBER(3,0) DEFAULT -1, 
        "DD_ORDER_NR" VARCHAR2(50 BYTE) DEFAULT '~' NOT NULL ENABLE, 
        "EVOD_SOURCE_CD" VARCHAR2(50 BYTE) DEFAULT '~' NOT NULL ENABLE, 
        "FLAG_STOCK_RELEVANT" NUMBER(1,0) DEFAULT '0' NOT NULL ENABLE, 
        "RENEWAL_NR" NUMBER(3,0) DEFAULT -1, 
        "EVOD_DDATE_ID_SUBSCRIPTION" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
        "EVOD_DPRCG_ID" NUMBER(20,0) DEFAULT -1 NOT NULL ENABLE, 
      
       EVOD_PART_DATE DATE  GENERATED ALWAYS AS ( TRUNC(TO_DATE(TO_CHAR(EVOD_DDATE_ID_VALID_FROM),'YYYYMMDD'),'MM')) VIRTUAL)
    PARTITION BY RANGE(EVOD_PART_DATE)
    interval(NUMTOYMINTERVAL (1,'MONTH'))
    SUBPARTITION BY LIST(EVOD_SOURCE_CD)
    SUBPARTITION TEMPLATE(
    SUBPARTITION "P_ITUNES"  VALUES ('ITUNES') ,
    SUBPARTITION    "P_WSP"  VALUES ('WSP'),
    SUBPARTITION   "P_GOOGLE"  VALUES ('PLAYSTORE'),
    SUBPARTITION   "P_DEFAULT"  VALUES ('~') ,
    SUBPARTITION   "P_AMAZON"  VALUES ('AMAZON_EREADER', 'AMAZON_MANUELL', 'AMAZON_TABLET') ,
    SUBPARTITION    "P_MSD"  VALUES ('MSD')
    )
    (
     PARTITION P01 VALUES LESS THAN (TO_DATE('200310','YYYYMM')) SEGMENT CREATION DEFERRED
    )
    PARALLEL 10  ;
    

    Any ideas?

    Thanks for Berlin

    First of all - the DOF you posted is INVALID - you do not specify a delayed segment creation for partitions. Specify you for the table.

    Also, you must remove the DEFAULT value - 1 for the partitioning column. The value '-1' cannot be converted to a valid date for the virtual partitioning column value.» The default value is useless and will give confusion around the year exception err when the exception should actually provide a NULL value for a column not null.

    The documentation explains how to use the EXCHANGE PARTITION and has the code example

    Maintenance of Partitions

    Exchange a Partition of a partitioned Table interval

    You can exchange of range partitions in a partitioned table interval. However, you must make sure that the partition of the interval was created before that you can swap partition. You can leave the database create the partition in the partition of the interval of locking.

    The following example shows an Exchange partition for the interval_sales table, range-partitioned using the monthly from partitions of 1 January 2004. This example shows how to add data to the table using charge Exchange partition for June 2007. Assume there is only a local index on the interval_sales table and equivalent index have been created on the interval_sales_june_2007 table.

    LOCK TABLE interval_sales  PARTITION FOR (TO_DATE('01-JUN-2007','dd-MON-yyyy'))  IN SHARE MODE;    ALTER TABLE interval_sales  EXCHANGE PARTITION FOR (TO_DATE('01-JUN-2007','dd-MON-yyyy'))  WITH TABLE interval_sales_jun_2007  INCLUDING INDEXES;
    

    Note the use of the FOR syntax to identify a partition that has been generated by the system. The name of the partition can be used by querying the *_TAB_PARTITIONS view of data dictionary to find the partition system-generated name.

    Given that the last paragraph? That's what showed Solomon.

    NOTE:-special attention to the FIRST paragraph. If you use segment carried OVER creating the partition you want to Exchange could NOT have been created yet.

    Make SURE that you lock the partition as the example shows, or you will get an exception if it has not been created.

    Also - we know NOT what PROBLEM you're trying to solve.

    If you exchange a PARTITION of a table subpartitioned your working table should actually be partitioned using the SAME parttioning as the subparts in the source table:

    See my response in this thread:

    https://forums.Oracle.com/forums/thread.jspa?threadID=2482090&TSTART=30

    In this thread I have provide the code example illustrating how the table should be created and made Exchange.

  • Problems with views. When no data I have to delete and recreate it

    Hi all.

    I have a problem with views. From time to time I can't see the data from the query, and I have to file the notice and then create it again, after that it works.

    Any idea?

    Best regards

    Hello.

    The benefits of joining is correct.

  • After deletion and recreation vdmk vm file will be not turn on

    I went into the store database and deleted a second virtual disk that I created a server (file vdmk). Now when I try to poweer on the server, I got the error failed to open the disk ' / vmfs/volumes/4f5f4624-4be43ce3-bdbd-047d7b415b9b/servername.vmdk' or one of the snapshot disks it depends on.

    I am under an esx environment 5. The virtual machine is a W2K8 R2 Server with two virtual drives. I checked the management of snapshots and there are no snapshots. I scoured the data store and sees not all duplicate files or additional files referencing the virtual disk in question. Any ehelp would be apprecaited.

    The two entries are pointing to the same virtual disk, just so remove disks from the hardware list without deleting the files on the disc.

    André

  • Deletion and recreation of RODC - I'll have to redo all the VMS to only RODC

    Hello

    We have a RODC & global catalog server which fails to replicate. If we remove the role and rebuild it. It break relationships of trust with all virtual machines to only that RODC?

    I have done in the past and have encountered this problem. There were a few more questions then are not present now well.

    any help would be appreciated.

    Thank you

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • 'HP_Tools' to delete and recreate it as a logical partition

    Hello! I have to do some operations on the hard disk partitions. Now, I have 4 primary partitions: System, the partition with Win7, recovery and HP_Tools. I need an another primary partition, and I don't want to remove the HP_Tools! That's my idea:

    1. create an image of 'system' of the operating system on DVD and remove recovery;

    2. create a HP_Tools image and delete it.

    3. create an extended partition. Create a logical partition and then restore HP_Tools inside.

    Thus, HP_Tools will keep its functions? Or it may not work correctly as a logical partition?

    Thank you

    Davide

    Yes, you can create the recovery kit, and then remove the recovery Partition. Here is the link that has the steps to create and then how to use them in the future:

    http://support.HP.com/us-en/document/c01895783

    You can remove the HP tools partition and create it on a flash drive or USB key. Here is the link that will help you download the utility that will help you recreate HP tools partition on the disk on the flash drive or hard:

    http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-99123-1&cc=us&DLC=en&LC=en

  • Command for delete (and recreate) LinkClones every night

    It is more a matter of health mental-check!

    Our automated clones link have value REFRESH on logoff.

    However, we would like to recreate the link clones each night so that the quickprep script runs (as the script performs some special actions, we want that every day).

    What command effectively removes a desk If nobody is logged on? Once removed, the pool automatically create a new office to bring about the desired level, and this new office would go quickprep.

    Is the Send-LinkedCloneRecompose order of the best way to get what I want?

    $POOLID = MYPOOLNAME

    $parentVMPath = get-pool-Pool_id $POOLID | Select - enlarge parentVMPath

    $parentVMSnapshotPath = get-pool-Pool_id $POOLID | Select - enlarge parentVMSnapshotPath

    Get-pool-Pool_id $POOLID | Get-DesktopVM | Send-LinkedCloneRecompose - ParentVMPath $parentVMPath ParentSnapshotPath - $parentVMSnapshotPath - annex ((Get-Date).) AddHours (1)) -forceLogoff $false - stopOnError $true

    Our office is available 24 hours and, although more quiet during the night, still define the task on logoff and ensure that X number of machines is always available at any time.

    Just update,

    Script created with plugins views and VC PS.

    • Create new snapshot
    • Remove the old snapshot
    • Redial the new snapshot

    All the work as expected.

  • RDM to delete and recreate the mapping of RDM file and fix

    Hello

    I wrote the following script, but it works fine except it does not create the mapping of RDM file.

    If I comment out the following lines, it works fine.

    $fileMgr.DeleteDatastoreFile_Task ($name, $datacenter)

    $spec.deviceChange [0] .fileOperation = "crΘer".

    Here is the code below

    Replace-VM-RDM function {}

    Param ($scsiid, $rdmname, $vmname, $filename)

    < #.

    Convert SCSI address in Vmware format

    # >

    $scsicontroller = $null

    $scsiid_split = $null

    $scsiid_split = $scsiid.split(":")

    $scsicontroller =($scsiid_split[0])

    # SCSI VMware in the GUI controller ID is a number greater than the real controller id

    $scsicontroller = [int] $scsicontroller + 1

    # Vmware waiting conntroller with 4-character id

    $scsicontroller =($scsicontroller.) (ToString()) + "000".

    $scsicontroller

    # SCSI LOGICAL UNIT NUMBER

    $scsilun = $null

    # VMware SCSI LUN ID in the GUI is a higher number than the id real lun

    $scsilun = [int]($scsiid_split[1]) #+ 1

    ###

    $vm = get-VM-name '$vmname ' | Get-View

    IF (!) (($filename))) {}

    $RDMFile = $rdmname.split("") [0] + "_RDM.vmdk"

    $filename = (($vm.)) (Config.Files.VmPathName). Replace("$vmname.vmx","$RDMFile"))

    }

    $esx is get-view $vm. Runtime.Host

    < #.

    Download CanonicalName RDM Lun

    # >

    $rdmCanonicalName = $null

    $rdmCanonicalName = (($esx.)) Config.StorageDevice.ScsiLun | where {$_.} DisplayName - eq $rdmname}). CanonicalName)

    $rdmDevicePath = (($esx.)) Config.StorageDevice.ScsiLun | where {$_.} DisplayName - eq $rdmname}). DevicePath)

    foreach ($dev in $vm. Config.Hardware.Device) {}

    If (($dev.)) GetType()). {Name - eq "VirtualDisk")}

    If (($dev.Backing.CompatibilityMode-eq "physicalMode") - or)

    ($dev.Backing.CompatibilityMode-eq "virtualMode")) {}

    If (($dev.)) ControllerKey - eq "$scsicontroller") - and ($dev. UnitNumber - eq "$scsilun")) {}

    # Remove the hard drive

    $hd = get-disk hard $vm.name | where {$_.} Filename - eq $dev. Backing.FileName}

    $hd | Remove-hard drive - confirm: $false

    Write-Host "file name:" $dev.backing.fileName "

    Write-Host "Disk Mode:" $dev.backing.diskMode

    $dev.backing.deviceName

    $dev.backing.lunUuid

    $DevKey = $dev.key

    $CapacityInKB = $ dev. CapacityInKB

    $fileMgr = get-View (view Get ServiceInstance). Content.fileManager

    $datacenter = (get-View (Get - VM $VMname |)) Get-Datacenter) USER.USER) .get_MoRef)

    foreach ($disk in $vm. LayoutEx.Disk) {}

    if($Disk.) Key - eq $dev. Key) {}

    foreach ($chain in $disk. {String)

    foreach ($file in $chain.) FileKey) {}

    $name = $vm. LayoutEx.File [$file]. Name

    $fileMgr.DeleteDatastoreFile_Task ($name, $datacenter)

    }

    }

    continue

    }

    }

    }

    }

    Else if (($dev.)) ControllerKey - eq "$scsicontroller") - and ($dev. UnitNumber - eq "$scsilun")) {Write-Host "Selected SCSI address [$scsiid] is not a RDM"}

    }

    }

    #$hd1 = New-disk hard - VM $vmname - DeviceName $rdmDevicePath - DiskType RawPhysical # this line works

    $spec = $null

    $spec = new-Object VMware.Vim.VirtualMachineConfigSpec

    $spec.deviceChange = @)

    $spec.deviceChange += new-Object VMware.Vim.VirtualDeviceConfigSpec

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDisk .device

    $spec.devicechange [0].device.capacityInKB = $CapacityInKB

    $spec.deviceChange [0].device.backing = new-Object VMware.Vim.VirtualDiskRawDiskMappingVer1BackingInfo

    $spec.deviceChange [0].device.backing.fileName = $filename

    $spec.deviceChange [0].device.backing.compatibilityMode = "physicalMode".

    $spec.deviceChange [0].device.backing.diskMode = «»

    $spec.deviceChange [0].device.backing.lunUuid = (($esx.)) Config.StorageDevice.ScsiLun | where {$_.} DisplayName - eq $rdmname}). UUID)

    $spec.deviceChange [0].device.connectable = new-Object VMware.Vim.VirtualDeviceConnectInfo

    $spec.deviceChange [0].device.connectable.startConnected = $true

    $spec.deviceChange [0].device.connectable.allowGuestControl = $false

    $spec.deviceChange [0].device.connectable.connected = $true

    # Take the next unused volume for HD key

    $spec.deviceChange [0].device.key = $DevKey + 1

    # 7 SCSIID UnitNUmber is reserved for the controller - then go to 8.

    If ($scsilun - eq 6) {$scsilun = $scsilun + 1}

    # Take the next unit for the HD number

    $spec.deviceChange [0].device.unitnumber = $scsilun

    # Key device for the SCSI controller

    $spec.deviceChange [0].device.controllerKey = $scsicontroller

    # Create vmdk file

    $spec.deviceChange [0] .fileOperation = "crΘer".

    $spec.deviceChange [0] .operation = 'Add '.

    $vm = get - View (Get - VM $VMname) USER.USER

    $vm. ReconfigVM_Task ($spec)

    }

    Replace-VM-RDM $vmname $scsiid $rdmname $filename

    I am working, it just need to reorganization and then the Devicename was wrong.

    Here's the script working.

    Replace-VM-RDM function {}

    Param ($scsiid, $rdmname, $vmname, $filename)

    <>

    Convert SCSI address in Vmware format

    #>

    $scsicontroller = $null

    $scsiid_split = $null

    $scsiid_split = $scsiid.split(":")

    $scsicontroller =($scsiid_split[0])

    # SCSI VMware in the GUI controller ID is a number greater than the real controller id

    $scsicontroller = [int] $scsicontroller + 1

    # Vmware waiting conntroller with 4-character id

    $scsicontroller =($scsicontroller.) (ToString()) + "000".

    $scsicontroller

    # SCSI LOGICAL UNIT NUMBER

    $scsilun = $null

    # VMware SCSI LUN ID in the GUI is a higher number than the id real lun

    $scsilun = [int]($scsiid_split[1]) #+ 1

    ###

    $vm = get-VM-name '$vmname ' | Get-View

    IF (!) (($filename))) {}

    $RDMFile = $rdmname.split("") [0] + "_RDM.vmdk"

    $filename = (($vm.)) (Config.Files.VmPathName). Replace("$vmname.vmx","$RDMFile"))

    }

    $esx is get-view $vm. Runtime.Host

    <>

    Download CanonicalName RDM Lun

    #>

    $rdmCanonicalName = $null

    $rdmCanonicalName = (($esx.)) Config.StorageDevice.ScsiLun | where {$_.} DisplayName - eq $rdmname}). CanonicalName)

    $rdmDevicePath = (($esx.)) Config.StorageDevice.ScsiLun | where {$_.} DisplayName - eq $rdmname}). DevicePath)

    foreach ($dev in $vm. Config.Hardware.Device) {}

    If (($dev.)) GetType()). {Name - eq "VirtualDisk")}

    If (($dev.Backing.CompatibilityMode-eq "physicalMode") - or)

    ($dev.Backing.CompatibilityMode-eq "virtualMode")) {}

    If (($dev.)) ControllerKey - eq "$scsicontroller") - and ($dev. UnitNumber - eq "$scsilun")) {}

    # Remove the hard drive

    $hd = get-disk hard $vm.name | where {$_.} Filename - eq $dev. Backing.FileName}

    $hd | Remove-hard drive - confirm: $false - DeletePermanently

    Write-Host "file name:" $dev.backing.fileName "

    Write-Host "Disk Mode:" $dev.backing.diskMode

    $dev.backing.deviceName

    $dev.backing.lunUuid

    $DevKey = $dev.key

    $CapacityInKB = $ dev. CapacityInKB

    <#$fileMgr =="" get-view="" (get-view="">

    $datacenter = (get-View (Get - VM $VMname |)) Get-Datacenter) USER.USER) .get_MoRef)

    foreach ($disk in $vm. LayoutEx.Disk) {}

    if($Disk.) Key - eq $dev. Key) {}

    foreach ($chain in $disk. {String)

    foreach ($file in $chain.) FileKey) {}

    $name = $vm. LayoutEx.File [$file]. Name

    $fileMgr.DeleteDatastoreFile_Task ($name, $datacenter)

    }

    }

    continue

    }

    }#>

    }

    }

    Else if (($dev.)) ControllerKey - eq "$scsicontroller") - and ($dev. UnitNumber - eq "$scsilun")) {Write-Host "Selected SCSI address [$scsiid] is not a RDM"}

    }

    }

    #$hd1 = New-disk hard - VM $vmname - DeviceName $rdmDevicePath - DiskType RawPhysical # this line works

    $spec = $null

    $spec = new-Object VMware.Vim.VirtualMachineConfigSpec

    $spec.deviceChange = new-Object VMware.Vim.VirtualDeviceConfigSpec [] (1)

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDeviceConfigSpec

    # Create vmdk file

    $spec.deviceChange [0] .fileOperation = "crΘer".

    $spec.deviceChange [0] .operation = 'Add '.

    $spec.deviceChange = new-Object VMware.Vim.VirtualDeviceConfigSpec [] (1)

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDeviceConfigSpec

    $spec.deviceChange [0] .operation = 'Add '.

    $spec.deviceChange [0] .fileOperation = "crΘer".

    $spec.deviceChange [0] = new-Object VMware.Vim.VirtualDisk .device

    $spec.deviceChange [0].device.key = - 100

    $spec.deviceChange [0].device.backing = new-Object VMware.Vim.VirtualDiskRawDiskMappingVer1BackingInfo

    $spec.deviceChange [0].device.backing.fileName = "$filename".

    $spec.deviceChange [0].device.backing.deviceName = (($esx.)) Config.StorageDevice.ScsiLun | where {$_.} DisplayName - eq $rdmname}). DevicePath)

    $spec.deviceChange [0].device.backing.compatibilityMode = "physicalMode".

    $spec.deviceChange [0].device.backing.diskMode = «»

    $spec.deviceChange [0].device.connectable = new-Object VMware.Vim.VirtualDeviceConnectInfo

    $spec.deviceChange [0].device.connectable.startConnected = $true

    $spec.deviceChange [0].device.connectable.allowGuestControl = $false

    $spec.deviceChange [0].device.connectable.connected = $true

    # Key device for the SCSI controller

    $spec.deviceChange [0].device.controllerKey = [int] $scsicontroller

    # 7 SCSIID UnitNUmber is reserved for the controller - then go to 8.

    If ($scsilun - eq 6) {$scsilun = $scsilun + 1}

    # Take the next unit for the HD number

    $spec.deviceChange [0].device.unitnumber = [int] $scsilun

    $spec.deviceChange [0].device.capacityInKB = [int] $CapacityInKB

    $vm = get - View (Get - VM $VMname) USER.USER

    $vm. ReconfigVM ($spec)

    }

    Replace-VM-RDM $vmname $scsiid $rdmname $filename

  • Arrays are objects — really?

    Dear experts and gurus,

    More I read the more I am confused. Every now and then the talk is "JS arrays are objects and where they are passed by reference. However, simple experiences leave my perplexed: it is the same as for light (depending on the view, it behaves as waves or particles):

    gaSomething = ["a","b", "c"];
    Update (gaSomething);
    alert (gaSomething.join("\n"));         // the global array has changed
    
    DeleteItem (gaSomething, "7");
    alert (gaSomething.join("\n"));         // the global array has not changed
    
    function Update (array) {
      for (var j= 0; j < 9; j++) {
        array.push(j+1); 
      }
    }
    
    function DeleteItem (array, item) {
      var index = IsInArray (array, item);
      var lower = array.slice (0, index);   // lower part
      var upper = array.slice (index+1);    // upper part
      var locArray    = lower.concat(upper);
      array = locArray;                     // transfer data
    alert ("in DeleteItem:\n" + array.join("\n"));
    }
    


    The only safe assumption is that JS arrays are not treated like objects and are therefore passed by value. It is so difficult to implement functions to remove items from several bays: for each table a separate function is necessary!

    Any ideas for a general DeleteItem function?

    Hi Klaus,

    It's very dangerous!

    1 array.length = array.length - 1 means: remove the last item in an array

    Array.Length = array.length - 5 removes the last 5 items in a table

    Delete array [index] Deletes only the VALUE of the element.

    When you sort, it's the end of the array and so you have managed to delete.

    My code in my last post IS WRONG:

    It must be:

    1. for (var j = 9; > 5; j - j) {}
    2. Array.Slice (j, 1);
    3. }

    However, I want to remove an item in the table. Unfortunately, there is no function of welding in'RE...

    It's slice - do Splice not!

    Need to remove reverse items.

    Try this function. It removes 3 and 2 points

    function DeleteItem (array, index)
    {
     $.writeln(array);
     for (var j=3 ; j > 1; j --)
        {
        $.writeln("delete: " + array[j]);
        array.splice(j,1);
        $.writeln(array);
        }  
    
    }
    
  • 12.4.1.6 iTunes will not display my iPhone and iPad over wifi when they are plugged in

    Since I updated iTunes to 12.4.1.6 none of my devices, iPhones and iPads appear in iTunes when they are connected and the setting is correct, to synchronize this device via wifi. Any help would be great.

    Thank you

    iOS: device not recognized in iTunes

    see: http://support.Apple.com/kb/TS1591

Maybe you are looking for

  • Repetitive blue screens on Satellite P50-A-12Z

    Hi all I bought my computer a month ago, and from time to time, my cell phone goes right down and restarts. The thing is that when he does, he does 3 or even 4 times in a row. This happened 5 or 6 times since I have (so I, like the accidents of 15 to

  • 5740 HP Office Jet: control of ink

    I have try the eprint order ink and cannot access the necessary request number bc, I'm running out of ink. When I print nothing shows up on the paper but the hp symbol. Suggestions?Thank you

  • Using a WRT54G2 as a wireless bridge

    I currently have a WRT54GL which works perfectly for years and now I want to create a wireless bridge to my home entertainment section.  I want to connect 2 or 3 devices and so I'm not looking at the WET54G for my solution. However, it is possible to

  • I recently reinstalled Win 7 Ultimate

    after reinstallation of win 7, I can't leave the previous home group, that option is NOT on the screen. This relocation was necessitated when I caught a virus and when I finally managed to put in things for... networking options etc, etc, etc.  I was

  • No sound from the laptop to the TV with HDMI connection

    Reference Dell Laptop windows 7 connected to the Samsung 46 '' smart TV with an HDMI cable.  Video works great but no sound on TV.  Is there a setting somewhere that will cause the audio to work from the laptop to the TV via the HDMI cable?