Monday, October 31, 2005

A beautiful dusk

This picture has been taken by Minolta Dynax 7D at 6pm Oct. 30, 2005 while my wife and I was walking back to my parent's home.
Actually the visibility was not good at the day time. Everything looked gray. But close to dusk the sky turned clear. It's breezing softly. What a beautiful evening! The view was quite breath-taking at the time. Sun already sank and the street lamps were lit. The clouds formed a long beautiful curve and were being burned by the sunset glow. Posted by Picasa

Wednesday, October 26, 2005

Photo Gallery: Best Wildlife Photos Announced


Wildlife Photographer of the Year is the world's largest wildlife- photograph competition. Organized by London's Natural History Museum and BBC Wildlife Magazine, the 2005 competition's top images are on exhibit at the museum through April 23, 2006. The exhibition will then tour internationally.

Overall Winner: "Sky Chase"


Friday, October 21, 2005

Learn Something New Every Day: Easy Connect Identifier

Prior to Oracle 10g, after creating a new database and configuring the listener, to connect to the DB from other box, you must first either create a TNSNAMES.ORA file in your local box or set up an entry for the DB in some name services (Oracle NAMES or LDAP). Sometimes it's annoying. Since Oracle 10g Release 1, you don't have to do this any more. Just like using thin JDBC to connect to a DB by providing host, port and SID, you can now easily connect to a DB via SQLNET by providing host, port and sevice name without any extra configuration.

Pretty cool! Below are from Oracle SQL*Plus Documentation

Easy Connection Identifier

The easy or abbreviated connection identifier has the syntax:

[//]host[:port][/[service_name]]

Example 4–4 Start a command-line session to the sales database using the easy connection identifier

sqlplus hr/password@sales-server:1521/sales.us.acme.com

Example 4–5 CONNECT to the sales database using the easy connection identifier

connect hr/password@sales-server:1521/sales.us.acme.com

The easy connection identifier can be used wherever you can use a full connection identifier, or a net service name. The easy syntax is less complex, and no tnsnames.ora entry is required.

However, through some tests, I found out you still have to put the below entry into SQLNET.ORA file. Otherwise, you will keep receiving ORA-12154 error either using 'sqlplus' or 'connect'. It's very frustrating!

NAMES.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)

After adding the EZCONNECT entry, I tried the command line 'sqlplus' many times but without success. Below are some output. Still trying ... :-(

swong@sun:nemo > sqlplus sysman@"mars:1521/flyhorse.domain"

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:27:33 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor


Enter user-name: ^C
swong@sun:nemo > sqlplus sysman@'mars:1521/flyhorse.domain'

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:27:46 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor


Enter user-name: ^C
swong@sun:nemo > sqlplus sysman@'//mars:1521/flyhorse.domain'

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:27:53 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Usage: SQLPLUS [ [] [] [] ]
where ::= -H | -V | [ [-C ] [-L] [-M ] [-R ] [-S] ]
::= [/][@] | / | /NOLOG
::= @|[.] [ ...]
"-H" displays the SQL*Plus version banner and usage syntax
"-V" displays the SQL*Plus version banner
"-C" sets SQL*Plus compatibility version
"-L" attempts log on just once
"-M " uses HTML markup options
"-R " uses restricted mode
"-S" uses silent mode
swong@sun:nemo > sqlplus sysman@"//mars:1521/flyhorse.domain"

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:28:00 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Usage: SQLPLUS [ [] [] [] ]
where ::= -H | -V | [ [-C ] [-L] [-M ] [-R ] [-S] ]
::= [/][@] | / | /NOLOG
::= @|[.] [ ...]
"-H" displays the SQL*Plus version banner and usage syntax
"-V" displays the SQL*Plus version banner
"-C" sets SQL*Plus compatibility version
"-L" attempts log on just once
"-M " uses HTML markup options
"-R " uses restricted mode
"-S" uses silent mode
swong@sun:nemo > sqlplus sysman@//mars:1521/flyhorse.domain

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:28:10 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Usage: SQLPLUS [ [] [] [] ]
where ::= -H | -V | [ [-C ] [-L] [-M ] [-R ] [-S] ]
::= [/][@] | / | /NOLOG
::= @|[.] [ ...]
"-H" displays the SQL*Plus version banner and usage syntax
"-V" displays the SQL*Plus version banner
"-C" sets SQL*Plus compatibility version
"-L" attempts log on just once
"-M " uses HTML markup options
"-R " uses restricted mode
"-S" uses silent mode
swong@sun:nemo > sqlplus sysman@mars:1521/flyhorse.domain

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:28:14 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor


Enter user-name: ^C

I worked out another way to bypass this problem, that's using 'connect'. You need to enclose the connection identifier with quote marks! Here are some tests including both success and failure. Here we go!

swong@sun:nemo > sqlplus /nolog

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:08:30 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.


11:08:31 connect sysman@"//mars:1521/flyhorse.domain"
Enter password:
Connected.
11:08:48 sysman@flyhorse> connect sysman@'//mars:1521/flyhorse.domain'
Enter password:
Connected.
11:09:03 sysman@flyhorse> connect sysman@//mars:1521/flyhorse.domain
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where ::= [/][@] | /
11:09:16 sysman@flyhorse> connect sysman@mars:1521/flyhorse.domain
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor


Warning: You are no longer connected to ORACLE.
11:09:28 sysman@flyhorse> connect sysman@"mars:1521/flyhorse.domain"
Enter password:
Connected.
11:10:33 sysman@flyhorse> connect sysman@'mars:1521/flyhorse.domain'
Enter password:
Connected.

Guess what? You still have to enclose the connection identifier with quote marks while using the command line 'sqlplus' no matter you use the double slashes or not. Slash doesn't matter but the quote marks really matter here! The only difference from 'connect' is you need an extra step, that's to escape the quote marks! It's Oracle to interpret the quote marks rather than Solaris (I am working on Solaris). So you need to pass the connection identifier with the quote marks to Oracle. Below are some samples.

swong@sun:nemo > sqlplus sysman@\"mars:1521/flyhorse.domain\"

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:39:22 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

11:39:27 sysman@flyhorse> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
swong@sun:nemo > sqlplus sysman@\'mars:1521/flyhorse.domain\'

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:39:51 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

11:39:53 sysman@flyhorse> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
swong@sun:nemo > sqlplus sysman@\"//mars:1521/flyhorse.domain\"

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:40:35 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

11:40:37 sysman@flyhorse> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
swong@sun:nemo > sqlplus sysman@\'//mars:1521/flyhorse.domain\'

SQL*Plus: Release 10.1.0.2.0 - Production on Fri Oct 21 11:40:55 2005

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

11:40:58 sysman@flyhorse> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

This connection mechamism can also be used to create a database link.

17:17:11 ops$swong@FLYHORSE> create database link report@user
17:17:41 2 connect to user identified by password
17:17:48 3 using 'mybox.com:1521/testdb.com';

Database link created.

Elapsed: 00:00:00.36

Wednesday, October 19, 2005

Most of films have been saved in this roll!

This roll of film is the 1st roll which I loaded into my Minolta 800si, one of two I brought with me for this Tibet trip. In the morning of Sep. 16, 2005, near the holy mountain Kailash, I loaded it in and took few pictures. At dawn on Sep. 19, 2005, the day after Chinese mid-autumn festival, while waiting for the sunrise at Gu Ge Dynasty, I took it out and used it again for those beautiful clouds in the morning sunlight as well as the Gu Ge Dynasty. Absolutely it's precious time for me and it's difficult to catch them again! Unfortunately, 2 days later, I opened the camera back accidentally while the whole roll has not been rolled back into the box! How careless I am! Usually rolls will be automatically rolled back after the last one has been exposed. The reason why it didn't work this time is because I changed the default setting in order to take 1 incompleted roll out for the future reload. However, I forgot to change it back. So the automatic rolling back was disabled. I didn't realize at the time and opened the back. Even I closed it almost in no time, but I know some of films must be fully exposed. I am even afraid all of them have been destroyed! Just like a nightmare! I had been blaming myself all the time. How come on the earth I am reckless like this! This is not me! But I know it happened. No matter how much I blame myself. The only one thing I wanna do is to print and develop this roll as soon as possible. However, I dare not to process it in Shi Quan He. I have to wait until we go back to Lhasa. Meanwhile, I was suffering from this. I was really angry at myself!

After going back to Lhasa, I was going to process this roll in one pro-like shop. I just couldn't wait more. My wife told me not to do so there. "You've already been waiting for many days! Why don't you wait for few more and take all of them back to HK to process them safely and securely?" I was convinced again even I was dying to see the final impact.

Finally I came back to HK and processed all the rolls. Thank God! Things were not like that bad as I thought previously! Only the last 10 films have been fully exposed but the rest are all preserved! Especially for those I took in that morning at Gu Ge Dynasty! The attached photo is one of them! Is it Kailash's blessing? Posted by Picasa

Oracle Secure Backup (OSB) - a replacement for Veritas DB Agent for Oracle

Sounds cool! If it's the case, we don't have to buy Veritas DB agent for Oracle any more. Previously, we must buy Veritas DB agent for Oracle as well as NetBackup client to backup a Oracle DB directly to tape library. Otherwise, the tape library can only been seen by Veritas MML and unseen by RMAN. To backup a DB to offline tapes, we can only backup it to hard disks as a staging place first and load the backup files onto tapes later via NetBackup Client. Despite the inconvenience, this method will cause a lot of other problems such as availability and managebility. One of them is like this: RMAN thinks all the backups remain in the hard disks by the data in the repository, but actually they are not since they have been archived to offline storage. There will be always inconsistencies between RMAN repository and Veritas MM database.

Oracle Database 10g Release 2: Top Features for DBAs: "In Oracle Database 10g Release 2, a new tool called Oracle Secure Backup (OSB), available in the first quarter of 2006, makes this requirement much more affordable by replacing the MML specific to third-party tape management systems. OSB can back up to a tape library directly, so you don't need any other media management layer. And, best of all, OSB is tightly integrated with the database engine and thus can be controlled and administered via Oracle Enterprise Manager."

Monday, October 17, 2005

Oracle Database 10g Release 2: Online Limit Changes

This feature is pretty useful as we don't have to re-create the controlfile to make the changes any more. Previously, taking such an action is critical and dangerous. You must be very careful to rebuild the controlfile. Moreover, the database must be opened in RESETLOG mode and a lot of information will be lost during the process.

Oracle Database 10g Release 2: Top Features for DBAs: "Online Limit Changes


When you want change parameters defined during the creation of the database, such as MAXDATAFILES, MAXLOGFILES, and so on, what are your options? Prior to Oracle Database 10g Release 2, the only option is to follow these steps:

1. Take a backup of controlfile to trace.
2. Modify the parameter you want to change in that trace file.
3. Shut the database down.
4. Startup Mount.
5. Recreate the control file.
6. Open the database in RESETLOGS mode.

Needless to say, this approach degrades availability. In addition, because RMAN keeps the metadata about backups in the control file as well as in the catalog, that information is lost during this process. The controlfile is created in RESETLOGS mode, so some backup information may be lost too.

In Oracle Database 10g Release 2, you needn't recreate the control file to change these parameters. Thus, you do not have to lose the RMAN information stored there."

Friday, October 14, 2005

My first time to see a group of Tibetan Antelope

In the morning on Sep. 16, 2005, it's the first time in my life to see wild life, a group of Tibetan Antelope. They are such amazing animals, slim, alert and active. All the group members I encountered are male with long horns on their heads. Doubtlessly, three of us, meimei, my wife and I all felt very excited at the time. We were trying to get closer to them but without success. They were so alert and always sprung away when we still were 200 or 300m away from them. The electrical poles in the background are not harmonized with the whole natural environment but truly exist there. Do they feel strange about the poles or already get used to such civilization products? Who knows? This is reality, anyway. The conflicts and collissions between the nature and our civilization progress! Let's pray they will live a safe life forever on their own land! Posted by Picasa

Tuesday, October 11, 2005

Google's New Service

个人一直都比较喜欢Google推出的各种新服务,不仅方便,而且实用。可以看出,Google一直在努力地提升着自己的服务,仍然是一家朝气蓬勃的公司,发展潜力依旧是巨大的!公司的竞争力也还在不断增强!昨天,继前一阶段推出了Google Talk之后,Google又在Google Lab里面推出了一个新服务的测试,名字叫Google Reader。大家看到这里,也许已经猜到了这项新服务的用处。对,它就是一个新闻阅读器,也是时下非常流行的RSS阅读器。那么,它和其它类似的RSS新闻阅读器差别又在哪里呢?又有什么特别之处呢?
第一,最大的差别我想就是无需再安装软件或者插件,它是一个完全基于WEB的服务,只要你能够上网,任何一个浏览器都可以用到这个服务。由于所有订购的新闻都存储在Google服务器中,在何时何地我们都可以浏览自己感兴趣的新闻!省去了用OPML在软件之间来回导入导出的麻烦,而且,有些RSS阅读器还不支持OPML。
第二,仍然是Google在这项新服务中集成了搜索功能,这也是Google的一贯宗旨。我们可以对自己感兴趣的话题进行查找,Google可以把相关的新闻源列出来,我们可以再从中选择然后进行订购。省去了自己在网上大海捞针式查找的麻烦。
第三,标签功能也是必不可少的,这一概念也被其它的公司所逐渐采用,如Yahoo。具体应用在这项服务中,是对所订购的新闻源进行标签,一个新闻源可能与科学有关,同时又是关心健康的一些话题。这样,我们可以把这个新闻源同时标以科学和健康,便于准确定位。当然,只有在订购的新闻源数量特别多的时候才会体会到这项功能的方便性,道理和Gmail是一样的。
此外的功能还有将自己感兴趣的某一具体话题用Starred标注起来。可以将话题直接Gmail给自己的朋友,也可以对话题直接进行博客等等。
因为现阶段只是测试版本,相信Google还会对一些功能进行改良,并逐渐加入一些更加好的新的功能进来。
大家可以到以下这个网址试用这个服务:

http://reader.google.com/