{"id":2559,"date":"2011-06-27T16:02:56","date_gmt":"2011-06-27T20:02:56","guid":{"rendered":"http:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/"},"modified":"2011-06-28T04:24:36","modified_gmt":"2011-06-28T08:24:36","slug":"how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf","status":"publish","type":"post","link":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/","title":{"rendered":"How to delete Entries in OID 11g in Bulk &#8211; Delete Failed : Ldap Error Code 66 Not allowed on Non-Leaf"},"content":{"rendered":"<p><a href=\"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG\"><img decoding=\"async\" src=\"https:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG\" \/><\/a><\/p>\n<p>Entries in LDAP Server (OID) are stored in tree like structure. You can delete an entry OID 11g using <a target=\"_blank\" href=\"https:\/\/onlineappsdba.com\/index.php\/2009\/09\/30\/oid-11g-oracle-directory-services-manager-odsm\/\">ODSM<\/a>\u00a0but if you try to delete an entry which contains sub-entry then you will get error message like &#8220;<strong>LDAP Error Code 66 Not allowed on Non-Leaf<\/strong> &#8221; (11.1.1.4 and lower) . You should first delete lowest level of tree (leaf) and then go all the way up to delete entries via ODSM. What if you have approx. 10\/15 levels for an entry or wish to delete entries in OID in Bulk (all users\/groups or subset of users\/groups) ?<\/p>\n<p>Simple answer is <strong>bulkdelete<\/strong> which is LDAP command. In this post I am going to show how to delete entries OID 11g in bulk or recursively<\/p>\n<p><strong>1.<\/strong> Set Environment Variable <strong>ORACLE_HOME<\/strong> and <strong>ORACLE_INSTANCE <\/strong>for OID 11g<\/p>\n<p>export ORACLE_HOME=\/u01\/oracle\/fmw\/Oracle_IDM1<br \/>\nexport ORACLE_INSTANCE=\/u01\/oracle\/fmw\/asinst_1<\/p>\n<p><strong>2. <\/strong>Shutdown OID using OPMNCTL \u00a0(<font color=\"#ff0000\" class=\"Apple-style-span\">OID should be down during bulkdelete or entry caching should be disabled<\/font>)<\/p>\n<p>$ORACLE_INSTANCE\/bin\/opmnctl stopall<\/p>\n<p><strong>3<\/strong>. Run bulkdelete with entry which you want to delete in OID (command will delete all child entry under that)<\/p>\n<p>$ORACLE_HOME\/ldap\/bin\/bulkdelete connect=connect_string {[basedn=Base_DN] | [file=file_name]}<\/p>\n<p>$ORACLE_HOME\/ldap\/bin\/bulkdelete connect=oiddb basedn=&#8221;ou=service,cn=users,dc=mydomain,dc=co,dc=uk&#8221; (Here oiddb is TNS name defined by default in $ORACLE_INSTANCE\/network )<\/p>\n<p><font color=\"#ff0000\" class=\"Apple-style-span\">Provide ODS schema password when prompted<\/font><\/p>\n<p>You should see output like XXX Entries have been deleted<\/p>\n<p><strong>b)<\/strong> If you want to delete multiple entries (under different location in one go) then create a file delete.ldif with entry like<\/p>\n<p>ou=user1,cn=users,dc=mydomain,dc=co,dc=uk<br \/>\nou=user2,cn=users,dc=mydomain,dc=co,dc=uk<br \/>\ncn=group1,cn=groups,dc=mydomain,dc=co,dc=uk<\/p>\n<p>Here &#8220;ou=user1,cn=users,dc=mydomain,dc=co,dc=uk&#8221; is Distinguished Name (DN) of entry which you wish to delete (<font color=\"#ff0000\" class=\"Apple-style-span\">Change DC as per your OID setup<\/font>)<\/p>\n<p>and run<br \/>\n$ORACLE_HOME\/ldap\/bin\/bulkdelete connect=oiddb <strong>file<\/strong>=delete.ldif<\/p>\n<p>Provide ODS schema password when prompted<\/p>\n<p>You should see output like XXX Entries have been deleted<\/p>\n<p><strong>4.<\/strong> Start OID, $ORACLE_INSTANCE\/bin\/opmnctl startall<\/p>\n<p>.<\/p>\n<p><strong><u>References<\/u><\/strong><\/p>\n<ul>\n<li><a target=\"_blank\" href=\"http:\/\/download.oracle.com\/docs\/cd\/E12839_01\/oid.1111\/e10029\/bulktools.htm#OIDAG2303\">Using Bulkdelete<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Entries in LDAP Server (OID) are stored in tree like structure. You can delete an entry OID 11g using ODSM\u00a0but [&hellip;]<\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2559","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to delete Entries in OID 11g in Bulk - Delete Failed : Ldap Error Code 66 Not allowed on Non-Leaf  -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to delete Entries in OID 11g in Bulk - Delete Failed : Ldap Error Code 66 Not allowed on Non-Leaf  -\" \/>\n<meta property=\"og:description\" content=\"Entries in LDAP Server (OID) are stored in tree like structure. You can delete an entry OID 11g using ODSM\u00a0but [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-06-27T20:02:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2011-06-28T08:24:36+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG\" \/>\n<meta name=\"author\" content=\"Masroof Ahmad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Masroof Ahmad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/\",\"url\":\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/\",\"name\":\"How to delete Entries in OID 11g in Bulk - Delete Failed : Ldap Error Code 66 Not allowed on Non-Leaf -\",\"isPartOf\":{\"@id\":\"https:\/\/onlineappsdba.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG\",\"datePublished\":\"2011-06-27T20:02:56+00:00\",\"dateModified\":\"2011-06-28T08:24:36+00:00\",\"author\":{\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\"},\"breadcrumb\":{\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#primaryimage\",\"url\":\"http:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG\",\"contentUrl\":\"http:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/onlineappsdba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to delete Entries in OID 11g in Bulk &#8211; Delete Failed : Ldap Error Code 66 Not allowed on Non-Leaf\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/onlineappsdba.com\/#website\",\"url\":\"https:\/\/onlineappsdba.com\/\",\"name\":\"\",\"description\":\"Oracle Implementation &amp; Training Experts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/onlineappsdba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\",\"name\":\"Masroof Ahmad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"caption\":\"Masroof Ahmad\"},\"url\":\"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to delete Entries in OID 11g in Bulk - Delete Failed : Ldap Error Code 66 Not allowed on Non-Leaf  -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/","og_locale":"en_US","og_type":"article","og_title":"How to delete Entries in OID 11g in Bulk - Delete Failed : Ldap Error Code 66 Not allowed on Non-Leaf  -","og_description":"Entries in LDAP Server (OID) are stored in tree like structure. You can delete an entry OID 11g using ODSM\u00a0but [&hellip;]","og_url":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/","article_published_time":"2011-06-27T20:02:56+00:00","article_modified_time":"2011-06-28T08:24:36+00:00","og_image":[{"url":"http:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG","type":"","width":"","height":""}],"author":"Masroof Ahmad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Masroof Ahmad","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/","url":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/","name":"How to delete Entries in OID 11g in Bulk - Delete Failed : Ldap Error Code 66 Not allowed on Non-Leaf -","isPartOf":{"@id":"https:\/\/onlineappsdba.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#primaryimage"},"image":{"@id":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#primaryimage"},"thumbnailUrl":"http:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG","datePublished":"2011-06-27T20:02:56+00:00","dateModified":"2011-06-28T08:24:36+00:00","author":{"@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb"},"breadcrumb":{"@id":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#primaryimage","url":"http:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG","contentUrl":"http:\/\/onlineappsdba.com\/wp-content\/uploads\/2011\/06\/delete_not_allowed.JPG"},{"@type":"BreadcrumbList","@id":"https:\/\/onlineappsdba.com\/index.php\/2011\/06\/27\/how-to-delete-entries-in-oid-11g-in-bulk-delete-failed-ldap-error-code-66-not-allowed-on-non-leaf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/onlineappsdba.com\/"},{"@type":"ListItem","position":2,"name":"How to delete Entries in OID 11g in Bulk &#8211; Delete Failed : Ldap Error Code 66 Not allowed on Non-Leaf"}]},{"@type":"WebSite","@id":"https:\/\/onlineappsdba.com\/#website","url":"https:\/\/onlineappsdba.com\/","name":"","description":"Oracle Implementation &amp; Training Experts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/onlineappsdba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb","name":"Masroof Ahmad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","caption":"Masroof Ahmad"},"url":"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/"}]}},"_links":{"self":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/2559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/comments?post=2559"}],"version-history":[{"count":0,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/2559\/revisions"}],"wp:attachment":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/media?parent=2559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/categories?post=2559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/tags?post=2559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}