摘要:
一、创建逻辑目录,该命令不会在操作系统创建真正的目录,最好以system等管理员创建。 create directory exp_shengchan as '/home/oracle/exp_shengchan'; 二、查看管理理员目录(同时查看操作系统是否存在,因为Oracle并不关心该目录是否存 阅读全文
摘要:
SELECT a.*, b.comments FROM (SELECT OWNER, SEGMENT_NAME, SEGMENT_TYPE, round(SUM(BYTES / 1024 / 1024 / 1024), 3) GB FROM DBA_SEGMENTS WHERE OWNER IN ( 阅读全文
摘要:
merge into (SELECT * FROM QUERY_DB1.test_MPOS ) T1 using (SELECT FLAG FLAG1,IN_MNO FROM QUERY_DB1.test_MPOS_0319 ) T2 ON (T1.IN_MNO=T2.IN_MNO) WHEN MA 阅读全文
摘要:
SELECT SE.SID, OPNAME, TRUNC(SOFAR / TOTALWORK * 100, 2) || '%' AS PCT_WORK, ELAPSED_SECONDS ELAPSED, ROUND(ELAPSED_SECONDS * (TOTALWORK - SOFAR) / SO 阅读全文
摘要:
select object_name as 对象名称,s.sid,s.serial#,p.spid as 系统进程号 from v$locked_object l , dba_objects o , v$session s , v$process p where l.object_id=o.obje 阅读全文
摘要:
提到软解析(soft prase)和硬解析(hard prase),就不能不说一下Oracle对sql的处理过程。当你发出一条sql语句交付Oracle,在执行和获取结果前,Oracle对此sql将进行几个步骤的处理过程:1、语法检查(syntax check)检查此sql的拼写是否语法。2、语义检 阅读全文
摘要:
select sum(bytes / 1024 / 1024 / 1024), d.owner, d.segment_name, d.segment_type from dba_segments d where d.owner in (select c.username from dba_users 阅读全文
摘要:
执行过程 TS.TEST RENAME INDEX(索引) ALTER INDEX TS.IDX1_TEST RENAME TO IDX1_TEST_BAK; ALTER INDEX TS.T_BAP_PK_TEST RENAME TO T_BAP_PK_TEST_BAK; --RENAME PK 阅读全文
摘要:
ALTER USER TEST DEFAULT TABLESPACE TEST_DATA; ALTER USER TEST TEMPORARY TABLESPACE TEST_TMP; SELECT * FROM DBA_USERS A WHERE A.USERNAME='TEST'; SELECT 阅读全文
摘要:
1.找出重复数据 select count(1),uuid from ts.test group by uuid having count(1)>1 order by 1 desc ; 找出重复数据 select * from ts.test E WHERE E.ROWID > (SELECT MI 阅读全文
摘要:
DROP TABLESPACE BRS_DATA INCLUDING CONTENTS AND DATAFILES;DROP TABLESPACE BRS_IDX INCLUDING CONTENTS AND DATAFILES;DROP TABLESPACE BRS_TEMP INCLUDING 阅读全文
摘要:
--11g 以后关闭回收站 system 级别需要加 DEFERRED 参数; session 级别不需要 select name,isses_modifiable,issys_modifiable from v$parameter where name='recyclebin' SQL> show 阅读全文
摘要:
低版本 往 高版本 导入,导出的时候不用加version ; 高版本往低版本的时候 需要加 version expdp version (往低版本的时候 需要加 version 版本号是 impdp 端的) 阅读全文
摘要:
1.根据数据库现有模板创建PDB CREATE PLUGGABLE DATABASE ssptrad ADMIN USER sspIDENTIFIED BY oracle roles=(dba) file_name_convert=('/u01/app/oracle/oradata/ora12c/p 阅读全文
摘要:
select a.table_owner, a.table_name, a.max_partition from (select table_owner, table_name, max(partition_name) max_partition from dba_tab_partitions wh 阅读全文
摘要:
一、创建远程物化视图日志 源端: CREATE MATERIALIZED VIEW LOG ON tozwdb.test tablespace tozwdb_data WITH ROWID; 二、付权限 目标库 Create user tozwdb identified by tozwdb_dev; 阅读全文
摘要:
PDB启动随cdb自动启动命令: --单个PDB ORCLPDB alter pluggable database ORCLPDB save state;--PDB开启状态下,CDB重启,PDB随CDB启动 alter pluggable database ORCLPDB discard state 阅读全文