{"id":1671,"date":"2025-01-11T07:00:40","date_gmt":"2025-01-11T07:00:40","guid":{"rendered":"https:\/\/w3buddy.com\/?p=1671"},"modified":"2026-01-15T13:19:18","modified_gmt":"2026-01-15T07:49:18","slug":"how-to-manage-restricted-mode-in-oracle-database","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/how-to-manage-restricted-mode-in-oracle-database\/","title":{"rendered":"How to Manage Restricted Mode in Oracle Database"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Restricted mode in Oracle Database allows only users with the RESTRICTED SESSION privilege to connect, making it useful for maintenance tasks. Below are the steps to check, enable, and disable restricted mode in both single-instance and RAC environments.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Checking If the Database Is in Restricted Mode<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To determine if the database is in restricted mode, query the LOGINS column of the v$instance view:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">SELECT logins FROM v$instance;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Possible Outputs:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ALLOWED<\/strong>: Database is not in restricted mode.<\/li>\n\n\n\n<li><strong>RESTRICTED<\/strong>: Database is in restricted mode.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">LOGINS\n----------\nALLOWED<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">LOGINS\n----------\nRESTRICTED<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Enabling Restricted Mode<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Temporarily Restrict New Connections<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To enable restricted mode while the database is running:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">ALTER SYSTEM ENABLE RESTRICTED SESSION;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Disabling Restricted Mode<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To allow all users to connect again:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">ALTER SYSTEM DISABLE RESTRICTED SESSION;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Starting the Database in Restricted Mode<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To start the database in restricted mode:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">STARTUP RESTRICT;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">In a RAC Environment<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In Real Application Clusters (RAC), use the following command to start the database in restricted mode:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">srvctl start database -d &lt;database_name> -o restrict<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">srvctl start database -d orcl -o restrict<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Verifying Restricted Mode in RAC<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To confirm that the RAC database is running in restricted mode:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">srvctl status database -d &lt;database_name> -v<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-sql\">Instance ORCL is running on node RAC01. Instance status: Restricted Access.\nInstance ORCL is running on node RAC02. Instance status: Restricted Access.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">By following these steps, you can effectively manage restricted mode in both single-instance and RAC Oracle databases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Restricted mode in Oracle Database allows only users with the RESTRICTED SESSION privilege to connect, making it useful for maintenance tasks. Below are the steps to check, enable, and disable restricted mode in both single-instance and RAC environments. Checking If the Database Is in Restricted Mode To determine if the database is in restricted mode, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1225],"tags":[],"class_list":["post-1671","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/1671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=1671"}],"version-history":[{"count":2,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/1671\/revisions"}],"predecessor-version":[{"id":1673,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/1671\/revisions\/1673"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=1671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=1671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=1671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}