Timesten cache database的准备
Timesten cache database的准备[@more@]1.建立 Cache Table User [timesten@rhel132 ~]$ ttisqlCommand> connect ljg_tt1122;Connection successful: DSN=ljg_tt1122;UID=timesten;DataStore=/home/timesten/TimesTen/tt1122/info/ljg;DatabaseCharacterSet=WE8MSWIN1252;ConnectionCharacterSet=US7ASCII;DRIVER=/home/timesten/TimesTen/tt1122/lib/libtten.so;LogDir=/home/timesten/TimesTen/tt1122/info/ljg/logs;PermSize=64;TempSize=32;TypeMode=0;OracleNetServiceName=orcl131;(Default setting AutoCommit=1)Command>Com
Timesten 数据库端需要的配置
Timesten 数据库端需要的配置[@more@][oracle@qht131 ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 23 16:08Copyright (c) 1982, 2009, Oracle. All rights reserved.1.建立ttusers表空间Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 -With the Partitioning, OLAP, Data Mining and Real ApplicatiSQL> create tablespace ttusers datafile 'ttusers.dbf' sizeTablespace created.2.建立 TIMESTEN schemaSQL> @ initCacheGlobalSchema.sqlPlease enter the tablespac
Timesten11g建立datastore
Timesten11g建立datastore[@more@]在完成上面的安装任务之后,因为我们需要TT存放我们应用的数据,我们就要配置自己的data store了(理解为oracle里面的schema)。在做这个任务之前,需要厘清一个概念,DSN=data source name ,这个是标准的ODBC的用语,用来描述一个可以提供odbc连接的数据库服务器,在timesten里面,所有的连接都是通过odbc的,就算是jdbc也是通过odbc连接到到TT上的。在TT里面,有两种DSN1.系统一级的DSN定义在服务器端,定义该data store的文件存放位置,以及其他的一些控制参数,比如是否需要log,是否打开checkpoint等等
Timesten11G安装
Timesten11G安装[@more@]1.修改内核参数,由于之前已安装过11gR2 client端,此部忽略修改/etc/sysctl.conf文件,加上如下列kernel.shmmax = 2147483648kernel.sem = 270 32000 100 128net.ipv4.tcp_rmem = 4096 4194304 4194304net.ipv4.tcp_wmem = 98304 4194304 4194304net.ipv4.tcp_mem = 98304 4194304 4194304net.core.rmem_default = 65535net.core.wmem_default = 65535net.core.rmem_max = 4194304net.core.wmem_max = 4194304net.ipv4.tcp_window_scaling = 1net.ipv4.ip_local_port_range = 1024 65000然后执行 sysctl -p ,使修
Linux 4安装11R2 Client
Linux 4安装11R2 Client[@more@]1.修改内核参数修改/etc/sysctl.conf文件,加上如下列kernel.shmmax = 2147483648kernel.sem = 270 32000 100 128fs.file-max=6915744net.ipv4.tcp_rmem = 4096 4194304 4194304net.ipv4.tcp_wmem = 98304 4194304 4194304net.ipv4.tcp_mem = 98304 4194304 4194304net.core.rmem_default = 262144net.core.wmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_max = 4194304net.ipv4.tcp_window_scaling = 1net.ipv4.ip_local_port_range = 9000 65500[root@rhel132 ~]# sysctl -p2.增加用户和
How to restore raid after reinstall Linux
Linux version: Red Hat 4 U5 Disk info: hda with 3 partitions, hdb with 3 partitions, hdc with 1 partition[@more@] v:* {behavior:url(#default#VML);} o:* {behavior:url(#default#VML);} w:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-
solaris下使用lsof恢复删除的文件
作者 ora110 http://www.itpub.net/viewthread.php?tid=1044449 http://www.eygle.com/archives/2004/10/recover_backup_missing_datafile.htmlhttp://hi.baidu.com/dba_dream/blog/item/0ddc3013eb60be56f919b84b.html [@more@]使用lsof删除恢复的文件 模拟lsof恢复删除的文件(tools.dbf): Solaris 9 + lsof 4.77 + oracle 8.1.7 1. 数据文件由dbwr进程打开。 bash-2.05# ps -ef | grep ora_ | grep 817 oracle 817 1 0 15:56:30 ? 0:00 ora_pmon_test817 oracle 819 1 0 15:56:30 ? 0:00 ora_dbw0_test817 ora
恢复被rm意外删除数据文件
http://www.xifenfei.com/2289.html[@more@]一.模拟数据文件删除 [oracle@node1 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sat Dec 31 22:00:52 2011 Copyright (c) 1982, 2011, Oracle. All rights reserved. --数据库版本Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, Oracle Label Security, OLAP, Data Mining,Oracle Database Vault and Real Application Testing options --所有数据文件SQL> select name from v$datafile; N
[Linux] 软 RAID (mdadm) 一些不了解的地方的测试
载本站文章请注明,转载自:扶凯[http://www.php-oa.com] 本文链接: http://www.php-oa.com/2009/07/31/linux-raid-mdadm.html 使用soft raid很久了,一直以来,有几个地方不是很了解,也没有书上讲到,所以特地做了一些测试[@more@]载本站文章请注明,转载自:扶凯[http://www.php-oa.com] 本文链接: http://www.php-oa.com/2009/07/31/linux-raid-mdadm.html 使用soft raid很久了,一直以来,有几个地方不是很了解,也没有书上讲到,所以特地做了一些测试 1. Soft Raid 是否一定需要 mdadm.conf 的配置文件才能启动(也就是重启后怎么自动启动Rai
Using dbms_monitor
Oracle 10g中提供了一个新的包进行SQL Trace: DBMS_MONITOR。它提供了多种级别的trace[@more@]SQL> select sid,serial# ,username from v$session; SID SERIAL# USERNAME---------- ---------- ------------------------------ 140 57 145 1 147 1 150 1 153 34 SYS 155 1 156 1 159 5 TEST 160 1 161 1 162 1 SID SERIAL# USERNAME---------- ---------- ------------
Hugemem Kernel Explained
Feature: High Memory In The Linux Kernelhttp://kerneltrap.org/node/2450pczou 对 RedFlag DC Server 所带的 Hugemem 核心的作用,做了一个详细的解释,转贴这里。Hugemem Kernel Explained红旗DC系列Linux操作系统(x86平台)中带有四类核心:* UP (支持单内核)* SMP (支持多内核)* hugemem* Icc* (用intel C编译器编译的核心) [@more@]其中hugemem核心往往引起很多困惑,这里希望能一劳永逸地把hugemem解释清楚。Hugemem vs. SMPx86平台下, 红旗DC4.1和5.0所带的smp和hugemem核心都打开了PAE支持,也就是说都可以支持4G以上的物理内存
数据库异常崩溃的元凶--OOM killer
数据库版本是10.2.0.4 ,操作系统是linux as 4u4最近一个星期出现两次了,一台数据库异常中断,错误如下:Fri Mar 19 12:15:09 2010Errors in file /u01/app/oracle/admin/orcl/bdump/orcl_pmon_13421.trc:ORA-00470: LGWR process terminated with errorFri Mar 19 12:15:09 2010PMON: terminating instance due to error 470[@more@]trc文件如下:/u01/app/oracle/admin/orcl/bdump/orcl_pmon_13421.trcOracle Database 10g Enterprise Edition Release 10.2.0.4.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Appli
screen的用法
使用ssh远程连接 linux服务器工作的时候,比如需要编译某些程序而这时网络不稳定断线, 工作就白干了, 又的重新连接重复刚才的工作,这时候screen就可以派上用场了。比较全面的文档说明:http://www.ibm.com/developerworks/cn/linux/l-cn-screen/[@more@]Screen 提供了两个主要功能:• 在一个终端内运行多个终端会话(terminal session)。• 一个已启动的程序与运行它的真实终端分离的,因此可运行于后台。真实的终端可以被关闭,还可以在稍后再重新接上(reattached)。简短实例开启 screen:# screen在screen 会话中,我们可以
oracle 10G R2 RAC 数据库的关闭与启动(ZT)
oracle 10G R2 RAC 数据库的关闭与启动[@more@]一、关闭数据库 以oracle用户登录,在其中一个节点上(通常是第1个节点),运行命令,先关闭数据库或者关闭单个实例: srvctl status database -d bfdb <<< 最好每次做stop动作前都有一个status命令的检查 A、 srvctl stop database -d bfdb-o immediate<<<关闭整个数据库,记住最好用-o immediate参数,它等同于shutdown immediate,若不带该参数,则等同于shutdown normal,区别很大的,一般做完这部操作后即可进入关闭CRS操作了。 B、 srvctl stop i
不错的关于Oracle 全文索引的文章(zt)
Oracle从7.3开始支持全文检索,即用户可以使用Oracle服务器的上下文(ConText)选项完成基于文本的查询。具体可以采用通配符查找、模糊匹配、相关分类、近似查找、条件加权和词意扩充等方法。在Oracle8.0.x中称为ConText ;在Oracle8i中称为interMedia Text ; Oracle9i中称为Oracle Text。http://blog.csdn.net/fengzhu1008/archive/2009/01/15/3784853.aspx[@more@]Oracle 全文索引前言:Oracle从7.3开始支持全文检索,即用户可以使用Oracle服务器的上下文(ConText)选项完成基于文本的查询。具体可以采用通配符查找、模糊匹配、相关分
How to set up Software raid1 configuration on a running system
This guide explains how to set up software RAID1 on an already running RHEL 4 system. The GRUB bootloader will be configured in such a way that the system will still be able to boot if one of the hard drives fails (no matter which one).[@more@]Introduce my environment:In my test environment I'm using a RHEL 4 U 5 system with two hard drives, /dev/sda and /dev/sdb which are identical in size. /dev/sdb is currently unused, and /dev/sda has the following partitions:/dev/sda1: /boot partition, ex
bad block表上坏块的处理
今天一台数据库出现块块,日志文件如下:04:38:44 2009Corrupt Block Found TSN = 8, TSNAME = DEALSPACE RFN = 4, BLK = 39387, RDBA = 16816603 OBJN = 82751, OBJD = 82751, OBJECT = P_100_111049_PDETAIL, SUBOBJECT = SEGMENT OWNER = RAD_MBK, SEGMENT TYPE = Table Segment由于没有备份通过eygle的方法恢复了大部分的数据,记录一下eygle的方法http://www.itpub.net/viewthread.php?tid=201766&extra=&page=1大概的步骤如下:ALTER SYSTEM SET EVENTS='10231 trace name context forever
用dbms_streams_tablespace_adm表空间的迁移(4)
上一篇文章中已经介绍了通过CLONE_TABLESPACES过程表空间,这一篇继续描述如何通过ATTACH_TABLESPACES过程,将表空间加载到目标数据库中。[@more@]首先需要将源库的datafile和元文件通过scp都copy过来。[oracle@rhel131 transfer]$ pwd/u01/transfer[oracle@rhel131 transfer]$ lsNADSPACE001.dbf NADSPACE003.dbf NADSPACE_091027.dpNADSPACE002.dbf NADSPACE004.dbf NADSPACE_091027.log建立这个目录的directorySQL> create directory D_TRANS_3 as '/u01/transfer';Directory created.SQL> grant read,write on directory D_
用dbms_streams_tablespace_adm表空间的迁移(3)
这次迁移的表空间由于保存在异地,因此无法通过PULL过程来实现,比如分成CLONE和ATTACH两个阶段。且由于当前的表空间包含多个数据文件,因此不能使用SIMPLE方法,只能通过CLONE_TABLESPACES或DETACH_TABLESPACES过程来实现。又因为源数据库表空间不打算删除,因此使用CLONE_TABLESPACES过程来实现迁移。[@more@]数据库版本、数据块大小、以及字符集和自包含的检查都跳过源数据库:需先建立存放dump file的目录SQL> CREATE OR REPLACE DIRECTORY D_TRANS AS '/u01/trans';Directory created.SQL> grant read,write on directory D_TR
用dbms_streams_tablespace_adm来表空间的迁移(2)
由于PULL_SIMPLE_TABLESPACE只能迁移一个数据文件的表空间,多于一个数据文件的表空间需要用PULL_TABLESPACES来完成。 其中PULL过程实际上包含了CLONE以及ATTACH两个过程,其中还包括了DBMS_FILE_TRANSFER包的调用,使得在目标数据库执行一个命令就完成表空间迁移的所有的操作。[@more@] PULL_TABLESPACES过程完成以下动作 1. Makes any read/write tablespace in the specified tablespace set at the remote database read-only 2. Uses Data Pump to export the metadata for the tablespaces in the tablespace set 3. Uses a