1. 程式人生 > >oracle的restricted mode(受限模式)

oracle的restricted mode(受限模式)

概述

在檢視oracle的v$instance檢視中發現有logins列,我們可以看下contents中對此列的定義。

LOGINS  VARCHAR2(10)    Indicates whether the instance is in unrestricted 
                        mode,allowing logins by all users (ALLOWED, or in 
                        restricted mode, allowing logins by database 
                        administrators only (RESTRICTED)

例項啟動有兩種模式,一種為allowed,一種為restricted模式。

Restricted Mode of Instance Startup

You can start an instance in restricted mode (or later alter an existing instance to be in restricted mode). This restricts connections to only those users who have been granted the RESTRICTED SESSION system privilege.

如果DBA將資料庫的狀態設定為restricted mode,那麼只能是擁有restrict許可權的使用者(受限特權的使用者),才能夠連線到資料庫進行操作。Restricted Mode(受限模式)通常用於資料庫管理員在維護資料庫的時候使用。Restricted Mode限制新的沒有許可權的使用者登入進來,但是如果一個沒有Restricted Mode許可權的使用者在設定Restricted Mode之前已經登入到了Oracle那麼該使用者仍然擁有操作資料庫的許可權,即Restricted Mode不妨礙已經登入進來的使用者繼續執行操作。

測試

例項的預設模式檢視

SQL> select logins from v$instance;

LOGINS
----------
ALLOWED

建立測試使用者

SQL> create user test identified by test;

User created.

SQL> grant connect,resource to test;

Grant succeeded.

使用test連線資料庫

[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2
.0.4.0 Production on Thu Jul 14 19:06:18 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> conn test/test Connected.

將例項模式修改為restricted mode

SQL> alter system enable restricted session;

System altered.

SQL> select logins from v$instance;

LOGINS
----------
RESTRICTED

新建立連線使用test賬號連線

[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jul 14 19:06:18 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> conn test/test
ERROR:
ORA-01035: ORACLE only available to users with RESTRICTED SESSION privilege


Warning: You are no longer connected to ORACLE.

測試已經登入的test連線

SQL> conn test/test
Connected.

SQL> create table test(id number); 

Table created.

SQL> insert into test values(1);

1 row created.

SQL> commit;

Commit complete.

將許可權restricted session賦予使用者test,再次嘗試連線

SQL> grant restricted session to test;

Grant succeeded.

SQL> conn test/test
Connected.
通過以上測試,我們得知,如果想資料庫設定為Restricted Mode,只有管理員(dba)以及有restricted session許可權才可以連線使用者。在修改為 Restricted Mode後,之前連線使用者不受影響,新使用者不能連線。

相關推薦

oracle的restricted mode(受限模式)

概述 在檢視oracle的v$instance檢視中發現有logins列,我們可以看下contents中對此列的定義。 LOGINS VARCHAR2(10) Indicates wheth

關於hibernate中插入資料報read-only mode只讀模式錯誤

專案中有時候會遇到插入資料到表中去報錯只讀模式 org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (F

mix-blend-mode 混合模式 background-blend-mode 背景混合模式 isolation:isolate 隔離

css3 mix-blend-mode 混合模式   該屬性不僅可以作用於HTML,還可以作用於SVG   相容性: IE 8~11 Edge 12~14 Firefox 41~47 chrome 45~51 Safari 7~9.1   支援的值很多:   mix-blend-mode:norma

Redis protected-mode 保護模式

Redis protected-mode 是3.2 之後加入的新特性,在Redis.conf的註釋中,我們可以瞭解到,他的具體作用和啟用條件 # Protected mode is a layer of security protection, in or

quirks mode(怪異模式) 和 standard mode(標準模式)

出現的背景 在很久之前的瀏覽器,還是Netscape Navigator和 Microsoft Internet Explorer的時候,頁面主要就是為這兩個瀏覽器寫的。但是到了今天了,firefox、chrome、opera等瀏覽器的興起,再加上W3C建立了web標準。

oracle ORA-12526: TNS: 監聽程式: 所有適用例程都處於受限模式問題處理

      安裝了10.2.0.4補丁包,裝完後提示ORA-12526: TNS: 監聽程式: 所有適用例程都處於受限模式問題處理 表面上看不出問題,後來檢視alert_oracas.log檔案說要使用upgrade選項啟動啟動sqlplussqlplus / as sysdba輸入SQL>start

Javascript 嚴格模式(strict mode)詳解

eval ref 條件 ssa for this關鍵字 表示法 ocs 行為 Javascript 嚴格模式詳解 一、概述 除了正常運行模式,ECMAscript 5添加了第二種運行模式:"嚴格模式"(strict mode)。顧名思義,這種模式使得Jav

How to setup Assigned Access in Windows 10 (Kiosk Mode) 設置分配的訪問權限(Kiosk模式)

win tar mode ctr assigned all oos rsquo eve Let’s say you’re building some sort of ingenious mechanical contraption to be dis

不可思議的混合模式 background-blend-mode

version 而是 用法 由於 pen 多應用 構造 blog photo 本文接前文:不可思議的混合模式 mix-blend-mode 。由於 mix-blend-mode 這個屬性的強大,很多應用場景和動效的制作不斷完善和被發掘出來,遂另起一文繼續介紹一些使用 mix

WPF的5種綁定模式mode

單向 模式 選擇 需要 五個 OS default 新源 mod WPF的綁定模式(mode)是枚舉的 枚舉值共有5個 1:OneWay(源變就更新目標屬性) 2:TwoWay(源變就更新目標並且目標變就更新源) 3:OneTime(只根據源來設置目標,以後都不

openldap中的Mirror mode模式中的主主同步

調用 -a bsp sbin apach 但是 rest emc 源碼安裝 一.openldap簡介    LDAP是輕量目錄訪問協議,英文全稱是Lightweight Directory Access Protocol,一般都簡稱為LDAP。屬於開源集中賬號管理架構的實

vue router mode模式在webpack 打包上線問題

vue-router mode模式有兩種 hash和history。 1.hash —— 即位址列 URL 中的 # 符號。比如這個 URL:http://www.abc.com/#/hello,hash 的值為 #/hello。它的特點在於:hash 雖然出現在 U

CSS3<1>:animation-fill-mode,填充模式

引言:雖是前端,但是卻不注重CSS,只喜歡寫JavaScript,誰知CSS3悄悄推出這麼多屬性,只能有時間就瞭解一個 1、animation簡寫語法: animation: name(動畫名稱) duration(動畫時長,單位s) timing-function(動畫曲

MySQL SQL MODE(sql模式

在MySQL中,sql mode主要常用來解決以下幾類問題 1,通過設定sql mode,可以完成不同嚴格程度的資料校驗,有效的保障資料的準確性(TRADITIONAL,STRICT_TRANS_TABLES) 【注:NO_BACKSLASH_ESCAPES可以使反斜線變為普通字元;PIPE

BigDecimal 舍入模式(Rounding mode)介紹

BigDecimal 舍入模式(Rounding mode)介紹 什麼樣的經歷,才能領悟成為架構師? >>>    1 RoundingMode介紹 package java.math; publ

Head First Design Mode(8)-命令模式

該系列文章繫個人讀書筆記及總結性內容,任何組織和個人不得轉載進行商業活動!   命令模式:         封裝呼叫——本節把封裝帶到了一個全新的境界:把方法呼叫(method invocation)封裝起來; &nbs

Head First Design Mode(6)-單件模式

該系列文章繫個人讀書筆記及總結性內容,任何組織和個人不得轉載進行商業活動!   單件模式:         獨一無二的物件;     單件模式(Singleton Pattern):用來建立獨一無二的

LTE傳輸模式tdd mode

對於TM mode一直不是很清楚,不確定各個模式之間怎麼選擇,僅僅停留在字面意思上。 在LTE網路中,下行鏈路共有8中發射模式,如下。 Mode 1 :Single Antenna Port (SISO or SI

預設模式網路(Default mode network, DMN)

1.概念 在神經科學中,預設模式網路,也叫做預設網路或者預設狀態網路,是已知具有彼此高度相關的活動並且與大腦中的其他網路不同的活動大腦區域的大規模腦網路。 當一個人不關注外部世界,大腦處於清醒的休息狀態時,例如在做白日夢和思維遊移的時候,預設的模式網路是最常見的。但是,當人們在思考別

不可思議的顏色混合模式 mix-blend-mode (轉) 談談一些有趣的CSS題目(四)-- 從倒影說起,談談 CSS 繼承 inherit 談談一些有趣的CSS題目(五)-- 單行居中,兩行居左,超過兩行省略 談談一些有趣的CSS題目(九)-- 巧妙的實現 CSS 斜線

開本系列,談談一些有趣的 CSS 題目,題目型別天馬行空,想到什麼說什麼,不僅為了拓寬一下解決問題的思路,更涉及一些容易忽視的 CSS 細節。 解題不考慮相容性,題目天馬行空,想到什麼說什麼,如果解題中有你感覺到生僻的 CSS 屬性,趕緊去補習一下吧。 不斷更新,不斷更新,不斷更新,重