{"id":32,"date":"2014-10-27T18:12:00","date_gmt":"2014-10-27T17:12:00","guid":{"rendered":""},"modified":"2015-11-18T23:15:12","modified_gmt":"2015-11-18T22:15:12","slug":"ora-01511-ora-01141-ora-01110-ora-17503-ora-17515-and-ora-06512-when-executing-dbms_dnfs-clonedb_renamefile","status":"publish","type":"post","link":"https:\/\/ilmarkerm.eu\/blog\/2014\/10\/ora-01511-ora-01141-ora-01110-ora-17503-ora-17515-and-ora-06512-when-executing-dbms_dnfs-clonedb_renamefile\/","title":{"rendered":"ORA-01511, ORA-01141, ORA-01110, ORA-17503, ORA-17515 and ORA-06512 when executing dbms_dnfs.clonedb_renamefile"},"content":{"rendered":"<p>This post is for those who google the errors and maybe it will help to save some time. I&#8217;ve been playing around with clonedb for some time now and every time I hit these errors it takes me some time to figure out what actually the problem is \ud83d\ude42 The error messages are not really helpful at all. Maybe I&#8217;ll remember it now.<\/p>\n<p>When creating a new clone database using clonedb then after creating the new controlfile you need to execute <strong>dbms_dnfs.clonedb_renamefile(sourcefile, deltafile)<\/strong> for each of the data files in the image copy (sourcefile) to create a file that will hold the changes done to this datafile (deltafile). For example if one of the data files in image copy is named <strong>\/nfs\/source\/user_data.dbf<\/strong> and I want to store changes done to this file as <strong>\/u02\/db\/delta\/user_data.dbf<\/strong> then need to execute:<\/p>\n<pre><code class=\"sql\">SQL&gt; exec dbms_dnfs.clonedb_renamefile('\/nfs\/source\/user_data.dbf', '\/u02\/db\/delta\/user_data.dbf');\n<\/code><\/pre>\n<p>Sometimes when I run it I get strange errors:<\/p>\n<pre><code class=\"sql\">SQL&gt; exec dbms_dnfs.clonedb_renamefile('\/nfs\/source\/user_data.dbf', '\/u02\/db\/delta\/user_data.dbf');\n\nERROR at line 1:\nORA-01511: error in renaming log\/data files\nORA-01141: error renaming data file 6 - new file '\/u02\/db\/delta\/user_data.dbf' not found\nORA-01110: data file 6: '\/nfs\/source\/user_data.dbf'\nORA-17503: ksfdopn:1 Failed to open file \/u02\/db\/delta\/user_data.dbf\nORA-17515: Creation of clonedb failed using snapshot file \/nfs\/source\/user_data.dbf\nORA-06512: at \"SYS.X$DBMS_DNFS\", line 10\nORA-06512: at line 2\n<\/code><\/pre>\n<p>This happens when <strong>clonedb<\/strong> init.ora parameter is FALSE (default). So before running dbms_dnfs.clonedb_renamefile make sure clonedb is set to true. If it is not, then change the parameter and bounce the database.<\/p>\n<pre><code class=\"sql\">SQL&gt; show parameter clonedb\n\nNAME                                 TYPE        VALUE\n------------------------------------ ----------- -------\nclonedb                              boolean     FALSE\n\nSQL&gt; alter system set clonedb=true scope=spfile;\nSQL&gt; startup mount force\n<\/code><\/pre>\n<p>PS. Starting from 12.1.0.2 the deltafile does not need to be stored in NFS server (and accessed using dNFS) and can be a local file instead, but the problem remains and the error comes from 12.1.0.2.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is for those who google the errors and maybe it will help to save some time. I&#8217;ve been playing around with clonedb for some time now and every time I hit these errors it takes me some time to figure out what actually the problem is \ud83d\ude42 The error messages are not really [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[35,4],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-blog-entry","tag-dnfs","tag-oracle"],"_links":{"self":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":3,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions\/150"}],"wp:attachment":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}