{"id":2596,"date":"2020-03-11T14:23:34","date_gmt":"2020-03-11T17:23:34","guid":{"rendered":"https:\/\/zmsolution.laraclaud.com.br\/?p=2596"},"modified":"2020-03-11T14:23:52","modified_gmt":"2020-03-11T17:23:52","slug":"ora-01000-maximum-open-cursors-exceeded","status":"publish","type":"post","link":"http:\/\/zmsolution.com\/ora-01000-maximum-open-cursors-exceeded\/","title":{"rendered":"ORA-01000: maximum open cursors exceeded"},"content":{"rendered":"

Na Hora da execu\u00e7\u00e3o do comando nid que \u00e9 utilizado para alterar o dbname do banco de dados, ocorreu o seguinte erro:<\/p>\n

ORA-01000: maximum open cursors exceeded<\/p>\n

[oracle@zmsol1 dbs]$ nid target=sys\/zmsenha dbname=dbzm1\r\n\r\nDBNEWID: Release 11.2.0.4.0 - Production on Fri Mar 6 11:03:43 2020\r\n\r\nCopyright (c) 1982, 2011, Oracle and\/or its affiliates. All rights reserved.\r\n\r\nConnected to database ZMDB(DBID=2727256655)\r\n\r\nConnected to server version 11.2.0\r\n\r\nControl Files in database:\r\n+DATA\/zmdb1\/controlfile\/control01.ctl\r\n+DATA\/zmdb1\/controlfile\/control02.ctl\r\n\r\nChange database ID and database name ZMDB to dbzm1 ? (Y\/[N]) => y\r\n\r\nProceeding with operation\r\nChanging database ID from 2727256655 to 4198393936<\/pre>\n

 <\/p>\n

Changing database name from ZMDB\u00a0 to zmdb1\r\nControl File +DATA\/zmdb1\/controlfile\/control01.ctl - modified\r\nControl File +DATA\/zmdb1\/controlfile\/control02.ctl - modified\r\nDatafile +DATA\/zmdb1\/datafile\/system.559.103428254 - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab11_ind.549.103428225 - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/sysaux.261.103425829 - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/integra_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/opme_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/opme_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/users.657.103428547 - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab41_1_ind_au - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/cadastro_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/cadastro_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/prestador_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab41_ind_au - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/clapmlote_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/clapmlote_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/notas_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/historico_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/historico_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/servicos_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/guias_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab42_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/manut_tab_ - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/carnets_tab - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab4_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab08_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/tiss_tab_ - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab7_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab8_in - dbid changed, wrote new name\r\n\r\n\r\nNID-00111: Oracle error reported from target database while executing\r\nbegin dbms_backup_restore.nidprocessdf(:fno, :istemp, :skipped, :idchged, :nmchged); end;\r\nORA-01000: maximum open cursors exceeded\r\n\r\nChange of database name and database ID failed.\r\nMust finish change or REVERT changes before attempting any database operation.\r\nDBNEWID - Completed with errors.<\/pre>\n

O erro ocorre devido ao numero de cursores sem baixo, aumente o numero de cursores e refa\u00e7a o processo.<\/p>\n

SQL> select name,open_mode from v$database;\r\n\r\nNAME OPEN_MODE\r\n--------- --------------------\r\nFINDB MOUNTED\r\n\r\nSQL> show parameter open_cursor\r\n\r\nNAME TYPE VALUE\r\n------------------------------------ ----------- ------------------------------\r\nopen_cursors integer 300\r\n\r\n\r\nSQL> alter system set open_cursors=1000;<\/pre>\n

 <\/p>\n

[oracle@zmsol1 dbs]$ nid target=sys\/zmsenha dbname=dbzm1\r\n\r\nDBNEWID: Release 11.2.0.4.0 - Production on Fri Mar 6 11:03:43 2020\r\n\r\nCopyright (c) 1982, 2011, Oracle and\/or its affiliates. All rights reserved.\r\n\r\nConnected to database\u00a0ZMDB(DBID=2727256655)\r\n\r\nConnected to server version 11.2.0\r\n\r\nControl Files in database:\r\n+DATA\/zmdb1\/controlfile\/control01.ctl\r\n+DATA\/zmdb1\/controlfile\/control02.ctl\r\n\r\nChange database ID and database name\u00a0ZMDB to\u00a0dbzm1 ? (Y\/[N]) => y\r\n\r\nProceeding with operation\r\nChanging database ID from\u00a02727256655 to 4198393936<\/pre>\n

 <\/p>\n

Changing database name from ZMDB\u00a0 to zmdb1\r\nControl File +DATA\/zmdb1\/controlfile\/control01.ctl - modified\r\nControl File +DATA\/zmdb1\/controlfile\/control02.ctl - modified\r\nDatafile +DATA\/zmdb1\/datafile\/system.559.103428254 - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab11_ind.549.103428225 - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/sysaux.261.103425829 - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/integra_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/opme_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/opme_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/users.657.103428547 - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab41_1_ind_au - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/cadastro_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/cadastro_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/prestador_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab41_ind_au - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/clapmlote_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/clapmlote_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/notas_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/historico_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/historico_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/servicos_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/guias_ta - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab42_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/manut_tab_ - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/carnets_tab - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab4_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab08_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/tiss_tab_ - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab7_in - dbid changed, wrote new name\r\nDatafile +DATA\/zmdb1\/datafile\/zmtab8_in - dbid changed, wrote new name\r\n\r\n\r\nDatabase name changed to dbzm1\u00a0.\r\nModify parameter file and generate a new password file before restarting.\r\nDatabase ID for database dbzm1\u00a0 changed to 4198393936.\r\nAll previous backups and archived redo logs for this database are unusable.\r\nDatabase has been shutdown, open database with RESETLOGS option.\r\nSuccesfully changed database name and ID.\r\nDBNEWID - Completed succesfully.<\/pre>\n","protected":false},"excerpt":{"rendered":"

Na Hora da execu\u00e7\u00e3o do comando nid que \u00e9 utilizado para alterar o dbname do banco de dados, ocorreu o seguinte erro: ORA-01000: maximum open cursors exceeded [oracle@zmsol1 dbs]$ nid target=sys\/zmsenha dbname=dbzm1 DBNEWID: Release 11.2.0.4.0 – Production on Fri Mar 6 11:03:43 2020 Copyright (c) 1982, 2011, Oracle and\/or its affiliates. All rights reserved. Connected to database ZMDB(DBID=2727256655) Connected to server version 11.2.0 Control Files in database: +DATA\/zmdb1\/controlfile\/control01.ctl +DATA\/zmdb1\/controlfile\/control02.ctl Change database ID and database name[…]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[21],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/posts\/2596"}],"collection":[{"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/comments?post=2596"}],"version-history":[{"count":0,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/posts\/2596\/revisions"}],"wp:attachment":[{"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/media?parent=2596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/categories?post=2596"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zmsolution.com\/wp-json\/wp\/v2\/tags?post=2596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}