{"id":12843,"date":"2019-10-23T10:38:15","date_gmt":"2019-10-23T08:38:15","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/"},"modified":"2019-10-23T10:38:15","modified_gmt":"2019-10-23T08:38:15","slug":"connecting-to-oda-derby-database","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/","title":{"rendered":"Connecting to ODA derby database"},"content":{"rendered":"<p>ODA light (ODA X7-2S, X7-2M, X8-2S, X8-2M) come with an internal derby database to manage ODA metadata. From time to time, there is a need to check or update some information within it, as for example when facing database deletion issue. I would like to strongly advise that updating manually the ODA repository should only be done after getting Oracle support guidance and agreement to do so. Neither the author (that\u2019s me &#x1f642; ) nor dbi services &#x1f609; would be responsible for any issue or consequence following commands described in this blog. This would be your own responsability. &#x1f609;<br \/>\nThis blog is more intended to show how to connect to this internal derby database.<br \/>\n<!--more--><\/p>\n<h3>Performing a backup of the derby database<\/h3>\n<p>Breaking the derby database would damage the ODA, and having as consequence to reimage the ODA.<\/p>\n<p>To backup the derby database, we need to stop the dcs agent.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n[root@ODA03 derbyjar]# initctl stop initdcsagent\ninitdcsagent stop\/waiting\n\n[root@ODA03 derbyjar]# ps -ef | grep dcs-agent | grep -v grep\n[root@ODA03 derbyjar]#\n<\/pre>\n<p>Then we can backup the repository :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n[root@ODA03 derbyjar]# cd \/opt\/oracle\/dcs\/repo\/\n\n[root@ODA03 repo]# ls -l\ntotal 4\ndrwxr-xr-x 4 root root 4096 Jun 12 14:05 node_0\n\n[root@ODA03 repo]# cp -rp node_0 node_0_BKP_12.06.2019\n<\/pre>\n<h3>Connecting to the derby database<\/h3>\n<p>To connect to the backup previously done, use the following connect string :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n[root@ODA03 repo]# \/usr\/java\/jdk1.8.0_161\/db\/bin\/ij\nij version 10.11\nij&gt; connect 'jdbc:derby:node_0_BKP_12.06.2019';\n<\/pre>\n<p>To connect to the running derby database use the following connect string (dcs agent needs to be stopped) :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n[root@ODA03 repo]# \/usr\/java\/jdk1.8.0_161\/db\/bin\/ij\nij version 10.11\nij&gt; connect 'jdbc:derby:node_0';\n<\/pre>\n<h3>Running commands<\/h3>\n<p>The language used to interact with the derby database is common SQL language :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\nij&gt; select id,name,dbname,dbid,status,DBSTORAGE from db where dbname='test';\nID                                                                                                                              |NAME                                                                                                                            |DBNAME                                                                                                                          |DBID                                                                                                                            |STATUS                                                                                                                          |DBSTORAGE\n-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\nc7db612e-f237-4491-9a30-ff2c2b75831f                                                                                            |test                                                                                                                            |test                                                                                                                            |032306496044                                                                                                                    |Deleting                                                                                                                        |Acfs\n\n1 row selected\nij&gt;\n<\/pre>\n<p>To list all the tables, you can run :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\nij&gt; show tables;\nTABLE_SCHEM         |TABLE_NAME                    |REMARKS\n------------------------------------------------------------------------\nSYS                 |SYSALIASES                    |\nSYS                 |SYSCHECKS                     |\n...\n...\n...\nAPP                 |CPUCORES                      |\nAPP                 |DATABASE                      |\nAPP                 |DATABASEHOME                  |\nAPP                 |DB                            |\nAPP                 |DBHOME                        |\nAPP                 |DBNODE                        |\nAPP                 |DBSTORAGEDETAILS              |\nAPP                 |DBSTORAGEDETAILS_VOLS         |\nAPP                 |DBSTORAGELOCATIONS            |\nAPP                 |DCSPARAMETERS                 |\nAPP                 |DCS_USER                      |\nAPP                 |DG_CONFIGURATION              |\nAPP                 |DG_CONFIGURATION_REPLICATION_&amp;|\nAPP                 |DISK                          |\nAPP                 |DISKGROUP                     |\nAPP                 |DISKINFO                      |\nAPP                 |FILEMULTIUPLOADPARTSRECORD    |\nAPP                 |FILEMULTIUPLOADRECORD         |\nAPP                 |FS                            |\nAPP                 |GI                            |\nAPP                 |GIHOME                        |\nAPP                 |GROUPENTITY                   |\nAPP                 |IDEMPOTENCYMAP                |\nAPP                 |JOBEXECUTION                  |\nAPP                 |JOBSCHEDULE                   |\nAPP                 |JOB_REPORT                    |\nAPP                 |JOB_RESOURCE_INFO             |\nAPP                 |LOGCLEANPOLICY                |\nAPP                 |LOGCLEANUPSUMMARY             |\nAPP                 |NETSECURITYRULES              |\nAPP                 |NETSECURITY_ENCRYPTIONALGORIT&amp;|\nAPP                 |NETSECURITY_INTEGRITYALGORITH&amp;|\nAPP                 |NETWORK                       |\nAPP                 |NETWORKINTERFACE              |\nAPP                 |NETWORKINTERFACE_INTERFACEMEM&amp;|\nAPP                 |NETWORK_NETWORKTYPE           |\nAPP                 |OBJECTSTORESWIFT              |\nAPP                 |OBSERVER                      |\n...\n...\n...\n\n93 rows selected\nij&gt;\n<\/pre>\n<h3>Exiting derby database connection<\/h3>\n<p>To exit the tool, use following command :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\nij&gt; exit;\n<\/pre>\n<h3>Getting last version of derby jar<\/h3>\n<p>One time, the derby jar file provided by the oracle support team was not the correct version. As per there guidance, I had to run :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n[root@ODA03 repo]# java -cp \/root\/derbyjar\/derby.jar:\/root\/derbyjar\/derbytools.jar org.apache.derby.tools.ij\nij version 10.11\nij&gt; connect 'jdbc:derby:node_0';\n<\/pre>\n<p>I got following errors :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\nERROR XJ040: Failed to start database 'node_0' with class loader sun.misc.Launcher$AppClassLoader@42a57993, see the next exception for details.\nERROR XSLAN: Database at \/opt\/oracle\/dcs\/repo\/node_0 has an incompatible format with the current version of the software.  The database was created by or upgraded by version 10.14.\n<\/pre>\n<p>I could download the last and appropriate derby jar from the <a href=\"https:\/\/db.apache.org\/derby\/releases\/release-10.14.2.0.cgi\">apache web site<\/a>. I could then successfully connect using correct version of derby jar related to the current ODA database.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n[root@ODA03 repo]# java -cp \/root\/derbyjar\/derby.jar:\/root\/derbyjar\/derbytools.jar org.apache.derby.tools.ij\nij version 10.11\nij&gt; connect 'jdbc:derby:node_0';\nij&gt;\n<\/pre>\n<h3>Conclusion<\/h3>\n<p>It might be interesting to know how to connect to metadata database from the ODA in order to check, troubleshoot and understand some internal ODA behavior. BUT, remember, that no update should be done in this database without Oracle support agreement and without running previously a backup of the repository.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ODA light (ODA X7-2S, X7-2M, X8-2S, X8-2M) come with an internal derby database to manage ODA metadata. From time to time, there is a need to check or update some information within it, as for example when facing database deletion issue. I would like to strongly advise that updating manually the ODA repository should only [&hellip;]<\/p>\n","protected":false},"author":48,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,59],"tags":[1708,79,96],"type_dbi":[],"class_list":["post-12843","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-oracle","tag-derby","tag-oda","tag-oracle"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Connecting to ODA derby database - dbi Blog<\/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:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Connecting to ODA derby database\" \/>\n<meta property=\"og:description\" content=\"ODA light (ODA X7-2S, X7-2M, X8-2S, X8-2M) come with an internal derby database to manage ODA metadata. From time to time, there is a need to check or update some information within it, as for example when facing database deletion issue. I would like to strongly advise that updating manually the ODA repository should only [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-23T08:38:15+00:00\" \/>\n<meta name=\"author\" content=\"Marc Wagner\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Marc Wagner\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/\"},\"author\":{\"name\":\"Marc Wagner\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/225d9884b8467ead9a872823acb14628\"},\"headline\":\"Connecting to ODA derby database\",\"datePublished\":\"2019-10-23T08:38:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/\"},\"wordCount\":357,\"commentCount\":0,\"keywords\":[\"derby\",\"ODA\",\"Oracle\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/\",\"name\":\"Connecting to ODA derby database - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2019-10-23T08:38:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/225d9884b8467ead9a872823acb14628\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Connecting to ODA derby database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/225d9884b8467ead9a872823acb14628\",\"name\":\"Marc Wagner\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/a873cc6e7fbdbbcbdbcaf5dbded14ad9a77b2ec2c3e03b4d724ed33d35d5f328?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a873cc6e7fbdbbcbdbcaf5dbded14ad9a77b2ec2c3e03b4d724ed33d35d5f328?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a873cc6e7fbdbbcbdbcaf5dbded14ad9a77b2ec2c3e03b4d724ed33d35d5f328?s=96&d=mm&r=g\",\"caption\":\"Marc Wagner\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/marc-wagner\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Connecting to ODA derby database - dbi Blog","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:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/","og_locale":"en_US","og_type":"article","og_title":"Connecting to ODA derby database","og_description":"ODA light (ODA X7-2S, X7-2M, X8-2S, X8-2M) come with an internal derby database to manage ODA metadata. From time to time, there is a need to check or update some information within it, as for example when facing database deletion issue. I would like to strongly advise that updating manually the ODA repository should only [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/","og_site_name":"dbi Blog","article_published_time":"2019-10-23T08:38:15+00:00","author":"Marc Wagner","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Marc Wagner","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/"},"author":{"name":"Marc Wagner","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/225d9884b8467ead9a872823acb14628"},"headline":"Connecting to ODA derby database","datePublished":"2019-10-23T08:38:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/"},"wordCount":357,"commentCount":0,"keywords":["derby","ODA","Oracle"],"articleSection":["Database Administration &amp; Monitoring","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/","url":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/","name":"Connecting to ODA derby database - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2019-10-23T08:38:15+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/225d9884b8467ead9a872823acb14628"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/connecting-to-oda-derby-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Connecting to ODA derby database"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/225d9884b8467ead9a872823acb14628","name":"Marc Wagner","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a873cc6e7fbdbbcbdbcaf5dbded14ad9a77b2ec2c3e03b4d724ed33d35d5f328?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a873cc6e7fbdbbcbdbcaf5dbded14ad9a77b2ec2c3e03b4d724ed33d35d5f328?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a873cc6e7fbdbbcbdbcaf5dbded14ad9a77b2ec2c3e03b4d724ed33d35d5f328?s=96&d=mm&r=g","caption":"Marc Wagner"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/marc-wagner\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=12843"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12843\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=12843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=12843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=12843"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=12843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}