- 博客(52)
- 资源 (9)
- 收藏
- 关注
原创 oracle 用户管理简单说
1.1 用户管理1、创建用户简化语法:create user user_name identified by password -- 必须有的default tablespace tablespace_name --指定默认表空间存放该用户创建的对象 可有可无temporary tablespace temp_tablespace --指定默认临时表空间 可...
2019-03-15 10:58:04
189
原创 基于Python 2.6.6 的猜拳小游戏
操作系统:centos 6.5python版本:Python 2.6.6小游戏规则:玩家连赢、连输或者连续平手5次,自动退出游戏,玩家可选择主动退出游戏#/usr/bin/python#encoding=utf-8import randomi=0 #玩家输的次数j=0 #玩家赢的次数k=0 #玩家平手的次数m=0 #玩家放弃出拳的次数#规则之内while i<...
2018-12-18 14:56:56
501
原创 awk命令简单例子
使用方法awk '{pattern + action}' {filenames}例子:环境搭建:mkdir /testcp /etc/passwd /test/test1、打印/test/test.txt(复制的/etc/passwd文件)文件中第一列的值awk -F: '{ printf $1 "\n"}' testawk -F: '{ printf $1 "\n"}' testF: 指定文件每...
2018-04-04 16:30:20
953
原创 简单分析tkprof输出文件的内容
[oracle@rhf trace]$ tkprof orcl_ora_29583_rtrace.trc rhf2.prf explain=system/oracle sort=exeela,prsela,fchela[oracle@rhf trace]$ ls -l rhf2.prf-rw-r--r-- 1 oracle oinstall 49906 Aug 30 16:00 rhf2.
2016-09-06 15:52:04
793
原创 使用TKPROF重置追踪文件的格式
tkprof工具是大多数数据库管理员经常使用的,由oracle提供的,用于分析追踪文件的分析工具。其命令格式如下:[oracle@rhf ~]$ tkprofUsage: tkprof tracefile outputfile [explain= ] [table= ] [print= ] [insert= ] [sys= ] [sort= ] tabl
2016-09-06 15:00:09
353
原创 oracle数据库取消操作系统认证
windows关闭操作系统认证$ORACLE_HOME/network/admin/sqlnet.ora.sqlNET.AUTHENTICATION_SERVICES = (NTS)注释掉即可其他系统$ORACLE_HOME/network/admin/sqlnet.ora.sqlNET.AUTHENTICATION_SERVICES = (none)
2016-08-15 10:17:05
1068
原创 oracle修改redo大小
创建过渡redoalter database add logfile group 4 '/home/oracle/app/oracle/oradata/soc/redo04.log' size 500M;alter database add logfile group 5 '/home/oracle/app/oracle/oradata/soc/redo05.log' size 500M;
2016-08-10 10:33:20
1184
原创 oracle 表分区
分区表作用:1、增加了可用性2、使对象更易于管理3、降低了oltp系统中公共资源的争用4、提高了数据仓库中查询的性能分区策略基本的分区策略是: range, list, and hash 1、range:按对一张表指定的一个字段值或多个字段值的范围进行分区。CREATE TABLE time_range_sales ( prod_id NUMBER(6)
2014-11-25 17:26:09
525
原创 oracle 细粒度审计的开启
--------创建细粒度策略select 'begin' || chr(10) || 'dbms_fga.add_policy(object_schema =>''' || owner || ''',' || chr(10) || ' object_name =>''' || table_name || '
2014-08-26 16:55:36
974
原创 oracle 索引的分析和整理
索引碎片的分析和整理索引碎片产生的原因:对索引字段频繁地进行delete、update操作,会对索引造成大量的碎片。影响:极大地影响了索引的使用效率,并造成索引i/0的增加。1、索引碎片分析分析语句:SQL>analyze index validate structure online;查看索引碎片的情况:SQL>select name,del_lf_rows_len
2014-08-14 15:06:05
1848
原创 oracle 监控索引
oracle 9i开始提供了索引监控功能,在某个业务周期开始之前执行如下命令,可以对需要关注的索引进行监控:SQL>alter index monitoring usage;在该业务周期结束后执行如下命令,可以对需要关注的索引结束监控:SQL>alter index nomonitoring usage;之后可以通过查看v$object_usage视图查看索引的使用情况SQ
2014-08-14 11:06:54
449
原创 oracle 复合索引
复合索引原理:1、前缀性(prefixing)即按照复合索引创建时包含字段的顺序分别依次排序,如在(a,b,c)列上创建了复合索引,那么该复合索引在oracle数据库索引树上就会先按a排序,再按b排序,最后按c排序。如 a b c河南 洛阳 伊川河南 洛阳 偃师河南 洛阳 洛宁河南 洛阳 宜阳河南 洛阳 汝阳
2014-08-13 11:08:12
1848
原创 oracle sql书写规范
一、书写规范1、sql编写时,大小写一致2、关键字单占一行,如select、from、where、and、group by、order by等3、注意行缩进和对齐,建议语句中的关键字右对齐4、使用空格,SQL语句内的算术运算符、逻辑运算符(AND、OR、NOT)、 比较运算符(=、=、>、、BETWEEN AND)、IN、LIKE等运算符前后都应加一空格。5、对较为复杂的sql
2014-08-12 10:00:18
1582
原创 oracle sql执行过程
oracle sql语句的执行过程1、语法检查---诸如select ... from ...等 关键字之类的2、语意检查 ---对象是否存在如表、视图、字段等等3、共享池检查(shared pool check)4、从多个执行计划中选择最佳执行计划(Optimization)5、产生行源(Row Source Generation)6、执行,显示结果
2014-07-21 16:32:28
761
原创 归档小结(2)
1、修改归档路径ALTER SYSTEM SET log_archive_dest_1='LOCATION=+DATA' SCOPE=BOTH; 2、修改归档文件名字ALTER SYSTEM SET log_archive_format='%t_%s_%r.arc' SCOPE=SPFILE;(需要重启数据库) 3、在rac中设置归档模式,需要将所有节点的数据库都关掉,然后
2014-07-15 11:29:06
530
原创 optimizer_index_cost_adj
Adjusts the cost of index probes. The range of values is 1 to 10000. The default value is 100, which means that indexes are evaluated as an access path based on the normal costing model. A value of 10
2014-07-11 10:46:11
518
原创 red hat linux6 yum 配置
cp rhel-source.repo rhel-media.repomv rhel-source.repo rhel-source.repo.bakmount /dev/cdrom /mntvi rhel-media.repo编辑后如下显示[rhel-media]name=rhel-mediabaseurl=file:///mnt/Serverenabled=1
2014-07-10 10:33:35
619
原创 linux快速修改用户密码
密码 用户名echo "oracle" | passwd --stdin oracleecho "ybroot" | passwd --stdin root
2014-07-10 10:19:13
517
原创 centos 6.4 切换weblogic用户报错
问题描述Weblogic应用启动后,在某个节点,root用户切换到weblogic用户报如下错误:bash: fork: Resource temporarily unavailable 问题分析:从错误的字面意思可以看到临时资源不足查看内存充足查看用户进程ps -ef | wc –lps ux | wc -lulimit -u 查看用户限制s
2014-05-02 10:20:42
818
原创 虚拟机linux 6.4 下yum的配置
环境操作系统:linux 6.4(oracle和redhat一样)cd /etc/yum.repo.d/mkdir bakmv *.bak bak/光驱和系统盘必须挂载上mount /dev/cdrom /mntcd /etc/yum.repo.d/vi rhel-media.repo编辑如下:[rhel-media]name=rhel-mediab
2014-05-02 10:09:45
558
原创 Linux 6.4下oracle 11g RAC安装前环境配置
操作系统:redhat linux 6.4 x64数据库: oracle 11.2.0.3 RAC检查系统包binutils-2.15.92.0.2compat-libstdc++-33-3.2.3compat-libstdc++-33-3.2.3 (32 bit)elfutils-libelf-0.97elfutils-libelf-devel-0.97expat
2014-05-02 10:00:50
1214
原创 oracle 数据库无法自动创建snapshot
1)查看所有的snapshot的snap_id,和dbidSQL>select snap_id,dbid from dba_hist_snapshot;2)删掉所有的已经存在的snapshotSQL>dbms_workload_repository.drop_snapshot_range(low_snap_id=>975,high_snap_id=>976,dbid=> 1341370
2014-04-04 15:34:33
3166
原创 Linux下ssh互信设置
每台机器都要执行su - weblogic/usr/bin/ssh-keygen -t rsa/usr/bin/ssh-keygen -t dsa 在第二个节点cd .sshscp id_rsa.pub node1:/home/oracle/.ssh/id_rsa.pub2scp id_dsa.pub node1:/home/oracle/.ssh/id_dsa.p
2014-04-02 16:49:28
642
翻译 oracle概念(十)
The SYSTEM Tablespace System表空间EveryOracle database contains a tablespace named SYSTEM , which Oracle creates automatically when the database is created. The SYSTEM tablespace is alwaysonline when
2013-08-29 06:17:07
654
翻译 oracle概念(九)
Overview of Tablespaces 表空间概述A databaseis divided into one or more logical storage units called tablespaces.Tablespaces are divided into logical units of storage called segments, whichare further
2013-08-21 16:51:10
566
翻译 oracle体系结构(八)
Tablespaces, Datafiles, and Control Files表空间、数据文件和控制文件Introductionto Tablespaces, Datafiles, and Control Files表空间、数据文件和控制文件的简介Oraclestores data logically in tablespaces and physically in datafil
2013-08-20 10:59:21
550
翻译 oracle 体系结构(七)
Introduction to Automatic Undo Management自动撤销管理简介Oracle maintains information to nullifychanges made to the database. Such information consists of records of theactions of transactions, collective
2013-08-19 06:05:30
559
翻译 oracle体系结构(六)
Overview ofSegments段概述A segment is a set of extents that containsall the data for a specific logical storage structure within a tablespace. Forexample, for each table, Oracle allocates one or more
2013-07-16 15:49:17
588
翻译 oracle体系结构(五)
When Extents Are DeallocatedThe Oracle Database provides a Segment Advisor that helps you determine whether an object has space available for reclamation based on the level of space fragmentation wi
2013-07-10 11:00:12
647
翻译 oracle体系结构(四)
Overview of ExtentsAn extentis a logical unit of database storage space allocation made up of a number of contiguousdata blocks. One or more extents in turn make up a segment. When the existingspace
2013-07-08 12:52:00
607
翻译 oracle体系结构(三)
PCTFREE, PCTUSED, and Row ChainingFor manually managed tablespaces, two space management parameters, PCTFREE and PCTUSED, enable you to control the use of free space for inserts and updates to the
2013-07-05 15:44:38
617
原创 oracle之rman恢复redolog
一、环境搭建1、 删除(移走)redologfile[oracle@rac3orcl]$ lscontrol01.ctl control03.ctl redo02.log rhf.dbf system01.dbf undotbs01.dbfcontrol02.ctl redo01.log redo03.log sysaux01.dbf temp0
2013-07-05 14:40:01
2632
翻译 oracle体系结构(二)
FreeSpace Management 可用空间的管理Freespace can be managed automatically or manually.Freespace can be managed automatically inside database segments. The in-segmentfree/used space is tracked using bitm
2013-07-04 10:15:50
526
原创 oracle之rman恢复spfile练习
今天开始学习rman恢复技术,今天初入门,先学习spfile丢失后的恢复操作,分为两部分:1、环境搭建以及前提准备;2、恢复操作过程一、环境准备先对数据库进行全备份1、 连接数据库[oracle@rac3 ~]$ rman target / Recovery Manager: Release 10.2.0.1.0 - Production on Sun Jun 300
2013-07-03 17:15:17
829
翻译 oracle体系结构(一)
Introduction toData Bloc ks, Extents, and SegmentsOracleallocates logical database space for all data in a database. The units of database space allocation are data blocks, extents, and segments. Fi
2013-07-02 23:26:50
668
原创 一个关于oracle日志中一个小点的总结
下午巡检oracle数据库,在查看alert_xxx.log时发现一个没见过的东西,如下:LOGMINER:krvxpsr summary for session#=2147483905LOGMINER:startScn:0LOGMINER:EndScn:0LOGMINER:HighConsumedScn:0LOGMINER:session_flag 0x0 起初不
2013-06-20 17:36:52
966
oracle 10G常见进程
2013-05-16
虚拟机Linux 5.5 操作系统中安装oracle 10G
2013-03-21
RHLinux5.4磁盘空间不够挂载硬盘.doc
2012-12-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人