Yearly Archives: 2006

USGS Tibet trip: Golmud

结束了两天的workshop和三天的train program后,进入野外程序。包括四老外,我,小吴,老汤,第一站到格尔木。
坐了十五小时的车,终于到达格尔木观测站,到达前,一下子还迷路了,找不到观测站在哪了,只记得在江源路,费了好大劲发现原来自己已经在跟前了。将大家都安排完,已经近凌晨4点,想着老外,特别还有老头老太太,可能都累的不成了,跟他们讲,在睡觉前也许可以吃点东西,如果愿意睡懒觉,大家可以睡到中午前,吃完中午饭后,可以一起去看看“万丈盐桥”。发现自己好像已经清醒不想再睡了,上了一会网。
格站比几年前我在站上的时候好不了不知多少倍,干净明亮,还充满学术气氛。住的房间象宾馆一样,更多的是放心,绝对是干净的。

USGS专家访问

八月份是个繁忙的季节,各种各样的会议,和很多学者过来访问。USGS的几个专家会在这里呆两周,包括2天的workshop,和3天的training program,以及会后的青藏高原寒区水文考察。
基本上全部事情已经就绪,只是今年的青藏铁路通车以后,全部的价格疯涨,估计预算严重超支。
附一张在会议室training的照片。

公车(外一)

早上搭公车上班,司机虽然不怎么样,车也开的蛮撞,但看到陆续上来几个老人,总是有年青人起来让座,让人感觉很舒服。看着车前端挂着一个“青年文明号”的牌子,想着,估计这个牌不是给司机发的,是发给坐这车的乘客。
*********
These days the Asian Permafrost Conference are holding in Lanzhou. Yesterday I have met Richard Armstrong from NSIDC and his wife, Besty. We had together a dinner in Lanzhou Hotel. I told them because you were in China, you should fully enjoy the Chinese foods. Although  there are many(?) Chinese restraunts in Boulder the city they are living, few native Chinese foods can be found in those restraunts. The declaration were greatly agreed by Richard. Richard is one of the top research professors in Colorado University, but we cannot see his arrogance, which are surprisely found in the oversea Chinese scholars (Hai Gui) who possibly stayed oversea for several days. Richard is the guy I have blogged in this space who are very anthusiastic in science and impressed me very much. When we visited NSIDC last year, in his office, he has talked about his research for up to 2 hours and forgot to invite us taking a seat. Of course he stand there as us. I have never met a scientist before the day like him. Through his eyes, I found what is the enthusiasium in science research. The couple is both very impressive. Betsy, a graceful lady, always speak gentlely. She is the first time to be in Lanzhou, and going to the excursion to Tibet after this conference.

RS232线居然有不同的类型

做UPS与电脑相连,使电脑监控UPS而做出反映。通过RS232端口连接山特UPS c10k到电脑的COM1上,改正电脑COM1的波特率为2400bps后,居然还是不工作。亮子打800咨询电话,告之看相连的RS232线是平行型的,还是交叉型。连接山特(Santak)的需要平行型的。又长新知识了,原来这线也有不同类型的,仔细看线的两个端口,公母两端果真都有数字编号,字真够小的。从某数字出来的,到那头也是该数字,被称为平行型的。我拿在手里的两根全部是交叉型的!

Oracle的自动备份

将以下内容保存为 OracleExportAutomata.bat,运行即可。可以与Windows计划任务联合使用,比如每天3:00am运行一次。

@echo off
echo ———–
echo name: Oracle data export automata utility
echo author: WANG Liangxu
echo date: 2006-8-7
echo refined by NAN Zhuotong
echo documented by NAN Zhuotong
echo Any problem please contact us via [email protected]; [email protected]

REM This program is used to export data in Oracle to external files named with current date.
REM A simple export schema is employed. Monday the data will be completely exported.
REM Tuesday through Thursday data will be exported in an incremental manner.
REM Friday, data exported include all the incremental data since the last completed export.
REM Saturday and Sunday incremental export will be employed once more.

REM This program can be used together with Windows plan and task utility. In that way,
REM the program can be enhanced with running by schedule.

echo ———–
set w=%date:~13,1%
set d=%date:~0,4%%date:~5,2%%date:~8,2%
rem echo %d%
if %w%==一 goto 1
if %w%==二 goto 2
if %w%==三 goto 3
if %w%==四 goto 4
if %w%==五 goto 5
if %w%==六 goto 6
if %w%==日 goto 7

REM exp system/systemwestdc inctype=complete file=d:/ORADB-BACKUP/20060807.dmp (complete)
REM exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/2006xxxx.dmp
REM exp system/systemwestdc inctype=cumulative file=d:/ORADB-BACKUP/2006xxxx.dmp
REM Mon: 完全备份(A)
REM Tue: 增量导出(B)
REM Wed: 增量导出(C)
REM Thu: 增量导出(D)
REM Fri: 累计导出(E)
REM Sat: 增量导出(F)
REM Sun: 增量导出(G)

:1
 echo Begin exporting data to file %d%-compl.dmp
 exp system/systemwestdc inctype=complete file=d:/ORADB-BACKUP/%d%-compl.dmp
 goto end
:2
 echo Begin exporting data to file %d%-incre.dmp
 exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
 goto end
:3
 echo Begin exporting data to file %d%-incre.dmp
 exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
 goto end
:4
 echo Begin exporting data to file %d%-incre.dmp
 exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
 goto end
:5
 echo Begin exporting data to file %d%-cumul.dmp
 exp system/systemwestdc inctype=cumulative file=d:/ORADB-BACKUP/%d%-cumul.dmp
 goto end
:6
 echo Begin exporting data to file %d%-incre.dmp
 exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
 goto end
:7
 echo Begin exporting data to file %d%-incre.dmp
 exp system/systemwestdc inctype=incremental file=d:/ORADB-BACKUP/%d%-incre.dmp
 goto end
:end

SQL server master库损坏的解决方案

SQL server 2k master db corruption due to power cutoff, causing sql server cannot start up. In this server, ArcSDE 9 and ArcIMS 9 are associated with Sql Server 2k sp4. and worse, no backup have been created prior to this disaster.
solution:
1. Backup possibly effected dbs, i.e., sde db, and westdc db.
2. run rebuildm.exe to reconstruct the master db. all logins are lost after that operation. sde amd westdc dbs cannot be found in the rebuilt master db.
3. attach the original sde db and westdc db using sa as the db owner.
4. create lost logins, for example, westdc, sde, etc. Fortunately, I have backed up all these information.
5. using enterprise manager, open sde and westdc dbs, isolated users can be found under the users leaf. So we have to assign the appropriate logins to those isolated users. use commands as follow:
USE sde;
GO
sp_change_users_login @Action=’Report’;
GO
USE westdc;
GO
sp_change_users_login @Action=’update_one’, @UserNamePattern=’westdc’, @LoginName=’westdc’;
GO
the first set of commands is used to report the isolated users in database sde. the second set of commands will assign an existing login named westdc to the isolated user westdc.
6. restart the arcsde service, then arcims services. DONE!
Lessons:
We always are required to backup databases in a regular interval.

该死的停电

WESTDC服务器发现SQL server停止反应,检查sql server log和windows事件记录,发现master表corruption,没有其它异常的情况。google之,有人讲可能是由于停电形成,当sql server在写入master表时,突然停电,master表被破坏。联系到上周的停电,估计就这原因了。
rebuildm.exe也许可以恢复,但logins丢失,还有种种问题。可恨!

张掖遥感会议结束

三天的会议结束了,总得讲不错,有一些报告很精彩,可惜GIS有关的报告比较让人失望,没有太好的新东西出来。LX理事长建议明年整一次有关空间数据发布的会议,希望明年我们有东西拿出来可让人感觉还可以的。
看了临泽的丹霞地貌,真是很漂亮,色彩的条纹无不彰显自然的伟大力量。每每站在这些自然杰作前,想着人是如此的渺小,由此更是赞叹不已。兰大L老师介绍这是第三纪形成的岩石经流水冲蚀形成。参观期间下着小雨,泥泞不堪的小道尽管很辛苦,队员们的无间合作,手帮手上了一道道山坡,更带给我们很多的快乐。
第三天上午参观西水大野口的祁连山水涵院生态站,吃到一顿浓香扑鼻的羊肉汤。女士们都顾不上保持身材,又吃了一大碗。大家都说这是这几天来最好吃的一顿了。
此后坐车到临泽国家站,从公路下来到临泽站有一些路,前面一直都是荒漠的样子,突然眼前一亮,看到一片的绿色,豁然开朗的感觉,开车的师傅直叹这是世外桃源。我是第三次来,感觉不是很强烈,随车的几位女士已经很长时间没有看到这么大片的绿色了,雀跃的不成。经过30来年的努力,临泽站已经是西部农业生态,治沙的一个大型综合观测研究站。我们来的正是时候,玉米,小麦,西红柿,西瓜,田瓜等都是成熟季节。回来的时候,我们还采摘了许多的几个品种的西红柿带回兰州。
感谢站长ZZH教授,在站上吃到了绝对绿色无污染的最丰盛的饭菜!