{"id":33663,"date":"2023-05-02T09:07:52","date_gmt":"2023-05-02T09:07:52","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=33663"},"modified":"2023-05-16T06:57:44","modified_gmt":"2023-05-16T06:57:44","slug":"oracle-tutorials-command-line-reference","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/oracle-tutorials-command-line-reference\/","title":{"rendered":"Oracle Tutorials: Command line reference"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># Oracle command to list the database<\/span>\n$ lsnrctl status\n\n<span class=\"hljs-comment\"># How to know list of Oracle instance in my cluster?<\/span>\n$ srvctl status instance -db &lt;db_name&gt;\n$ srvctl status instance -db orcl\n\n<span class=\"hljs-comment\"># This command will display the current status of the \"sales1\" database instance on the \"node1\" node, including whether it is running or not, and any other relevant information about the instance's state.<\/span>\n$ srvctl status instance -d &lt;database_name&gt; -i &lt;instance_name&gt;\n$ srvctl status instance -d sales -i sales1 -n node1\n\n<span class=\"hljs-comment\"># Command to Know all list of oracle rac node<\/span>\n$ olsnodes -n -i\n\n<span class=\"hljs-comment\"># check the status of nodes<\/span>\n$ srvctl status nodeapps -n &lt;node_name&gt;\n\n<span class=\"hljs-comment\"># check the status of all nodes<\/span>\n$ srvctl status nodeapps \n\n<span class=\"hljs-comment\"># To check what database we have in this cluster.<\/span>\n$ srvctl config database\n$ srvctl status database -d bbdc\n$ srvctl status database -d bbdc -n node-name1\n\n<span class=\"hljs-comment\"># Verify that all the nodes in the RAC cluster are up and running<\/span>\n$ crsctl stat res -t\n\n<span class=\"hljs-comment\"># Check the status of the RAC database<\/span>\n$ srvctl status database -d &lt;database_name&gt;\n\n<span class=\"hljs-comment\"># Ensure that the RAC database is in ARCHIVELOG mode<\/span>\n$ archive log <span class=\"hljs-keyword\">list<\/span>\n\n<span class=\"hljs-comment\"># Ensure that the RAC database has the necessary tablespaces<\/span>\n$ select tablespace_name from dba_tablespaces;\n\n<span class=\"hljs-comment\"># Verify that the RAC database has the required privileges<\/span>\n$ select * from dba_sys_privs where grantee=<span class=\"hljs-string\">'&lt;user&gt;'<\/span>;\n\n<span class=\"hljs-comment\"># This command displays the SCAN name, SCAN IP address, and SCAN port number for the RAC cluster. You can also use the DNS or a local host file to look up the SCAN IP address.<\/span>\n$ srvctl config scan\n\n<span class=\"hljs-comment\"># Connect a Oracle Cluster and List the users<\/span>\n$ sqlplus BAOBAB\/Tcb<span class=\"hljs-comment\">#1234567@TWOUATDR<\/span>\r\nSQL&gt; select table_name from users_tabels;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-33663","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/33663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=33663"}],"version-history":[{"count":6,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/33663\/revisions"}],"predecessor-version":[{"id":35080,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/33663\/revisions\/35080"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=33663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=33663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=33663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}