set unused的用法(ORACLE删除字段) 一.问题 现场有一张大数据量的分区表,数据量在10G以上.因某种原因需要删除其中的某些字段.如果直接用alter table1 drop (column1,column2);或者alter table1 drop column column1;和alter table1 drop column column2; 的话,需要执行很长时间,这期间该表被锁,会影响到其它应用. 二.解决方法 使用set unused,等系统空闲时再drop unuse
一.问题 现场有一张大数据量的分区表,数据量在10G以上.因某种原因需要删除其中的某些字段.如果直接用 alter table1 drop (column1,column2); 或者alter table1 drop column column1;和alter table1 drop column column2; 的话,需要执行很长时间,这期间该表被锁,会影响到其它应用. 二.解决方法 使用set unused,等系统空闲时再drop unused. 1. alter table table
使用 set unused 选项标记不再使用的列 使用 drop unsused columns 丢弃标记为unused的列 alter table tabName set unused column colName; 或alter table tabName set unused (colName); alter table tabName drop unused columns; 使用场景: 1业务正在使用中,使用语句alter table tabName drop column col
SET UNUSED的用法 原理:清楚掉字典信息(撤消存储空间),不可恢复. 可以使用 SET UNUSED选项标记一列或者多列不可用. 使用DROP SET UNUSED选项删除被被标记为不可用的列. 语法: ALTER TABLE table SET UNUSED (COLlist多个)或者 ALTER TABLE table SET UNUSED COLUMN col单个; ALTER TABLE table DROP UNUSED COLUMNS; set unu
下面是我总结的OCP教程的知识点.以备參考之用. 1, What's Oracle Server? · It's a database management system that provides an open, comprehensive, integrated approach to information management. · Consists of an Oracle instance and an Oracle database 2,What
oracle常用经典SQL查询 常用SQL查询: .查看表空间的名称及大小 )),) ts_size from dba_tablespaces t, dba_data_files d where t.tablespace_name = d.tablespace_name group by t.tablespace_name; .查看表空间物理文件的名称及大小 select tablespace_name, file_id, file_name, ),) total_space from dba_
第一章:日志管理 1.forcing log switches sql> alter system switch logfile; 2.forcing checkpoints sql> alter system checkpoint; 3.adding online redo log groups sql> alter database add logfile [group 4]sql> ('/disk3/log4a.rdo','/disk4/log4b.rdo') size 1m
commands : show sys connect sys as sysdba or connect system as sysdba logout or disc clear screen or cle screen (utlsample.sql —> unlock scott tables.sql —> all tables data.sql —> add data into tables) connect scott/tiger start C:\utlsample.sq