久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

在oracle11g中altersystem set recyclebin = off報錯recyclebin參數(shù)在11g和10g中的有哪些區(qū)別

155次閱讀
沒有評論

共計 2906 個字符,預(yù)計需要花費(fèi) 8 分鐘才能閱讀完成。

行業(yè)資訊    
數(shù)據(jù)庫    
關(guān)系型數(shù)據(jù)庫    
在 oracle11g 中 altersystem set recyclebin = off 報錯 recyclebin 參數(shù)在 11g 和 10g 中的有哪些區(qū)別

在 oracle11g 中 altersystem set recyclebin = off 報錯 recyclebin 參數(shù)在 11g 和 10g 中的有哪些區(qū)別
發(fā)布時間:2021-11-25 09:55:08
來源:丸趣 TV
閱讀:121
作者:小新
欄目:關(guān)系型數(shù)據(jù)庫

丸趣 TV 小編給大家分享一下在 oracle11g 中 altersystem set recyclebin = off 報錯 recyclebin 參數(shù)在 11g 和 10g 中的有哪些區(qū)別,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

在 Oracle 11g 中,recyclebin 參數(shù)發(fā)生了微小的變化.

This supported parameter was introduced inOracle 10.2.0

Version  ParameterName  Data Type  Session Modifiable  System Modifiable

10.2.0  recyclebin  String  TRUE  IMMEDIATE

11.1.0  recyclebin  String  TRUE  DEFERRED

從文檔上我們可以看到這個變化說明,到了 11g 中,這個參數(shù)在 session 依然可以理解修改并影響當(dāng)前的 session, 但如果是在系統(tǒng)一級修改的話,那么就要加 deferred 參數(shù),對當(dāng)前已經(jīng)連接的 sesion 沒有影響,但新連接的 session 將受到影響

SQL select name,isses_modifiable,issys_modifiable from v$parameter where name= recyclebin

NAME ISSES_MODIFIABLE ISSYS_MODIFIABLE

———– ——————————–

recyclebin TRUE  DEFERRED

SQL

下面做一個測試看看:

一開始, 我用 study 用戶分別發(fā)起 2 個 session 連接到到我的 ora11g 數(shù)據(jù)庫上

SESSION 1

Connected to Oracle Database 11g EnterpriseEdition Release 11.1.0.6.0

Connected as study

SQL show parameter recyclebin

NAME  TYPE  VALUE

————– ———– ————–

recyclebin  string ON

SQL alter system set recyclebin=off;

alter system set recyclebin=off

ORA-02096: 此選項(xiàng)的指定初始化參數(shù)不可修改

SQL alter session set recyclebin=off;

Session altered

SQL create table zrp(no int);

Table created

SQL drop table zrp;

Table dropped

SQL flashback table zrp to before drop;

flashback table zrp to before drop

ORA-38305: 對象不在回收站中

可以看到, 在 system 一級, 不加 DEFERRED 參數(shù)是不允許修改的, 但在 session 一級可以修改.

SQL alter system set recyclebin=off DEFERRED;

System altered

SQL

SESSION 2

說明: 在 session 1 中發(fā)出 alter system set recyclebin=off DEFERRED; 命令的時候, 我的 session 2 已經(jīng)連接到了 ora11g 上. 在這個 session 中,我們用來體會

alter system set recyclebin=off DEFERRED;

命令對當(dāng)前已經(jīng)連接的 session 不影響

C:\Documents andSettings\zhangrp sqlplus study/study

SQL*Plus: Release 11.1.0.6.0 – Productionon 星期五 2 月 20 16:20:50 2009

Copyright (c) 1982, 2007, Oracle. Allrights reserved.

連接到:

Oracle Database 11g Enterprise EditionRelease 11.1.0.6.0 – Production

With the Partitioning, OLAP, Data Miningand Real Application Testing options

SQL show parameter recyclebin

NAME  TYPE  VALUE

————– ———– ————–

recyclebin  string ON

SQL create table test_2(no int);

表已創(chuàng)建。

SQL drop table test_2;

表已刪除。

SQL flashback table test_2 to beforedrop;

閃回完成。

SQL desc test_2

名稱     是否為空? 類型

———— ——— ———–

NO  NUMBER(38)

SESSION 3

在 session 1 中完成 alter system set recyclebin=off DEFERRED; 命令以后, 我們再發(fā)起一個新的連接, 看看是不是對新的連接生效:

Microsoft Windows XP [版本 5.1.2600]

(C) 版權(quán)所有 1985-2001Microsoft Corp.

C:\Documents andSettings\zhangrp sqlplus study/study

SQL*Plus: Release 11.1.0.6.0 – Productionon 星期五 2 月 20 16:23:46 2009

Copyright (c) 1982, 2007, Oracle. Allrights reserved.

連接到:

Oracle Database 11g Enterprise EditionRelease 11.1.0.6.0 – Production

With the Partitioning, OLAP, Data Miningand Real Application Testing options

SQL show parameter recyclebin

NAME  TYPE  VALUE

————– ———– ————–

recyclebin  string OFF

以上是“在 oracle11g 中 altersystem set recyclebin = off 報錯 recyclebin 參數(shù)在 11g 和 10g 中的有哪些區(qū)別”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注丸趣 TV 行業(yè)資訊頻道!

正文完
 
丸趣
版權(quán)聲明:本站原創(chuàng)文章,由 丸趣 2023-07-19發(fā)表,共計2906字。
轉(zhuǎn)載說明:除特殊說明外本站除技術(shù)相關(guān)以外文章皆由網(wǎng)絡(luò)搜集發(fā)布,轉(zhuǎn)載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 平阴县| 武安市| 岫岩| 靖宇县| 永胜县| 东莞市| 巢湖市| 青海省| 北辰区| 睢宁县| 英山县| 锡林郭勒盟| 广昌县| 潼南县| 梅州市| 新蔡县| 镶黄旗| 黎城县| 台东市| 黄浦区| 太仆寺旗| 泰兴市| 利辛县| 攀枝花市| 三门峡市| 澎湖县| 平泉县| 无锡市| 苗栗市| 岳西县| 区。| 永胜县| 碌曲县| 敦化市| 平邑县| 灵川县| 彭山县| 开江县| 丹江口市| 普定县| 鲜城|