CDO$HELP.HLB  —  CDO Commands, DELETE

1  –  COLLECTION

    Format

      DELETE  COLLECTION  [ qualifier ] ...   collection-name ,... .

1.1  –  Parameters

1.1.1  –  collection-name

    Specifies the collection you are deleting.

1.2  –  Qualifiers

1.2.1    /DESCENDANTS

    Format options:

       /DESCENDANTS
       /NODESCENDANTS (default)

    Specifies whether CDO deletes members. When you specify the
    /DESCENDANTS qualifier, CDO deletes all members that are not
    also members of additional elements outside the area defined by
    your top collection.

1.2.2    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the
    collection is deleted.

1.3  –  Description

    The DELETE COLLECTION command deletes a collection and,
    optionally, all members of the collection.

    Because a collection is a controlled element, CDO freezes
    previous versions and allows you to delete only the highest
    visible version.

    If a collection is a member, you must delete its owners before
    you delete the collection. If the collection's immediate owner
    is a member of another element, you must trace the relationships
    back until you reach the element that has no owners and delete
    elements one by one, in sequence of ownership.

    If you attempt to delete a collection that owns a version in
    a different branch, the version must be the latest version in
    that branch. Otherwise, an error will occur. See the Oracle
    CDD/Repository Architecture Manual for complete information on
    branch lines of descent.

1.4  –  Examples

    1.CDO>  DELETE COLLECTION A_COLLECTION.

      In this example, the DELETE COLLECTION command deletes a
      collection that is not a member.

    2.CDO>  DELETE COLLECTION REGIONAL_SALES.
      CDO>  DELETE COLLECTION DISTRICT_SALES.
      CDO>  DELETE COLLECTION LOCAL_AREA_SALES.

      In this example, the DELETE COLLECTION command deletes a
      collection, a subcollection, and a further subcollection in
      sequence of ownership.

    3.CDO>  DELETE COLLECTION COMPILER_C(3).
      CDO>  DELETE COLLECTION COMPILER_C(2:UPDATE_BRANCH:2).
      CDO>  DELETE COLLECTION COMPILER(2:UPDATE_BRANCH:1).
      CDO>  DELETE COLLECTION COMPILER_C(2).
      CDO>  DELETE COLLECTION COMPILER(1).

      In this example, successive DELETE COLLECTION commands delete
      the main line and branch line versions of a collection in
      sequence of ownership. The branch line originates from version
      2 and merges back in version 3.

2  –  CONTEXT

    Format

      DELETE  CONTEXT  [ qualifier ] ...   context-name ,... .

2.1  –  Parameters

2.1.1  –  context-name

    Specifies the context you are deleting.

2.2  –  Qualifiers

2.2.1    /PARENTS

    Format options:

       /PARENTS
       /NOPARENTS (default)

    Specifies whether CDO deletes parents. If you have defined a top
    collection for the context, CDO cannot delete a parent that is
    also a parent of an element outside this collection or collection
    hierarchy.

2.2.2    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the context
    is deleted.

2.3  –  Description

    The DELETE CONTEXT command deletes a context.

    Because a context is a nonversioned element, CDO does not accept
    a branch designation or a version number in the context name.

    If a context is a child, you must delete its immediate parent
    before you delete the context. If the context's immediate parent
    is a child of another element, you must trace the relationships
    back until you reach the element that has no parents.

    If you delete your current context, CDO sets a null value for the
    current context before deleting the context.

    An error occurs if you attempt to delete a context that has
    opened files or reserved elements. The SHOW CONTEXT or SHOW
    RESERVATIONS command indicates whether this condition exists.

2.4  –  Examples

  CDO>  DELETE CONTEXT A_CONTEXT.

      In this example, the DELETE CONTEXT command deletes the A_
      CONTEXT context.

3  –  DATABASE

    Format

      DELETE  DATABASE  [ qualifier ]  rms-database-name .

3.1  –  Parameters

3.1.1  –  rms-database-name

    Specifies the physical RMS database element you are deleting.
    You can substitute an asterisk (*)  wildcard character for this
    parameter.

3.2  –  Qualifiers

3.2.1    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the physical
    RMS database element is deleted.

3.3  –  Description

    The DELETE DATABASE command deletes the physical RMS database
    (CDD$FILE) from disk and its CDD$DATABASE element from the
    repository.

    When you issue the DELETE DATABASE command, CDO prompts you
    to confirm that you want to proceed. You cannot suppress
    this prompt. If you respond Yes at the prompt, CDO deletes
    the highest visible version of CDD$FILE and, if you have not
    specified another version number, the highest visible version of
    CDD$DATABASE.

    If CDO cannot delete the physical RMS file from disk, the
    DELETE DATABASE command fails, and the CDD$DATABASE and CDD$FILE
    elements remain in the repository.

3.4  –  Examples

  CDO>  DELETE DATABASE /LOG EMP_FILE(1)

      In this example, the DELETE DATABASE command with the /LOG
      qualifier confirms that CDO deleted the RMS file from disk and
      the RMS database element EMP_FILE from the repository.

4  –  DICTIONARY

    See the DELETE REPOSITORY command.

5  –  DIRECTORY

    Format

      DELETE  DIRECTORY  [ qualifier ]   directory-name ,... .

5.1  –  Parameters

5.1.1  –  directory-name

    Specifies the repository directory you are deleting.

5.2  –  Qualifiers

5.2.1    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the directory
    is deleted.

5.3  –  Description

    The DELETE DIRECTORY command deletes a CDO directory.

    Unless you change directory protection, only the owner of a CDO
    directory or the system manager can delete a directory.

    You can delete only empty directories.

    CDO deletes only the last directory in a fully qualified
    path name. For example, if you specify a directory name of
    [SMITH.DICT]CORPORATE.PERSONNEL.SALARIED, CDO deletes only the
    SALARIED directory.

5.4  –  Examples

  CDO>  DELETE DIRECTORY /LOG PROSPECTS.
  %CDO-I-DIRDEL, directory PROSPECTS deleted

      In this example, the DELETE DIRECTORY command with the /LOG
      qualifier confirms that CDO deleted the PROSPECTS directory.

6  –  FIELD

    Format

      DELETE  FIELD  [ qualifier ] ...   field-name ,... .

6.1  –  Parameters

6.1.1  –  field-name

    Specifies the field element you are deleting. You can substitute
    an asterisk (*)  wildcard character for this parameter.

6.2  –  Qualifiers

6.2.1    /DESCENDANTS

    Format options:

       /DESCENDANTS
       /NODESCENDANTS (default)

    Specifies whether CDO deletes children. When you specify the
    /DESCENDANTS qualifier, and your field element is controlled,
    CDO deletes all children that are not also children of additional
    elements outside the area defined by your top collection. If the
    field is uncontrolled, CDO deletes all children that are not also
    children of any other elements.

6.2.2    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the field
    element is deleted.

6.3  –  Description

    The DELETE FIELD command deletes a field element from a
    repository.

    If a field element is controlled, CDO freezes previous versions
    and allows you to delete only the highest visible version. If a
    field element is uncontrolled, CDO deletes the highest version
    unless you specify another version number.

    You cannot delete a field that is a child. Delete the parent
    first, or include the /DESCENDANTS qualifier to delete parents
    and children at the same time.

6.4  –  Examples

  CDO>  DELETE FIELD /DESCENDANTS ORDER_NUMBER.

      In this example, the DELETE FIELD command with the /DESCENDANTS
      qualifier deletes the ORDER_NUMBER field element and its
      children.

7  –  FILE_ELEMENT

    Format

      DELETE  FILE_ELEMENT  type-name

                              [qualifier] ...  element-name  ,...  .

7.1  –  Parameters

7.1.1  –  type-name

    Specifies the type (MCS_BINARY or MCS_BINARY subtype) of the
    file element you are deleting. See the Oracle CDD/Repository
    Information Model Volume I for information on these types.

7.1.2  –  element-name

    Specifies the file element you are deleting. You can substitute
    an asterisk (*)  wildcard character for this parameter.

7.2  –  Qualifiers

7.2.1    /DESCENDANTS

    Format options:

       /DESCENDANTS
       /NODESCENDANTS (default)

    Specifies whether CDO deletes children. When you specify
    the /DESCENDANTS qualifier, CDO deletes all children that are
    not also children of additional elements outside the area defined
    by your top collection.

7.2.2    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the file
    element is deleted.

7.3  –  Description

    The DELETE FILE_ELEMENT command deletes a file element and,
    optionally, all children of the file element to the bottom of
    the collection hierarchy.

    Because a file element is a controlled element, CDO freezes
    all previous versions and allows you to delete only the highest
    visible version.

    CDO cannot delete the following versions in a branch line:

    o  A version that is owned by a version in a different branch

    o  A version that owns an intermediate version in a different
       branch

    See the Oracle CDD/Repository Architecture Manual for information
    on branch lines of descent.

7.4  –  Examples

    1.CDO>  DELETE FILE_ELEMENT MCS_BINARY PARSER_TABLES.

      In this example, the DELETE FILE_ELEMENT command deletes a file
      element definition that is based on the MCS_BINARY type.

    2.CDO>  DELETE FILE_ELEMENT MCS_BINARY PARSER_TABLES(3).
      CDO>  DELETE FILE_ELEMENT MCS_BINARY PARSER_TABLES(2:UPDATE_BRANCH:2).
      CDO>  DELETE FILE_ELEMENT MCS_BINARY PARSER_TABLES(3:UPDATE_BRANCH:1).
      CDO>  DELETE FILE_ELEMENT MCS_BINARY PARSER_TABLES(2).
      CDO>  DELETE FILE_ELEMENT MCS_BINARY PARSER_TABLES(1).

      In this example, successive DELETE FILE_ELEMENT commands delete
      the main line and the branch line versions of a file element in
      sequence of ownership. The branch line originates from version
      2 and merges back in version 3.

8  –  GENERIC

    Format

      DELETE  GENERIC  type-name

                         [qualifier] ...  element-name ,... .

8.1  –  Parameters

8.1.1  –  type-name

    Specifies the type of the generic element you are deleting. This
    type cannot be MCS_BINARY, an MCS_BINARY subtype, MCS_COLLECTION,
    MCS_CONTEXT, or MCS_PARTITION.

8.1.2  –  element-name

    Specifies the generic element you are deleting.

8.2  –  Qualifiers

8.2.1    /DESCENDANTS

    Format options:

       /DESCENDANTS
       /NODESCENDANTS (default)

    Specifies whether CDO deletes children. When you specify the
    /DESCENDANTS qualifier, and your generic element is controlled,
    CDO deletes all children that are not also children of additional
    elements outside the area defined by your top collection. If the
    generic element is uncontrolled, CDO deletes all children that
    are not also children of other elements.

8.2.2    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the generic
    element is deleted.

8.3  –  Description

    The DELETE GENERIC command deletes a generic element. This
    element can be based on a type supplied by Oracle CDD/Repository
    or a user-supplied type.

    If a generic element is a controlled versioned element, CDO
    freezes previous versions and allows you to modify only the
    highest visible version. If a generic element is an uncontrolled
    versioned element, CDO deletes the highest version unless you
    specify another version number.

    If you use SQL (structured query language) to delete an Oracle
    Rdb database file, the corresponding CDD$DATABASE element may
    remain in Oracle CDD/Repository. You can use the DELETE GENERIC
    command to delete this element.

8.4  –  Examples

    1.CDO>  DELETE GENERIC CDD$DATABASE DEPT1.

      In this example, the DELETE GENERIC command deletes the DEPT1
      generic element from the repository.

    2.CDO>  DELETE GENERIC CDD$SOURCE_MODULE
      cont>   /DESCENDANTS /LOG COBOL_SOURCE.

      In this example, the DELETE GENERIC command with the /LOG
      and /DESCENDANTS qualifiers confirms that CDO has deleted the
      COBOL_SOURCE generic element and children.

9  –  HISTORY

    Format

                                          { FIELD              }
      DELETE  HISTORY  [ qualifier ]  FOR { RECORD             }
                                          { GENERIC  type-name }
                                          {                    }
                       element-name ,... .

9.1  –  Parameters

9.1.1  –  type-name

    Specifies the type of the file or generic element definition
    whose history entries you are deleting.

9.1.2  –  element-name

    Specifies the element whose history entries you are deleting. You
    can use wildcard characters in this parameter.

9.2  –  Qualifiers

9.2.1    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the history
    entries have been deleted.

9.3  –  Description

    The DELETE HISTORY command deletes the history entries for a CDO
    element.

    Note that the DELETE HISTORY command deletes the entire history
    list for a given entity. This is not a PURGE HISTORY command.

9.4  –  Examples

  CDO> DELETE HISTORY FOR RECORD CAR_POOL.

      In this example, the DELETE HISTORY command deletes the history
      entries for the CAR_POOL record element.

10  –  PARTITION

    Format

      DELETE  PARTITION  [ qualifier ] ...   partition-name ,... .

10.1  –  Parameters

10.1.1  –  partition-name

    Specifies the partition you are deleting.

10.2  –  Qualifiers

10.2.1    /PARENTS

    Format options:

       /PARENTS
       /NOPARENTS (default)

    Specifies whether CDO deletes parents. CDO cannot delete a
    parent that is also a parent of an element outside the partition
    or partition hierarchy. When CDO cannot delete any parents,
    you receive an informational notice. When CDO can delete some
    parents, you do not receive a notice.

10.2.2    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the partition
    is deleted.

10.3  –  Description

    The DELETE PARTITION command deletes a partition and, optionally,
    all the partition's children to the bottom, or root, of the
    partition hierachy.

    Since a partition is a nonversioned element, CDO does not accept
    a branch designation or a version number in partition names.

    If a partition is a child, you must delete its parent or
    parents before you delete the partition. If the partition's
    immediate parent is a child of another element, you must trace
    the relationships back until you reach the element that has no
    parents.

    An error occurs if you attempt to delete a partition that
    contains elements. Promote or delete elements from a partition
    prior to issuing the DELETE PARTITION command.

10.4  –  Examples

    1.CDO>  DELETE PARTITION /PARENTS FRONT_END.

      In this example, the DELETE PARTITION command with the /PARENTS
      qualifier deletes all the parent partitions of FRONT_END.

    2.CDO>  DELETE PARTITION /LOG REPORTS.
      %CDO-I-ENTDEL, entity CDD$DISK:[SMITH.PART]REPORTS deleted

      In this example, the DELETE PARTITION command with the /LOG
      qualifier confirms that CDO deleted the partition REPORTS.

11  –  PROTECTION

    Format

      DELETE  PROTECTION  [ qualifier ]  FOR

              { DIRECTORY          }
              { FIELD              }
              { RECORD             }  element-name ,...
              {                    }
              { GENERIC  type-name }

              [ POSITION n ]
              [ id+ ...    ]  [ ACCESS ]  .
              [            ]

      DELETE  PROTECTION  [ qualifier ]  FOR

              { REPOSITORY  anchor-name }  [ POSITION n ]
              [ ACCESS         ]
              [ DEFAULT_ACCESS ] .
              [                ]

11.1  –  Parameters

11.1.1  –  type-name

    Specifies the type of file or generic element definition whose
    ACE or ACL you are deleting.

11.1.2  –  element-name

    Specifies the element whose ACE or ACL you are deleting. You can
    use wildcard characters in this parameter.

11.1.3  –  n

    Specifies the relative position of the ACE in the ACL that you
    are deleting.

11.1.4  –  id

    Specifies the identifiers for the ACE you are deleting.

11.1.5  –  anchor-name

    Specifies the repository anchor directory whose ACE or ACL you
    are deleting.

11.2  –  Qualifiers

11.2.1    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the ACE or
    ACL is deleted.

11.3  –  Description

    The DELETE PROTECTION command deletes an access control list
    entry (ACE) or the entire access control list (ACL) for a CDO
    element or repository.

    You need CONTROL access to delete protection.

    The POSITION clause tells CDO the relative position of the ACE
    to delete. ACEs are numbered starting with one. You can also
    delete a particular element ACE by specifying the identifier or
    identifiers contained in that ACE. If you omit the identifiers
    and the POSITION clause, CDO deletes the entire ACL.

    After the DELETE PROTECTION command executes, CDO resequences the
    remaining ACEs in the ACL.

    The default access type for all cases is ACCESS.

11.4  –  Examples

    1.CDO>  DELETE PROTECTION FOR RECORD CAR_POOL POSITION 5.

      In this example, the DELETE PROTECTION command deletes the
      fifth ACE in the ACL for the CAR_POOL record element.

    2.CDO>  DELETE PROTECTION FOR RECORD CAR_POOL [23,56].

      In this example, the DELETE PROTECTION command deletes the ACE
      with the identifier [23,56] for the CAR_POOL record element.

12  –  RECORD

    Format

      DELETE  RECORD  [ qualifier ] ...   record-name ,... .

12.1  –  Parameters

12.1.1  –  record-name

    Specifies the record element you are deleting.

12.2  –  Qualifiers

12.2.1    /DESCENDANTS

    Format options:

       /DESCENDANTS
       /NODESCENDANTS (default)

    Specifies whether CDO deletes children. When you specify the
    /DESCENDANTS qualifier, and your record element is controlled,
    CDO deletes all children that are not also children of additional
    elements outside the area defined by your top collection. If the
    record element is uncontrolled, CDO deletes all children that are
    not also children of other elements.

12.2.2    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the record
    element is deleted.

12.3  –  Description

    The DELETE RECORD command deletes a record element from a CDO
    repository.

    If the record element is controlled, CDO freezes previous
    versions and allows you to delete only the highest visible
    version. If the record element is uncontrolled, CDO deletes the
    highest version unless you specify another version number.

12.4  –  Examples

  CDO>  DELETE RECORD /DESCENDANTS CUSTOMER_ORDERS.

      In this example, the DELETE RECORD command with the
      /DESCENDANTS qualifier deletes the CUSTOMER_ORDERS record
      element and children.

13  –  REPOSITORY

    Format

      DELETE  REPOSITORY  [ qualifier ]   repository-name ,... .

13.1  –  Parameters

13.1.1  –  repository-name

    Specifies the anchor directory of the repository you are
    deleting.

13.2  –  Qualifiers

13.2.1    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the
    repository is deleted.

13.3  –  Description

    The DELETE REPOSITORY command deletes all the elements in a
    repository, any relationships between elements in the repository
    or elements in other repositories, and the repository itself.

    Unless you change repository protection, only the owner of a
    repository or the system manager can delete a CDO repository.

    You cannot delete a repository if it contains an element that is
    used by another element in a different repository.

                                 CAUTION

       Before you delete a repository, be sure your elements do not
       have relationships to other elements in other repositories.
       Check to make sure you have not stored user-created files in
       the repository.

13.4  –  Examples

  CDO>  DELETE REPOSITORY DISK1:[BOB.DICT].

      In this example, the DELETE REPOSITORY command deletes the
      DISK1:[BOB.DICT] repository.

14  –  RMS_DATABASE

    Format

      DELETE  RMS_DATABASE  [ qualifier ]  rms-database-name .

14.1  –  Parameters

14.1.1  –  rms-database-name

    Specifies a logical RMS database element.

14.2  –  Qualifiers

14.2.1    /LOG

    Format options:

       /LOG
       /NOLOG (default)

    Specifies whether CDO displays text confirming that the RMS
    database element is deleted.

14.3  –  Description

    The DELETE RMS_DATABASE command deletes a logical RMS database
    element from the repository.

    If the RMS database element is controlled, CDO freezes previous
    versions and allows you to delete only the highest visible
    version. If the RMS database element is uncontrolled, CDO deletes
    the highest visible version unless you specify another version
    number.

    Before you can issue the DELETE RMS_DATABASE command, you must
    have deleted the associated physical RMS database element with
    the DELETE DATABASE command.

14.4  –  Examples

    1.CDO>  DELETE DATABASE DISG_FILE(2).
         .
         .
         .
      CDO>  DELETE RMS_DATABASE /LOG EMPLOYEE_STORAGE.

      In this example, the DELETE DATABASE command prompts you to
      confirm that you intend to delete the physical RMS database
      file from disk. CDO confirms this deletion. The DELETE RMS_
      DATABASE command with the /LOG qualifier confirms that CDO has
      deleted the logical RMS database element EMPLOYEE_STORAGE.

    2.CDO>  DELETE RMS_DATABASE EMPLOYEE_STORAGE.
      %CDD-E-INUSE, element is the member of a relationship; it cannot be deleted
      CDO> DELETE DATABASE DISG_FILE(2).   1
      deleting file DISK1:[SMITH]EMP.DAT; proceed? [Y/N]) (N)Y   2
      %CDO-I-FILEDEL, file DISK1:[SMITH]EMP.DAT; deleted
      CDO> DELETE RMS_DATABASE /LOG EMPLOYEE_STORAGE. 3

      This example shows the result when you try to delete a logical
      RMS database definition from the repository while a physical
      RMS database (on disk) is using it. When you delete the
      physical database (EMP.DAT), you can then delete the logical
      database.

      1  Delete the physical RMS database definition from the
         repository.

      2  Type Y in acknowledgement that CDO deletes the physical RMS
         file from disk.

      3  Delete the logical RMS database definition from the
         repository. The /LOG qualifier provides a confirmation of
         deletion.
Close Help