- 博客(36)
- 资源 (8)
- 收藏
- 关注
原创 oracle 12c truncate table cascade 笔记
--------------------------------------------11g-----------------------------------------------------------drop table t_child;drop table t_parent;create table t_parent(id number,name varchar2(20));al...
2018-07-06 13:39:18
1887
转载 resultcache-rac
http://www.oracle.com/technetwork/articles/datawarehouse/vallath-resultcache-rac-284280.html
2018-03-21 10:00:55
172
转载 Monitoring RMAN Job Progress with V$SESSION_LONGOPS
To monitor RMAN job progress:1. Before starting the RMAN job, create a script file (called, for this example,longops) containing the following SQL statement:SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTA...
2018-03-14 21:42:21
310
转载 PL/SQL Function Result Cache
http://www.oracle.com/technetwork/issue-archive/2010/10-sep/o57plsql-088600.htmlhttps://pan.baidu.com/s/1sjG7H8A7i7JWCGjzdbpSNw 脚本DEVELOPER: PL/SQL Practices On the PL/SQL Function Result CacheBy St...
2018-03-14 21:00:19
324
原创 oracle autotrace 笔记
--puzzle登录[oracle@oel ~]$ sqlplus puzzle/puzzleSQL*Plus: Release 11.2.0.4.0 Production on Fri Feb 16 21:45:25 2018Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to:Oracle Database ...
2018-03-14 14:03:32
228
原创 oracle sql 笔记
SQL> conn / as sysdbaConnected.SQL> drop user puzzle cascade;User dropped.SQL> create user puzzle identified by puzzle;User created.SQL> grant create session,resource to puzzle;Grant suc...
2018-03-14 13:50:23
276
原创 oracle utlexcpt.sql使用笔记
[oracle@oel ~]$ export ORACLE_SID=orcl[oracle@oel ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Fri Feb 16 16:20:51 2018Copyright (c) 1982, 2013, Oracle. All rights reserved.Con...
2018-03-13 17:06:47
215
原创 oracle create table
看文档有个CREATE TABLE t2 (i NUMBER, j NUMBER) PARTITION BY RANGE(j) SUBPARTITION BY HASH(i) (PARTITION p1 VALUES LESS THAN (10) SUBPARTITION t2_pls1 SUBPARTITION t2_pl...
2018-03-09 14:59:38
3123
原创 oracle deferrable 笔记
DEFERRABLE Clause The DEFERRABLE and NOT DEFERRABLE parameters indicate whether or not, in subsequent transactions, constraint checking can be deferred until the end of the transaction using the SET...
2018-03-09 09:03:13
531
原创 oracle rman unrecoverable database
Question: What does it mean when I have an unrecoverable Oracle data file? How can I prevent an unrecoverable data file?Answer: Oracle data files maintain their internal consistency by being sync...
2018-02-18 20:46:47
460
原创 oracle block recover笔记
select * from dba_segments where owner='TEST';--header_block=10[oracle@oel ~]$ dd of=/u01/app/oracle/oradata/orcl/test01.dbf bs=8192 conv=notrunc seek=11 <<EOF> asdfsdfadf> EOF0+1 ...
2018-02-18 15:38:55
495
翻译 oralce db time
上次看awr就纳闷db time怎么比60分钟长,明明awr是默认一小时一次https://docs.oracle.com/cd/E11882_01/server.112/e41573/autostat.htm#PFGRF94163DB time is measured cumulatively from the time of instance startup. Because DB time ...
2018-02-12 11:14:24
188
原创 oracle rman keep
官方问BACKUP TAG Q107 DATABASE KEEP FOREVER;RMAN> BACKUP TAG Q107 DATABASE KEEP FOREVER;Starting backup at 05-FEB-18current log archivedusing target database control file instead of recovery ca
2018-02-07 22:01:35
816
原创 oracle controlfile笔记
CREATE CONTROLFILE REUSE DATABASE ORCL NORESETLOGS ARCHIVELOG MAXLOGFILES 32 MAXLOGMEMBERS 2 MAXDATAFILES 32 MAXINSTANCES 16 MAXLOGHISTORY 1600LOGFILE GROUP 1
2018-02-07 08:53:40
279
原创 windows eclipse调试linux hadoop
1、hadoop2.8.1 rhel6.4 为分布式2、windows7 elcipse报错/bin/bashFailing this attempt.Diagnostics: Exception from container-launch.Container id: container_1502597163727_0008_02_000001Exit code: 1Exc
2017-08-28 15:00:08
338
原创 oracle latch _spin_count
看书上说oracle的latch默认spin是2000,也就是说_spin_count的值是2000,可是我查询时,结果是1SELECT X.KSPPINM NAME, Y.KSPFTCTXVL VALUE, Y.KSPFTCTXDF ISDEFAULT FROM SYS.X$KSPPI X, SYS.X$KSPPCV2 Y WHERE X.INST_ID = USERENV('
2017-05-27 11:28:30
568
原创 centos oracle
centos6.8 oracle 11.2.0.4.0 安装后远程无法连接oracle其中/etc/hosts 有一行10.140.120.162 centos68 /etc/sysconfig/network 中hostname=centos68但是oracle环境变量.bash_profile的ORACLE_HOSTNAME=localhost.localdomain修
2017-05-12 10:56:31
234
原创 oel7+oracle12c tns 超时
selinux已经关了,iptables已经关了,[root@localhost ~]# getenforce Disabled[root@localhost ~]# systemctl status iptables.serviceiptables.service - IPv4 firewall with iptables Loaded: loaded (/usr
2017-05-03 16:43:53
322
原创 oracle dead lock
死锁的其中一个原因是互相占用已有的资源。首先,左边执行update hr.departments set department_name='deptname';然后右边执行update hr.employees set last_name='king';这就是各自占用一个资源然后,左边执行update hr.employees set last_name='king';然后右边执行
2017-04-10 14:28:46
392
原创 for update
oracle中,当我们使用select for update时,oracle做了2件事。首先对该条记录加锁,然后对该表结构加锁。For example, if you select a row from a table with the FOR UPDATE clause, two locks will be created. One lock is placed on the row(s)
2017-04-10 14:22:03
274
原创 sql tune
具体包的使用可参照Oracle® Database PLSQL Packages and Types Reference 12c Release 1(12.1)准备数据:CREATE USER OPT IDENTIFIED BY 1;--新建个用户GRANT DBA TO OPT; --权限无所谓DROP TABLE
2017-04-07 13:39:19
342
原创 oralce redo
环境:(不新建表空间,不新建用户都可以,这个不是关键)CREATE TABLESPACE ORCLDBF DATAFILE 'D:/ORA/ORCL/ORCLDBF.DBF' SIZE 16M AUTOEXTEND ON;CREATE USER ORCLDBF IDENTIFIED BY 1 DEFAULT TABLESPACE ORCLDBF;GRANT DBA TO ORCLDBF
2017-04-05 12:58:23
361
原创 sql null
由于本人一直使用exist,很少使用in,所以没有发现这个问题。数据create table t1(n1 number, v1 varchar2(20));create table t2(n1 number, v1 varchar2(20));insert into t1 values(99,'99');insert into t2 values (null, '88'
2017-04-01 09:19:24
377
原创 query-unesting
环境:BANNER CON_ID-------------------------------------------------------------------------------- ----------Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Product
2017-03-30 16:50:12
216
原创 sub-query unnesting
SELECT * FROM (SELECT * FROM HR.EMPLOYEES);SELECT * FROM HR.EMPLOYEES;第一中写法改称第二种写法,第一种和第二种查询结果完全等效。这就是sub-query unnesting。nest有嵌套的意思。unnest就像是不套在里面。
2017-03-30 15:18:55
314
原创 sql
一些无法使用索引,或者导致查询计划无法达到最优的原因use of expressions in predicatesequality VS inequality predicatedimplicit data-type conversionsbind variablesunion union all or multiple similar subqueries
2017-03-29 09:15:16
198
原创 hot block
take a note:When multiple processes are concurrently attempting to update the same block, the block is said to be hot. Hot blocks don’t always occur in indexes, but most of them do.Reverse Key
2017-03-28 13:50:16
513
转载 sql hash join VS nested loop
最近看了Expert Oracle SQL Optimization,Deployment, and Statistics这本书,其中介绍了hash join的优缺点,这里做个笔记。Hash joins have the following advantages over nested loops when the probe row source is a table:•Ever
2017-03-22 16:44:26
284
原创 oracle histogram
最近看了maclean老师在多年前讲的关于histogram的视频,然后顺便查看了一些oracle12c官方文档。发现文档中有个图很好,上传一些,做个笔记。1、11g中n最大是254,根据oracle白皮书说12c开始最大是 2048了2、12c中包含四种histogram:frequency, top-frequency, or height-balanced and hybrid.11
2017-03-22 15:21:40
465
转载 reasonsfor Locking Statistics
Perhaps these tables have lots of hand-crafted changes done with DBMS_STATS.SET_xxx_STATS procedures.Perhaps gathering is a time-consuming activity that you know isn’t necessary or will not be
2017-03-20 13:33:08
164
原创 sql col_usage$
the AVG_ROW_LEN statistic for a table partition indicates the average size of a row in the table partition.The BLEVEL statistic of an index partition indicates how many blocks have to be visit
2017-03-20 08:47:24
442
原创 oralce字符集
问题如下: 1、有个人的名字是王㭎,但是oralce11.2.0.4.0存成了‘王?’。 2、oralce字符集ZHS16GBK,通过oralce的local builder查看,这个字符集中没有这个“㭎”字 3、新建了一个数据库,字符集改完AL32UTF8,
2017-03-07 16:24:02
575
原创 ora-00257
imp,然后连接oralce plsql报错ORA-00257: archiver error. Connect internal onlySQL> show parameter ECOVERY_FILE_DESTNAME TYPE VALUE-------------------------
2017-02-27 14:40:55
1787
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人