Tip: 看不到本站引用 Flickr 的图片? 下载 Firefox Access Flickr 插件 | AD: 订阅 DBA notes -- ![]()
2010-06-01 Tue
2: Evaluation of Search User Interfaces: includes informal studies, formal studies, longitudinal studies and log-based analysis including bucket testing. Presents extensive device about how to avoid evaluation mistakes.
3: Models of the Information Seeking Process: summarizes the theoretical models about information seeking, and discusses information needs and query intent.
4: Query Specification: includes textual queries, natural language questions, query specification forms, dynamic feedback, and operators and commands.
...
This should have been the easiest task on my todo list: Install Oracle 10.2.0.3 EE standalone on a new Linux RHEL 5 server, later to be used as a standby for a production RAC system. This means 2 lines of “runinstall -silent …”, less than 5 minutes of DBA work and maybe 20 minutes of waiting. I did not expect to spend over 5 hours doing this.
Problems started when I discovered that I don’t have the 10.2.0.3 patchset and another patch that exists on production and should be installed on the standby. I had to wait for my Metalink credentials to be approved for this customer CSI before I could download the patches for them.
“Why don’t you just clone the software from production?” asked a helpful colleague.
Sounds like a great suggestion. I cloned Oracle software before and it is a simple process: tar $ORACLE_HOME, copy the tar file to the new server, untar, run the cloning script which will register the new home with the inventory, and you are done!
In theory, at least.
Here is what actually happened:
- Tar, copy, untar, script
- Ran OPatch to verify that the new oracle home is in the inventory and that I see the correct version and patches.
- OPatch is showing two nodes. Oops. I didn’t realize oracle home has information about the cluster – didn’t Oracle move the inventory elsewhere? Spend an hour looking for the cause of this.
- Found that the two nodes are mentioned in $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml
- Removed this file.
- Deattached Oracle Home to clean inventory without deleting the software.
- Ran the clone script again
- Yay! OPatch looks good now.
- Decided to create test database to be extra sure everything is fine
- NETCA failed with linking error. Spent an hour figuring out why. Cursed a bit.
- Had to install libc-devel, 32 bit version. Too bad RDA didn’t catch this.
- Created test database, but SQLPLUS now fails with linking error. More cursing. Wondered what I did to deserve this.
- libaio.so.1 was missing so I had to install the 64 bit version of libaio. Too bad RDA was silent about this as well.
- Couldn’t start the database because the database couldn’t find the cluster. Why was it even looking for a cluster? Spent an hour figuring out why. Ah, because I copied the software from a RAC server and it was linked as RAC database.
- Relinked everything with RAC_OFF option.
- Finally things are working. Too bad it is 8pm already.
What I should have done: (I’m not sure if it is supported by Oracle, but at least it works)
- Double check that we have all RPMs.
- Tar, copy, untar
- remove $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml
- run clone.pl: clone/bin/clone.pl ORACLE_HOME=/appl/oracle/product/10.2.0/db_1 ORACLE_HOME_NAME=OraDb10g_home1
- Relink as non-RAC: make -f ins_rdbms.mk rac_off
- Verify with OPatch.
- Create test DB:
netca /silent /responsefile ~/netca.rsp
dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName TST -sid TST -SysPassword xxx -SystemPassword xxxx -emConfiguration NONE -datafileDestination /appl/oracle/oradata -storageType FS -characterSet WE8ISO8859P1 -nationalcharacterSet AL16UTF16 -memoryPercentage 40 - Go for a nice afternoon ride.
I hope that I’m not the only DBA who always have to find the most difficult way to accomplish a task, and that this post will be useful to others. Perhaps the best piece of advice I can offer is to avoid this type of cloning in the first place.
- Richard Boulton: ☞ Using Redis as a backend for Xapian. An interesting analysis of how a dedicated search engine would work with a Redis backend. Meanwhile others try to simply store the reverted index into Redis¶
- Paul Rosania: ☞ Point-and-Click install of MongoDB on OS X 10.5+. Not that it was difficult before, but nice to have! ¶
- Doug Judd: ☞ Why We Started Hypertable, Inc. … or welcome to the Hypertable Inc. blog. ¶
- Surya Surabarapu: ☞ Terrastore Scala Client. First Terrastore library in our NoSQL libraries list ¶
While most of Francisco Treacy’s (@frank06) “An Introduction to node.js and Riak” presentation is focusing on the advantages of event-based architectures, it also shows how to integrate node.js and Riak using ☞ riak-js, a node.js library for Riak that takes advantage of the friendly HTTP-based Riak protocol
There are a couple of other interesting things that can be learned from this slide deck. For example the cost of I/O:

simply described afterwards:
In other words, reaching RAM is like going from here to the Red Light District. Accessing the network is like going to the moon.
But as Frank mentions, there are some risks while working with cutting-edge technologies:
- Cutting-edge technologies are not bug-free
- Riak still has some rough edges (some in terms of performance)
- node.js is approaching its first stable version
- asynchronous JS code can get “boomerang-shaped”
不准备写一篇完整的Installation Guide,安装光盘中自带的pdf文档已经足够。本文只是总结一些在安装过程中碰到的问题或者说应该要注意的要点。
1. 如下命令的软件包需要配全,通常在安装完操作系统以后就应该已经都有了。
lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.libperfstat \ bos.perf.perfstat bos.perf.proctools rsct.basic.rte rsct.compat.clients.rte xlC.aix61.rte
2. 安装文档中提到的fix即使不存在也不影响安装。
# instfix -i -k "IZ41855 IZ51456 IZ52319"
There was no data for IZ41855 in the fix database.
All filesets for IZ51456 were found.
There was no data for IZ52319 in the fix database.3. 11gR2 RAC自带CTSS时间同步服务,因此安装文档中要求禁用NTP,但是在安装过程中最后检查的时候,仍然会报NTP服务无法使用,可以直接忽略。

4. 11gR2 RAC安装中对于用户和用户组的建议可以说比以前复杂很多,不再仅仅是oinstall和dba这两个用户组。为了方便我们仍然可以只创建oinstall和dba这两个用户组,但是建议按照安装文档中描述的那样创建grid和oracle这两个用户,用grid用户安装Grid Infrastructure,用oracle用户安装RAC。
5. 11gR2中OCR和Voting是可以放置在ASM磁盘组中,因此实际上在整个数据库环境中,应该会存在至少三个ASM Disk Group,也就是crsdg(用于GRID使用)、datadg(数据库数据文件)、fradg(闪回区)。这里需要特别注意,所有磁盘组都是用grid用户执行asmca来创建的(当然你可以用create diskgroup命令创建),而最后数据库实例是以oracle用户启动的,也就是oracle用户也必须有读写磁盘组中disk的权限。
假设我们的环境中有rhdisk2、rhdisk3、rhdisk4三个LUN分别对应crsdg、datadg和fradg,那么建议做如下的权限设置:
chown grid:oinstall /dev/rhdisk2 chown grid:oinstall /dev/rhdisk3 chown grid:oinstall /dev/rhdisk4 chmod 660 /dev/rhdisk3 chmod 660 /dev/rhdisk4 # ls -l /dev/rhdisk* crw------- 1 grid oinstall 23, 3 Jun 01 16:23 /dev/rhdisk2 crw-rw---- 1 grid oinstall 23, 4 Jun 01 16:13 /dev/rhdisk3 crw-rw---- 1 grid oinstall 23, 2 Jun 01 16:13 /dev/rhdisk4
6. 新增的SCAN VIP其实可有可无,特别对于不会频繁增删数据库节点的环境,个人觉得几乎无用。而且实际上,SCAN VIP和SCAN VIP LISTENER的切换操作十分缓慢,在我的测试中relocate scan的操作大概需要花费2分钟才能完成,不确认是不是我个人的配置问题。
SCAN VIP也同样是绑定在RAC环境中的某个节点上。如下SCAN VIP则是绑定在dbserver2中的public网卡上,可以看到public网卡上总共有3个IP,一个是实IP,一个是VIP,一个是SCAN VIP。
# crs_stat -t|grep scan ora....N1.lsnr ora....er.type ONLINE ONLINE dbserver2 ora.scan1.vip ora....ip.type ONLINE ONLINE dbserver2 # srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521 # srvctl config scan SCAN name: crs-scan.cnrmall.com, Network: 1/192.168.255.0/255.255.255.0/en0 SCAN VIP name: scan1, IP: /crs-scan.cnrmall.com/192.168.255.250 # netstat -in Name Mtu Network Address ZoneID Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 0.21.5e.48.e4.60 - 96331 0 47140 0 0 en0 1500 192.168.255 192.168.255.225 - 96331 0 47140 0 0 en0 1500 192.168.255 192.168.255.235 - 96331 0 47140 0 0 en0 1500 192.168.255 192.168.255.250 - 96331 0 47140 0 0 en1 1500 link#3 0.21.5e.48.e4.61 - 342409 0 293503 0 0 en1 1500 172.16 172.16.0.2 - 342409 0 293503 0 0 lo0 16896 link#1 - 103667 0 103678 0 0 lo0 16896 127 127.0.0.1 - 103667 0 103678 0 0 lo0 16896 ::1 0 103667 0 103678 0 0
7. SCAN VIP在Oracle安装文档的建议中是需要配置在DNS服务器中,实际上也可以使用/etc/hosts文件,并且除却SCAN VIP之外的public ip、vip、private ip也仍然都是可以跟以前一样,配置在/etc/hosts文件中。
8. 安装11gR2 RAC要求必须配置ssh用户对等性,以前配置rsh的方式现在已经无法通过安装检查。OUI中提供了自动配置ssh用户对等性的按钮,因此无需再事先手动配置。

需要注意的是:该功能完全针对Linux环境进行的开发,因此在AIX环境中,需要事先作如下操作:
ln -s /usr/bin/ksh /bin/bash mkdir -p /usr/local/bin ln -s /usr/bin/ssh-keygen /usr/local/bin/ssh-keygen
在配置对等性时,OUI会使用/bin/bash,而AIX默认是没有bash的,因此需要将ksh软链接到bash(当然你也可以安装bash包)。
同样,OUI会使用/usr/local/bin/ssh-keygen产生对等性密钥,而AIX中在安装了OpenSSH以后,ssh-keygen命令默认是存储在/usr/bin中,因此也需要做link。
9. 在成功安装完Grid Infrastructure之后,运行cluvf命令可能会报错。
# cluvfy comp nodeapp -verbose ERROR: CRS is not installed on any of the nodes Verification cannot proceed
并且,在碰到这样的错误之后,也无法安装RAC,会碰到如下错误:
[INS-35354] The system on which you are attempting to install Oracle RAC is not part of a valid cluster.
也就是无论是cluvf命令还是OUI,都认为这个机器上没有安装CRS,并不是在一个集群环境中。但是实际上运行crsctl check crs命令是完全正常的。
这个错误的解决方法可以参看Metalink Note [ID 798203.1],大体上来说就是在安装Grid Infrastructure的时候,inventory.xml文件中丢掉了CRS=”true”字样,这无疑是安装程序的bug。需要手工detachHome再attachHome。
10. 11gR2 RAC在CRS资源部分做了很多改动,创建完RAC数据库以后的默认资源比以前多了不少。
# crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora.CRSDG.dg ora....up.type ONLINE ONLINE dbserver1 ora.DATADG.dg ora....up.type ONLINE ONLINE dbserver1 ora.FRADG.dg ora....up.type ONLINE ONLINE dbserver1 ora....ER.lsnr ora....er.type ONLINE ONLINE dbserver1 ora....N1.lsnr ora....er.type ONLINE ONLINE dbserver2 ora.asm ora.asm.type ONLINE ONLINE dbserver1 ora.dbcnr.db ora....se.type ONLINE ONLINE dbserver2 ora....SM1.asm application ONLINE ONLINE dbserver1 ora....R1.lsnr application ONLINE ONLINE dbserver1 ora....er1.gsd application OFFLINE OFFLINE ora....er1.ons application ONLINE ONLINE dbserver1 ora....er1.vip ora....t1.type ONLINE ONLINE dbserver1 ora....SM2.asm application ONLINE ONLINE dbserver2 ora....R2.lsnr application ONLINE ONLINE dbserver2 ora....er2.gsd application OFFLINE OFFLINE ora....er2.ons application ONLINE ONLINE dbserver2 ora....er2.vip ora....t1.type ONLINE ONLINE dbserver2 ora.eons ora.eons.type ONLINE ONLINE dbserver1 ora.gsd ora.gsd.type OFFLINE OFFLINE ora....network ora....rk.type ONLINE ONLINE dbserver1 ora.oc4j ora.oc4j.type ONLINE ONLINE dbserver2 ora.ons ora.ons.type ONLINE ONLINE dbserver1 ora.scan1.vip ora....ip.type ONLINE ONLINE dbserver2
启动数据库实例以后,可以看到11gR2的后台进程已经增加到了43个,说实话,我很怀念简单的Oracle8i。
# ps -ef|grep ora_ | grep -v grep
oracle 364656 1 0 17:01:17 - 0:00 ora_mark_dbcnr1
oracle 540722 1 0 17:01:17 - 0:03 ora_mmnl_dbcnr1
oracle 561184 1 0 18:07:34 - 0:00 ora_q003_dbcnr1
oracle 643244 1 0 17:01:17 - 0:01 ora_mmon_dbcnr1
oracle 651360 1 0 17:01:16 - 0:00 ora_asmb_dbcnr1
oracle 655494 1 0 17:01:16 - 0:00 ora_rbal_dbcnr1
oracle 663680 1 1 17:01:13 - 0:06 ora_lmd0_dbcnr1
oracle 667794 1 0 17:01:12 - 0:00 ora_pmon_dbcnr1
oracle 671832 1 0 17:01:12 - 0:01 ora_diag_dbcnr1
oracle 675932 1 0 17:01:16 - 0:00 ora_smon_dbcnr1
oracle 679962 1 0 17:01:12 - 0:00 ora_gen0_dbcnr1
oracle 696414 1 0 17:01:16 - 0:00 ora_dbw0_dbcnr1
oracle 708790 1 0 17:02:33 - 0:00 ora_qmnc_dbcnr1
oracle 716930 1 0 17:01:17 - 0:04 ora_lck0_dbcnr1
oracle 721124 1 0 17:01:16 - 0:00 ora_mman_dbcnr1
oracle 725186 1 0 17:02:32 - 0:00 ora_gtx0_dbcnr1
oracle 729102 1 0 17:01:15 - 0:00 ora_lmhb_dbcnr1
oracle 737358 1 0 17:01:16 - 0:00 ora_reco_dbcnr1
oracle 745554 1 0 17:02:34 - 0:00 ora_q001_dbcnr1
oracle 749762 1 0 17:01:16 - 0:00 ora_lgwr_dbcnr1
oracle 753716 1 0 17:01:12 - 0:00 ora_ping_dbcnr1
oracle 766014 1 0 17:01:13 - 0:00 ora_psp0_dbcnr1
oracle 790688 1 0 17:01:13 - 0:00 ora_acms_dbcnr1
oracle 794780 1 0 17:01:12 - 0:02 ora_vktm_dbcnr1
oracle 815252 1 0 17:01:12 - 0:00 ora_dbrm_dbcnr1
oracle 819350 1 1 17:01:15 - 0:16 ora_lms1_dbcnr1
oracle 827642 1 0 17:02:36 - 0:01 ora_cjq0_dbcnr1
oracle 848054 1 0 17:02:30 - 0:00 ora_arc0_dbcnr1
oracle 856270 1 0 17:01:15 - 0:00 ora_rms0_dbcnr1
oracle 868590 1 0 17:25:42 - 0:00 ora_q002_dbcnr1
oracle 872622 1 0 17:01:15 - 0:16 ora_lms0_dbcnr1
oracle 901314 1 0 17:02:32 - 0:00 ora_arc3_dbcnr1
oracle 921600 1 0 18:07:17 - 0:00 ora_pz98_dbcnr1
oracle 925926 1 0 17:01:18 - 0:00 ora_rsmn_dbcnr1
oracle 929980 1 0 17:07:35 - 0:00 ora_smco_dbcnr1
oracle 942286 1 0 18:07:17 - 0:00 ora_pz99_dbcnr1
oracle 950274 1 0 17:02:32 - 0:00 ora_rcbg_dbcnr1
oracle 958498 1 0 17:02:31 - 0:00 ora_arc2_dbcnr1
oracle 974876 1 0 18:07:38 - 0:00 ora_w000_dbcnr1
oracle 1011914 1 0 17:01:16 - 0:01 ora_ckpt_dbcnr1
oracle 1052884 1 1 17:01:13 - 0:06 ora_lmon_dbcnr1
oracle 1069246 1 1 17:01:13 - 0:33 ora_dia0_dbcnr1
oracle 1110056 1 0 17:02:31 - 0:00 ora_arc1_dbcnr1
# ps -ef|grep ora_ | grep -v grep | wc -l
43
#Lakshan Perera implemented a real-time collaborative editor using Redis PUB/SUB support which will become available with Redis 2.0 announced for May 21st and currently available as RC1, Node.js[1] and web sockets[2]. Redis is also used for storing the documents in the app.
On each pad, there are different types of messages that users send on different events. These messages needs to be propagated correctly to other users.
Mainly following messages needs to be sent:
- When a user joins a pad
- When a user leaves a pad
- When a user sends a diff
- When a user sends a chat message
For handling the message delivery, I used Redis’ newly introduced pub/sub implementation. Every time a user is connected (i.e. visits a pad) there would be two redis client instances initiated for him. One client is used for publishing his messages, while other will be used to listen to incoming messages from subscribed channels.
Source code of the project can be found on ☞ GitHub and there’s also a short video demo of the app:
Just in case you are wondering about the Node.js-Redis combination, Michael Bleigh’s presentation below will detail some of the benefits of using the asynchronous model:
Last, but not least, I should say that Node.js usage is not at all common in the NoSQL world.
References
- [1] ☞ Node.js: evented I/O for V8 javascript (↩)
- [2] ☞ WebSocket API: enables web pages to use the WebSocket protocol for tw-way communication with a remote host. WebSockets is a real solution to problems that were previously solved using long-poll, comet, etc. (↩)
今天不知道怎么了,在windowns 7上安装mysql,就是不成功,后来没有办法去,在http://dev.mysql.com/downloads/mysql/下了个免安装的版本,解压后,用是能用了。
给应用测试的人建立了一个测试的数据库和用户,奇怪的是,在本地登录没事,远程登录,无论如何都报10045(28000)错误。
C:\Windows\system32>mysql -uuism -h 172.16.9.43
ERROR 1045 (28000): Access denied for user ‘uism’@'172.16.5.20′ (using password:
YES)
检查系统的user表,发现结果如下:
mysql> select user ,host ,password from user;
+——+———–+——————+
| user | host | password |
+——+———–+——————+
| root | localhost | |
| root | 127.0.0.1 | |
| | localhost | |
| uism | localhost | 16cfa8943c7fb191 |
| uism | % | |
| uims | % | |
+——+———–+——————+
6 rows in set (0.00 sec)
用户在本地登录是好的,远程无论如何都不行,不管给不给密码。查询网络发现,需要将user表中那个用户名为空的用户干掉;
mysql> delete from user where user is null;
Query OK, 0 rows affected (0.00 sec)
mysql> delete from user where user =”;
Query OK, 1 row affected (0.00 sec)
这里看看,原来这个用户名还不是null,只是一个空字符串,晕倒。
然后,重新更新下权限,
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
再在客户端做链接:
C:\Windows\system32>mysql -uuism -h172.16.9.43
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 103
Server version: 5.1.47-community MySQL Community Server (GPL)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
Mysql怎么会有这么搞笑的问题,哈哈,而且那个用户的host为%的那个,密码为空,现在变成了远程不需要密码,本地需要密码,囧!
Just because CouchDB uses Multi Versioning Concurrency Control (or MVCC[1]) doesn’t meant that you’ll also get document versioning support by default. So, how would you go if you need document versioning in CouchDB?
This article takes a look at 4 different approaches and details the first one as it looks to be both simple, scalable and supported by CouchDB replication:
- storing as a binary attachment the previous version
- append old versions to an array embedded in the current document
- keep each version as a separate document
- skip compaction
How does storing previous document version as a binary attachment to the new version work?
[…] when the document is loaded from the CouchDB server, the string representation is saved before being parsed into JSON. Later, when the document is saved, the string representation is attached as a new binary attachment, with the corresponding rev as it’s name, and a content type of application/json. This way any CouchDB library can just open the stored rev, and see it as a normal document.
This means that each time the document is updated, the client will also store the previous version as an attachment to the latest version. At any time, a user can load any of the old versions.
References
- [1] ☞ Multiversion concurrency control (MVCC or MCC) is a concurrency control method used to provide concurrent access (↩)
2010-05-31 Mon
AnySQL.net
Oracle & Starcraft
Give you some color to see see!
Oracle Scratchpad
Oracle Life
Chanel [K]
Oracle Security Blog
MySQL Performance Blog
The Tom Kyte Blog
Delicious/Fenng/oracle
O'Reilly Databases
Red Hat Magazine
车东[Blog^2]
blue_prince
玉面飞龙的BLOG
木匠 Creative and Flexible
生活帮-LifeBang
Hey!! Sky!
dba on unix
Brotherxiao's Home
jametong's shared items in Google Reader
DBA Tools
Inside the Oracle Optimizer - Removing the black magic
DBA@Taobao
存储部落
OracleBlog.cn
知道分子
支付宝官方 Blog - 支付志
木匠的天空 Oracle Architect and Developer
Hello DBA
OS与Oracle
Cary Millsap
Guy Harrison's main page
eagle's home
dbthink
OracleDBA Blog---三少个人涂鸦地!The Pythian Blog
myNoSQL
OracleDBA Blog---三少个人涂鸦地!DBA@SKY-MOBI