What is GridFS?

What is it ?

a way to store files in your database that doesn’s suck.
a way to ensure that metadata is always kept with a file.
a way to get all the scaliing benefits of mongodb for files.

How to install MongoDB 2.6 on linux

官网地址:http://www.mongodb.org; 1. Download the binary files for the desired release of MongoDB. wget http://124.202.164.12/files/113100000380F0C3/fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.0.tgz 2. Extract the files from the downloaded archive. tar zxvf mongodb-linux-x86_64-2.6.0.tgz 3.Add new user ,Copy the extracted archive to the target directory. useradd mongo mkdir -p /mongodb mkdir -p /data/db chown -R mongo.mongo /mongodb chown -R mongo.mongo /data/db cp -R -n … Read more

How to duplicate or multiplex control files on ASM ?(复制控制文件)

ON single-instance 1, make sure asm diskgroup is avaliable Select name,total_mb,free_mb from v$asm_diskgroup where state=’CONNECTED’; 2, check current controlfile and using spfile show parameter control_files show parameter pfile 3, add new controlfile to spfile alter system set control_files='[original file]’,'[asm diskgroup name where new control file will stored]’ scope=spfile ; for example: alter system set control_files=’+OLD/ANBOB/controlfile/current.258.798205861′,’+NEW_DATA’ … Read more

RedHat(RHEL)6 support ASMLIB (RHEL6支持asmlib)

With the annoucement of Oracle’s database support on RHEL6 and OEL6, they have decided to stop making ASMLIB for RHEL compatible kernels. ASMLIB is now only available if you are using Oracle Unbreakable Linux Kernel.But Recent events enabled Red Hat and Oracle to work togethe. Oracle ASMLib availability and support on Red Hat Enterprise Linux 6.

Script:List all SQL in the library cache cursor referencing a given table .(列出指定表上所有相关SQL)

PROMPT List all SQL in the library cache cursor referencing a given table — Author: weejar — — you need to run this script either as SYS or — need to have relevant X$ proxy views created — I tested in oracle 11g it worked . undefine owner undefine table_name prompt accept owner prompt ‘Please … Read more

MySql 5.5 tar安装及sysbench 配置

Next, let’s create the mysql user and group: groupadd mysql useradd -g mysql mysql create mysql soft and data files store dictroy. and install mysql mkdir -p /data/mysql tar zxvf mysql-5.5.36-linux2.6-x86_64.tar.gz mv mysql-5.5.36-linux2.6-x86_64 /data/mysql/ cd /usr/local ln -s /data/mysql/mysql-5.5.36-linux2.6-x86_64/ mysql scripts/mysql_install_db –user=mysql or (./mysql_install_db –user=mysql –basedir=/usr/local/mysql –datadir=/usr/local/mysql/data) Modify File and Directory Permissions cd /data/mysql/ chown … Read more

Recovery Loss Of Datafile For Which No Backup Is Available(恢复没有备份的数据文件)

来模拟一种刚建的表空间,还没来的及备份,数据文件被删除,但archive log 都在时的恢复。 sys@ANBOB>create tablespace tbs_rm datafile ‘/oradata/anbob/tbs_rm01.dbf’ size 10m; Tablespace created. sys@ANBOB>conn anbob Enter password: Connected. anbob@ANBOB>create table test_rm tablespace tbs_rm as select rownum id from dual connect by levelselect * from test_rm; ID ——————– 1 … 9 10 破坏数据文件,使用mv [oracle@db231 ~]$ mv /oradata/anbob/tbs_rm01.dbf /oradata/anbob/tbs_rm01_dbf sys@ANBOB>alter system flush buffer_cache; System altered. anbob@ANBOB>select * from … Read more