ORA-12916 cannot shrink permanent or dictionary managed tablespace

2023-12-12 22:18

本文主要是介绍ORA-12916 cannot shrink permanent or dictionary managed tablespace,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

--在数据库迁移过程中,担心新库中担心存储不够,统计下数据量大小。

缺发现有空间需要shrink,  但是报错了, 表示默认表空间不允许shink.


SQL> select 6, tablespace_name,bytes/1024/1024/1024 from dba_data_files2  where tablespace_name='TBDATA_DEFAULT'3  union all4  select 6, tablespace_name,sum(bytes)/1024/1024/1024 from user_segments5  where tablespace_name='TBDATA_DEFAULT'6  group by tablespace_name7  ;6 TABLESPACE_NAME                BYTES/1024/1024/1024
---------- ------------------------------ --------------------6 TBDATA_DEFAULT                             2361.1256 TBDATA_DEFAULT                                   90SQL> alter tablespace TBDATA_DEFAULT shrink space;alter tablespace TBDATA_DEFAULT shrink spaceORA-12916: cannot shrink permanent or dictionary managed tablespaceSQL> 


--那么我们改变默认表空间

SQL> col file_name format a50;
SQL> select * from dba_data_files;FILE_NAME                                             FILE_ID TABLESPACE_NAME                     BYTES     BLOCKS STATUS    RELATIVE_FNO AUTOEXTENSIBLE   MAXBYTES  MAXBLOCKS INCREMENT_BY USER_BYTES USER_BLOCKS ONLINE_STATUS
-------------------------------------------------- ---------- ------------------------------ ---------- ---------- --------- ------------ -------------- ---------- ---------- ------------ ---------- ----------- -------------
+DG01DATA/unicom/datafile/system.263.889796403              1 SYSTEM                         1555038208     474560 AVAILABLE         1024 YES            1407374882 4294967293          320 1554933350      474528 SYSTEM
+DG01DATA/unicom/datafile/sysaux.264.889796407              2 SYSAUX                         2967470080      90560 AVAILABLE         1024 YES            1407374882 4294967293          320 2966421504       90528 ONLINE
+DG01DATA/unicom/datafile/undotbs1.265.889796409            3 UNDOTBS1                       1974992896     602720 AVAILABLE         1024 YES            1407374882 4294967293          160 1974888038      602688 ONLINE
+DG01DATA/unicom/datafile/undotbs2.267.889796431            4 UNDOTBS2                       4482662400     136800 AVAILABLE         1024 YES            1407374882 4294967293          160 4481613824      136768 ONLINE
+DG01DATA/unicom/datafile/users.268.889796431               5 USERS                          1938554880      59160 AVAILABLE         1024 YES            1407374882 4294967293           40 1937506304       59128 ONLINE
+DG01DATA/unicom/datafile/tbdata_default.272.88985          6 TBDATA_DEFAULT                 2535238664   77369344 AVAILABLE         1024 YES            1407374882 4294967293         8192 2535234469    77369216 ONLINE
7763                                                                                                                                                                                                               6 rows selectedSQL> 
SQL> select username,default_tablespace,temporary_tablespace2  from dba_users3  where username = 'UNICOMIDMP'4  ;USERNAME                       DEFAULT_TABLESPACE             TEMPORARY_TABLESPACE
------------------------------ ------------------------------ ------------------------------
UNICOMIDMP                     TBDATA_DEFAULT                 TEMPSQL>  alter user unicomidmp default tablespace users;User alteredSQL> 
SQL>  select username,default_tablespace,temporary_tablespace2  from dba_users3  where username = 'UNICOMIDMP'4  ;USERNAME                       DEFAULT_TABLESPACE             TEMPORARY_TABLESPACE
------------------------------ ------------------------------ ------------------------------
UNICOMIDMP                     USERS                          TEMPSQL> 



--执行shrink

SQL> alter tablespace TBDATA_DEFAULT shrink space;alter tablespace TBDATA_DEFAULT shrink spaceORA-12916: cannot shrink permanent or dictionary managed tablespace


--还是报错。


说明不是默认表空间的问题。

而是字典表空间无法shrink。,并且要求自动增长的。 system表空间也是无法shrink



这篇关于ORA-12916 cannot shrink permanent or dictionary managed tablespace的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/486141

相关文章

ImportError: cannot import name ‘print_log‘ from ‘logging‘

mmcv升级到2.+后删除了很多 解决 查FAQ文档,找到 添加到mmcv.utils下即可

vue 父组件调用子组件的方法报错,“TypeError: Cannot read property ‘subDialogRef‘ of undefined“

vue 父组件调用子组件的方法报错,“TypeError: Cannot read property ‘subDialogRef’ of undefined” 最近用vue做的一个界面,引入了一个子组件,在父组件中调用子组件的方法时,报错提示: [Vue warn]: Error in v-on handler: “TypeError: Cannot read property ‘methods

ora-01017 ora-02063 database link,oracle11.2g通过dblink连接oracle11.2g

错误图示: 问题解决 All database links, whether public or private, need username/password of the remote/target database. Public db links are accessible by all accounts on the local database, while private

Unstructured cannot write mode RGBA as JPEG 错误解决

Unstructured cannot write mode RGBA as JPEG 错误解决 0. 错误详细1. 解决方法 0. 错误详细 Image Extraction Error: Skipping the failed imageTraceback (most recent call last):File "/root/miniconda3/envs/learn-y

Cannot read property ‘length‘ of null while opening vscode terminal

同一问题地址:Cannot read property ‘length’ of null while opening vscode terminal 问题描述 One day, 我在ubuntu 18.04下用vscode打开一个项目,并想和往常一样在vscode使用终端,发现报错Cannot read property 'length' of null。 解决 打开setting.jso

The import com.google cannot be resolved

The import com.google cannot be resolved,报错: 第一感觉就是缺少jar包,因为项目用maven管理,所以在pom.xml中添加: <dependency>  <groupId>com.google.code.gson</groupId>  <artifactId>gson</artifactId>  <version>2.3.1</ver

ORA-25150:不允许对区参数执行ALTERING

在用PL/SQL工具修改表存储报错: 百度一下找到原因: 表空间使用本地管理,其中的表不能修改NEXT MAXEXTENTS和PCTINCREASE参数 使用数据自动管理的表空间,其中的表可以修改NEXT MAXEXTENTS和PCTINCREASE参数

ORA-01861:文字与格式字符串不匹配

select t.*, t.rowid from log_jk_dtl t; insert into log_jk_dtl (rq,zy,kssj,jssj,memo)  values (to_date(sysdate,'yyyy-mm-dd'),'插入供应商', to_char(sysdate,'hh24:mi:ss'),to_char(sysdate,'hh24:mi:ss'),'备注'

利用PL/SQL工具连接Oracle数据库的时候,报错:ORA-12638: 身份证明检索失败的解决办法

找到相对应的安装目录:比如:E:\oracle\product\10.2.0\client_1\NETWORK\ADMIN 在里面找到:SQLNET.AUTHENTICATION_SERVICES= (NTS) 将其更改为:SQLNET.AUTHENTICATION_SERVICES= (BEQ,NONE) 或者注释掉:#SQLNET.AUTHENTICATION_SERVICES= (N

pip install pyaudio sounddevice error: externally-managed-environment

shgbitai@shgbitai-C9X299-PGF:~/pythonworkspace/ai-accompany$ pip install pyaudio sounddeviceerror: externally-managed-environment× This environment is externally managed╰─> To install Python package