随笔分类 -  Oracle

摘要:OS ENV:主机名: WIN-NO42QRNPMFAOS 名称: Microsoft Windows Server 2008 R2 Datacenter OS 版本: 6.1.7600 暂缺 Build 7600OS 制造商: Microsoft CorporationOS 配置: 独立服务器OS 构件类型:... 阅读全文
posted @ 2015-11-11 15:32 全威儒 阅读(1006) 评论(0) 推荐(0)
摘要:Oracle加绕功能可以将PL/SQL代码实现部分隐藏,如存储过程、函数、包体等均可使用加绕功能,下面以一个存储过程实现部分加绕来展示Oracle加绕功能的使用。 加绕方法一: 1、编写如下存储过程后,保存为C:\wraptest.sql文件 CREATE PROCEDURE wraptest IS TYPE emp_tab IS TABLE OF OPER_OPERATOR%ROWTYP... 阅读全文
posted @ 2015-11-11 09:37 全威儒 阅读(1437) 评论(0) 推荐(0)
摘要:DROP PUBLIC DATABASE LINK ORA11G_DBLINK; CREATE PUBLIC DATABASE LINK ORA11G_DBLINKCONNECT TO SYSTEM IDENTIFIED BY ORACLEUSING '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = 192.16... 阅读全文
posted @ 2015-11-04 22:51 全威儒 阅读(313) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-11-02 14:38 全威儒 阅读(473) 评论(0) 推荐(0)
摘要:执行如下SQL将test_temp表中的数据恢复到 2013-04-26 21:06:00 注意,这里一定要先删除全部数据,否则可能会导致数据重复 delete from test_temp; insert into test_temp select * from test_temp as of timestamp to_timestamp('2013-04-26 21:06:00', 'yyy... 阅读全文
posted @ 2015-11-02 07:57 全威儒 阅读(4175) 评论(0) 推荐(0)
摘要:[oracle@redhat4 config]$ cd $ORACLE_HOME/redhat4.7_orcl/sysman/config [oracle@redhat4 config]$ pwd/u01/app/oracle/product/11.2.0/dbhome_1/redhat4.7_orcl/sysman/config[oracle@redhat4 config]$ vi emd.pr... 阅读全文
posted @ 2015-11-01 22:45 全威儒 阅读(1910) 评论(0) 推荐(0)
摘要:[oracle@redhat4 ~]$ sqlplus / as sysdba@orcl SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 6 21:14:51 2015 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to:Oracle Database 11g... 阅读全文
posted @ 2015-11-01 22:02 全威儒 阅读(493) 评论(0) 推荐(0)
摘要:[oracle@redhat4 ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-OCT-2015 21:10:05 Copyright (c) 1991, 2009, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRES... 阅读全文
posted @ 2015-11-01 21:51 全威儒 阅读(2275) 评论(0) 推荐(0)
摘要:OEM一旦建立以后,LINUX的主机名(hosts)就不要去改变。 [oracle@redhat4 ~]$ emctl start dbconsoleOC4J Configuration issue. /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_redhat4.7_ORCL not found.[oracle... 阅读全文
posted @ 2015-11-01 21:44 全威儒 阅读(304) 评论(0) 推荐(0)
摘要:Oracle11g的新工具SQL DEVELOPER,替代了 isqlplus 1、创建连接方式 2、SQL输入窗口 3、表的结构及其他信息查阅 4、SQL语句测试 5、创建表 6、用户授权 7、数据导入导出 另,附 oracle10g的isqlplus,http://localhost:5560/isqlplus 阅读全文
posted @ 2015-11-01 21:15 全威儒 阅读(396) 评论(0) 推荐(0)
摘要:监听器启动,并不一定会认识数据库实例,启动监听器,请判别相关实例是否 READY [oracle@redhat4 ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-OCT-2015 19:41:12 Copyright (c) 1991, 2009, Oracle. All rights r... 阅读全文
posted @ 2015-11-01 20:29 全威儒 阅读(1804) 评论(0) 推荐(0)
摘要:[oracle@redhat4 admin]$ cd $ORACLE_HOME/network/admin[oracle@redhat4 admin]$ cat tnsnames.ora# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.o... 阅读全文
posted @ 2015-11-01 20:07 全威儒 阅读(674) 评论(0) 推荐(0)
摘要:[root@redhat4 install]# pwd/u01/app/oracle/product/11.2.0/dbhome_1/install[root@redhat4 install]# more portlist.iniEnterprise Manager Console HTTP Port (orcl) = 1158Enterprise Manager Agent Port (orcl... 阅读全文
posted @ 2015-11-01 19:38 全威儒 阅读(751) 评论(0) 推荐(0)
摘要:#Creata database command: dbca [root@redhat4 ~]# su - oracle[oracle@redhat4 ~]$ dbca # create listener command: netca [oracle@redhat4 ~]$ lsn... 阅读全文
posted @ 2015-11-01 19:06 全威儒 阅读(489) 评论(0) 推荐(0)
摘要:[oracle@redhat4 ~]$ vi .bash_profile # .bash_profile # Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi # User specific environment and startup programs PATH=$PATH:$HOME/bin... 阅读全文
posted @ 2015-11-01 17:28 全威儒 阅读(2090) 评论(0) 推荐(0)
摘要:Setup Oracle 11gR2 for Redhat Linux AS 4 Update 7 x64 1. checking linux version. [root@localhost ~]# uname -aLinux redhat4.7 2.6.9-78.EL #1 Wed Jul 9 15:26:38 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux... 阅读全文
posted @ 2015-11-01 17:18 全威儒 阅读(683) 评论(0) 推荐(0)
摘要:Enterprise Manager Database Control URL - (orcl) :https://redhat4.7:1158/em [root@redhat4 install]# pwd/u01/app/oracle/product/11.2.0/dbhome_1/install[root@redhat4 install]# more portlist.iniEnterpris... 阅读全文
posted @ 2015-11-01 17:18 全威儒 阅读(819) 评论(0) 推荐(0)
摘要:FROM: http://soft.doit.com.cn/article/2012/0105/2850851.shtml --加法 --加1年 SELECT SYSDATE,ADD_MONTHS(SYSDATE,12) FROM DUAL; --加1月 SELECT SYSDATE,ADD_MONTHS(SYSDATE,1) FROM DUAL; --加1星期 SELE... 阅读全文
posted @ 2015-10-11 19:41 全威儒 阅读(464) 评论(0) 推荐(0)
摘要:修改当前会话的语言环境变量参数:ALTER SESSION SET =将语言改为英语: SQL> ALTER SESSION SET NLS_LANGUAGE='AMERICAN';SESSION ALTERED. 将语言改回中文:SQL> ALTER SESSION SET NLS_LANGUAGE='SIMPLIFIED CHINESE';会话已更改。 将地域改为英文:SQL> ALTER S... 阅读全文
posted @ 2015-07-24 12:09 全威儒 阅读(10681) 评论(0) 推荐(0)
摘要:对于Oracle的两表联合更新的场景(有A、B两表,以A.id=B.id关联,根据B表中的记录更新A表中的相应字段),一般有update内联视图和merge两种方式,下面举例介绍: 创建用例表: create table test1(id number(10),name varchar2(20)); create table test2(id number(10),name varch... 阅读全文
posted @ 2014-11-30 21:13 全威儒 阅读(4093) 评论(0) 推荐(0)