随笔分类 - oracle
摘要:SELECT d.tablespace_name "Name", TO_CHAR(NVL(a.bytes / 1024 / 1024, 0), '99,999,990.900') "Size (M)", TO_CHAR(NVL(t.hwm, 0) / 1024 / 1024, '99999999.9
阅读全文
摘要:启用 DDL 日志记录 功能--支持动态调整 alter system set enable_ddl_logging=true; alter system set enable_ddl_logging=true; 10:34:41 SYS@ewdb1(ewdb1)> show parameter e
阅读全文
摘要:SQL> @?/rdbms/admin/awrrpt.sql (可以去两个快照之间的awr报告) 注:AWR默认保留数据库7天的快照,每个小时产生一个快照 select * from dba_hist_wr_control 1、手工先在数据库中创建一个快照 SQL> execute dbms_wor
阅读全文
摘要:删除序列select 'drop sequence ' || sequence_owner || '.' || SEQUENCE_NAME || ';'from dba_sequenceswhere sequence_owner IN ('AMS', 'AIS') 序列当前值 select 'cre
阅读全文
摘要:SELECT SS.USERNAME, SS.SID, SS.SERIAL#, SS.MACHINE, SS.PROGRAM, SL.OPNAME, SL.TARGET, SL.START_TIME, ROUND(SL.SOFAR * 100 / SL.TOTALWORK, 0) || '%' AS
阅读全文
摘要:--alter 日志Sat Mar 30 22:01:08 2019DBMS_STATS: GATHER_STATS_JOB encountered errors. Check the trace file.Errors in file /u01/app/oracle/diag/rdbms/bapd
阅读全文
摘要:Oracle的任何一个新版本,总是会带来大量引人瞩目的新特性,但是往往在这些新特性引入之初,首先引起的是一些麻烦,因为对于新技术的不了解、因为对于旧环境的不适应,从Oracle产品到技术服务运维,总是要走过一个磨合的长期过程。 请注意:我们并不推荐大家盲目的关闭和摒弃Oracle的新特性,我们建议大
阅读全文
摘要:select a.name, b.* from v$tablespace a, (select tablespace_id, trunc(to_date(rtime, 'mm/dd/yyyy hh24:mi:ss')) datetime, max(tablespace_usedsize * 8 /
阅读全文
摘要:SQL> shut immediateORA-24324: service handle not initializedORA-24323: value not allowedORA-27140: attach to post/wait facility failedORA-27300: OS sy
阅读全文
摘要:[grid@db2 db2]$ adrci ADRCI: Release 12.2.0.1.0 - Production on Mon Feb 25 15:51:14 2019 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All r
阅读全文
摘要:1.查看所有用户:select * from dba_users;select * from all_users;select * from user_users; 2.查看用户或角色系统权限(直接赋值给用户或角色的系统权限):select * from dba_sys_privs;select *
阅读全文
摘要:备库 Thu Feb 14 09:00:32 2019Errors in file /u01/app/oracle/diag/rdbms/trstdb/trstdb/trace/trstdb_ora_90063.trc (incident=880729):ORA-00600: internal er
阅读全文
摘要:节点1: Wed Feb 13 16:08:06 2019Errors in file /u01/app/oracle/diag/rdbms/testdb/testdb1/trace/testdb1_dia0_9267.trc (incident=1248083):ORA-32701: Possib
阅读全文
摘要:目标端创建 SELECT * FROM DBA_DB_LINKS Create public database link DW_TO_AC connect to chg identified by 123456 using '(DESCRIPTION= (ADDRESS_LIST=(ADDRESS
阅读全文
摘要:ri Dec 21 22:00:00 2018Setting Resource Manager plan SCHEDULER[0x32DD]:DEFAULT_MAINTENANCE_PLAN via scheduler windowSetting Resource Manager plan DEFA
阅读全文
摘要:格式:alter system|session set events ‘[eventnumber|immediate] trace name eventname [forever] [, level levelnumber] : „„.’ 通过“:”符号,可以连续设置多个事件,也可以通过连续使用al
阅读全文
摘要:--节点1报错 Sun Dec 09 08:29:57 2018Control file backup creation failed: failure to open backup target file /u01/app/oracle/product/11.2.0/db_1/dbs/snapcf
阅读全文
摘要:有时候,SQL语句中包含了 & 符号,&是数据库中存储的值,而非要求我们输入某个值, 如果你在 SQLPLUS中运行该SQL, 可以用 set define off 命令 忽略 & 举个例子: SQL> select 'hello &word' from dual;Enter value for w
阅读全文
摘要:--本方法基于ORACLE11G 实验: SQL> create table test_1205 as select * from dba_objects;Table created SQL> select sid from v$mystat where rownum=1; SID 1155 SQL
阅读全文
摘要:CRS-4664: Node acdg successfully pinned.Adding Clusterware entries to inittabohasd failed to startFailed to start the Clusterware. Last 20 lines of th
阅读全文