ITeye博客

Oracle

共 81 篇文章

About Dedicated and Shared Server Processes

一句话, shared server 就是为了省 SGA. About Dedicated and Shared Server Processes Oracle Database creates server processes to handle the requests of user processes connected to an instance. A server process can be either of the following: A dedicated server process , which services only one user process A …

2010-11-29 15:46 · Oracle · .net · UP · Oracle

oracle11GR2上建立一个新用户的过程,同时更改字符集.

写道 SQL> create user mygmccrm identified by abc123; User created. SQL> grant create session to mygmccrm; Grant succeeded. SQL> grant create table to mygmccrm; Grant succeeded. SQL> grant unlimited tablespace to mygmccrm; Grant succeeded. SQL> grant connect to mygmccrm with admin option; Grant succee…

2010-11-15 16:21 · Oracle · SQL · Oracle

comment on table and column

comment [Oracle SQL] comment on table some_table is 'some hopefully meaningful comment for some_table'; comment on table some_view is 'Views can also be commented, yet the statement is still: comment on table'; comment on column some_table.col_1 is 'Be sure to really give some meaningful comment'; …

2009-11-20 16:16 · Oracle · SQL · Oracle

解决ASM无法启动问题

启动报错如下所示 rac2-> sqlplus /as sysdba" SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 11 20:32:57 2014 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORA-01078: failure in processing system parameters ORA-01565: error in identifying file '+DG1/…

2009-11-07 15:11 · Oracle · C · C++ · SQL · Oracle · SUN

在Oracle中实现可扩展的多级编目结构

2009-10-16 作者:zhangyuk 来源:章鱼的blog 一、可扩展多级编目的定义 可扩展多级编目有下述特点: 编目分级,上下级编目形成父子关系; 任意节点可以有零到多个子节点,任意子节点有且只有一个父节点; 节点深度在理论上可以无限扩充; 由上述特点可知,可扩展多级编目实际上是树。 二、可扩展多级编目的例子 Windows操作系统中的文件路径是一个典型的多级编目结构。多级编目结构的例子还有很多:人的家谱、文献索引、制造业的BOM、财务的科目编码、公司组织结构等。 三、可扩展多级编目在Oracle中的设计 概念设计: 物理设计: 多级编目表的设计思路跟“树”的设计思路一样。ID是行…

2009-10-23 13:49 · Oracle · 制造 · Windows · Blog · 数据结构 · Oracle

用户帐号解锁

SQL> alter user scott account unlock identified by 123456; alter user scott account unlock identified by 123456 * ERROR at line 1: ORA-00988: missing or invalid password(s) SQL> alter user scott account unlock identified by "123456"; User altered. SQL> conn scott/123456 Connected. SQL> select table…

2009-10-21 08:06 · Oracle · SQL

按上下键调出 sqlplus 中的历史命令

在sqlplus中不能按上下键不能显示出之前的命令, 也许是出于安全考虑吧(可以调出之前输入的密码) , oracle 在11g的sqlplus中都没有这个功能, 很多oracle人都是save到文件中用vi 或notepad 改完再执行的,还是有些不方便. 用rlwrap 这个工具吧. 1. 安装 apt-get install rlwrap 2. 使用 rlwrap sqlplus /nolog 3. 为方便以后使用: 在.bashrc 中加入 alias sqlp="rlwrap sqlplus"

2009-10-21 07:50 · Oracle · Oracle

简单的oracle物化视图

物化视图是一种特殊的物理表,“物化”(Materialized)视图是相对普通视图而言的。普通视图是虚拟表,应用的局限性大,任何对视图的查询, Oracle 都实际上转换为视图SQL语句的查询。这样对整体查询性能的提高,并没有实质上的好处。 1、物化视图的类型:ON DEMAND、ON COMMIT 二者的区别在于刷新方法的不同,ON DEMAND顾名思义,仅在该物化视图“需要”被刷新了,才进行刷新(REFRESH),即更新物化视图,以保证和基表数据的一致性;而ON COMMIT是说,一旦基表有了COMMIT,即事务提交,则立刻刷新,立刻更新物化视图,使得数据和基表一致。 2、ON DEMA…

2009-09-28 22:29 · Oracle · SQL · Oracle

PL/SQL 总结(4)

存储过程 create or replace PROCEDURE p_name (argument [model] datatype, argument2 [model] datatype) IS ----------变量定义,不需要DECLARE BEGIN --body END; / 函数:跟存储过程不同的是他可以返回值 create or replace FUNCTION f_name (atgument1 [model] datatype, argument2 [model[ datatype) return datatype IS ---declare BEGIN --body E…

2009-09-19 17:40 · Oracle · Blog · SQL · .net · F#

PL/SQL 总结(3)

使用游标 1)显示游标: CURSOR name_cursor IS select statement; 2)打开游标: OPEN name_cursor; 3)提取游标 FETCH name_cursor INTO variable1,variable2............. 4)关闭游标 CLOSE name_cursor; 显示游标的属性: %ISOPEN:显示游标是否打开 %FOUND:是否从结果集中取到数据 %NOTFOUND:是否未从结果集中取到数据 %ROWCOUNT:已经取到的数据,不是说集合中间有多少数据,请这里注意; DECLARE CURSOR a_cursor I…

2009-09-19 17:40 · Oracle · Blog · SQL · .net

PL/SQL 总结(2)

)将select 嵌入到PL/SQL中 定义了变量以后,可以使用 SELECT column1 INTO variable1 FROM table_name WHERE column1=xx --返回唯一的一行记录的一个字段 如果是要讲返回的结果赋给一个记录表/表变量的话:如下 SELECT * BULK COLLECT INTO xx_table FROM table_name where ..... --返回多行记录 2)嵌入INSERt INTO语句 这个相对来说很简单,就是用variable来代替以前的value值 3)嵌入UPDATE语句 跟上面同理 4)DELETE语句 使用控制…

2009-09-19 17:39 · Oracle · Blog · SQL · .net

PL/SQL 总结(1)

我们开始学习PL/SQL PL/SQl的好处在于降低了网络开销,别的数据库执行四条sql语言的话,在网络上要发送四次语句, 而oracle可以把多条sql语句写到一段PL/SQl快中,从而降低了网络开销,以高了网络程序的性能; PL/SQl语句的基本结构如下: DECLARE /* *定义了变量常量定义的部分 */ BEGIN /* *执行主题 */ EXCEPTION /* *异常处理部分 */ END / 定义变量: 变量定义除了前几张所涉及到的几个以外,还有 BOOLEAN BINARY_INTEGER BINARY_FLOAT BINARY_DOUBLE 定义变量的格式 identi…

2009-09-19 17:38 · Oracle · C · C++ · 数据结构 · SQL · Oracle

Oracle 中的 Merge 语句

Merge Statement Demo MERGE <hint> INTO <table_name> USING <table_view_or_query> ON (<condition>) WHEN MATCHED THEN <update_clause> DELETE <where_clause> WHEN NOT MATCHED THEN <insert_clause> [LOG ERRORS <log_errors_clause> <reject limit <integer | unlimited>]; CREATE TABLE employee ( employee_id NU…

2008-07-29 15:45 · Oracle · Oracle

SQL*Plus FAQ

SQL*Plus FAQ From Oracle FAQ Jump to: navigation , search SQL*Plus FAQ: Contents [ hide ] 1 What is SQL*Plus and where does it come from? 2 How does one use the SQL*Plus utility? 3 What commands can be executed from SQL*Plus? 4 What are the basic SQL*Plus commands? 5 What is AFIEDT.BUF? 6 I'm unabl…

2008-07-24 10:04 · Oracle · SQL Server · SQL · Oracle · Linux · Dreamweaver

Oracle Default Listener

042 第23题 关于动态注册监听器 23.Your database is started with SPFILE. You want the database instance to be dynamically registered with a listener L2 with the following details: Protocol: TCP Host: indl151e Port: 1525 Which is the correct order of the steps that you would follow to achieve this? 1. Set the LO…

2008-07-15 15:41 · Oracle · Exchange · DB2 · Oracle · IE

自动安装 Oracle 数据库 10g 和 Red Hat Enterprise Linux

自动安装 Oracle 数据库 10 g 和 Red Hat Enterprise Linux 作者:Casimir Saternos 介绍通过脚本和配置文件从头开始构建 Linux 服务器所涉及的工具和过程。 本文相关下载: Oracle 数据库 10 g 30 天免费评估 RHEL4 的订阅 在系统管理中广泛采用的最佳实践之一是尽可能实现常规任务的自动化。Oracle 数据库 10 g 包含很多增强和新特性,它们使常规的部署和配置操作自动化。例如: Oracle Enterprise Manager 不再需要手动操作,这是因为相关子系统现在是自动配置的。 可以方便地安排常规管理任务(如统…

2008-07-13 09:52 · Oracle · 应用服务器 · 配置管理 · Oracle · 脚本 · Linux

在 Linux x86 上安装 Oracle 数据库 10g

DBA:Linux 在 Linux x86 上安装 Oracle 数据库 10 g 作者:John Smiley 学习在 RHEL 2.1、RHEL 3 或 SLES 8 上从头安装 Oracle 数据库 10 g 的基础知识(仅用于评估) 目录 概述 第 1 部分:安装 Linux RHEL 2.1 RHEL 3 SLES 8 第 2 部分:针对 Oracle 配置 Linux 验证系统要求 创建目录 创建 Oracle 组和用户帐户 配置 Linux 内核参数 为 Oracle 用户设置 Shell 限制 避免错误!(仅限 SLES 8) Oracle 用户的环境变量 第 3 部分:安装…

2008-07-13 09:46 · Oracle · 应用服务器 · 数据结构 · 配置管理 · Oracle · Linux

Vmware server1.0 + Linux As4 + Oracle 10g RAC

Vmware server1.0 + Linux As4 + Oracle 10g RAC http://www.chinaunix.net 作者: 秋风No.1 发表于:2007-11-09 09:45:46 【 发表评论 】 【 查看原文 】 【 Linux讨论区 】【 关闭 】 ORACLE 10G RAC for Linux AS4 安装 作者:秋风no.1,学习测试所用,欢迎转载。 由于本人的硬件条件所限,所以采用的是虚拟机技术,虚拟机软件采用的是vmware server 1.0 宿主机,dell 2850,配置如下 _______________________________…

2008-07-05 15:19 · Oracle · Vmware · 配置管理 · SSH · Oracle · Linux

How To Set Up Oracle ASM on Ubuntu Gutsy Gibbon

How To Set Up Oracle ASM on Ubuntu Gutsy Gibbon By Grégory Guillou — February 7th, 2008 at 1:06 pm Posted in Group Blog Posts • Oracle Tags: ASM • Gutsy Gibbon • Linux • Oracle • Oracle 11g • raw devices • Ubuntu • Ubuntu 7.10 I’ve recently moved to Ubuntu Linux , and this post describes my attempt…

2008-07-05 08:51 · Oracle · CSS · Ubuntu · UP · Oracle · Linux

Installing Oracle10g R2 RAC on vmware suse

Installing Oracle10g R2 RAC Part1 - Prerequisites - Installing/Preparing Guest machine (SuSE10.1) Prerequisites This example shows how to install Oracle10g R2 RAC with raw devices (block devices), without using ocfs2 or asmlib, so no other modules need to be downloaded or installed before installin…

2008-07-04 10:47 · Oracle · SuSE · Vmware · SSH · Oracle · Linux