Archive for January, 2008

Script all jobs out in Sql Server 2005

In Sql Server 2000, there is an option to script out all jobs in an instance. That option disappeared in Sql Server 2005.

You can still do it. In Object Explorer, click on Jobs folder. Then go to the Object Explorer Details window. All jobs in this instance will be listed there. Select all, and pick script jobs from the right click context window, and you will get all jobs in one nice script.

Comments (2)

Watching Yao Ming play

We saw Yao Ming’s Houston Rockets play at Chicago United Center before Christmas. Houston won. The seats we got were pretty high up, and they were not cheap. Those athletes earn way too much money.

I haven’t watched sports for a while. Judging from this game and one I watched last week on TV while on the road, I agree with John’s analysis at YaoMingMania.com. The Rockets should definitely start Luis Scola and Aaron Brooks. Scola is an energy player with great hustle for loose balls and rebounds, both offensive and defensive. Brooks is very quick and has better judgment and decision-making than the current starting point guard, Rafer Alston. Tracy McGrady needs to be a better team player or else he needs to be traded, and everybody should work hard to let Yao get touches. When offense runs through Yao Ming, good things happen! By the way, if John gets this through trackback, thank you so much for your terrific job at YaoMingMania.com!

Here is a great article on Yao Ming from Sport Illustrated. (Sports Illustrated, like almost all magazines, produces nothing but junk nowadays, that piece is an exception, a rare breath of fresh air.)

We saw Yao Ming play at United Center
We waited for a while by the section next to the aisle leading to the court during pre-game warmup, hoping to get Yao Ming’s signature. He didn’t come out. As the game time drew near, the security guard shooed us away.

We saw Yao Ming play at United Center

Man, I miss pickup basketball games. I used to play pickup basketball almost daily since middle school. There are always basketball courts in schools or working units. Most outdoor courts in schools are open to the public. It was easy to find an open court and play during my days in China. I hope it is still the case today. Frankly, I found it harder to do it here in the US, where this great sport was invented, since in most cases you will have to join a gym to gain access, or sign up for some kind of league. A lot of leagues, like American culture in general, put way too much focus on competition that they turn me off. Don’t get me wrong, I’d love to win, but having fun in the process is much more important than the final results.

I gather some adults play basketball at their churches, but I don’t go to church. I long for the day when we can own a house, where I can setup a hoop of my own and play with my son. Hopefully it will come soon.

Don’t know much about another Chinese NBA player, Yi Jianlian. I am happy that he, along with Jet Li (Li Lianjie), help the masses learn how to pronounce i in Pinyin, because my last name is Ji. Yi Jianlian’s nickname is A’Lian, which sounds like the word alien. Some people have commented that he plays like one! From limited highlights I saw on YouTube, he looks very good.

Comments (3)

Sql Server 2005 DMO backward compatibility component

When you use DMO to connect to a Sql Server 2005 instance, you will likely get the following error:

Microsoft SQL-DMO (ODBC SQLState: 42000) error ‘800ad903′
[Microsoft][ODBC SQL Server Driver][SQL Server]To connect to this server you must use SQL Server Management Studio or SQL Server Management Objects (SMO).

This is because in Sql Server 2005, DMO has been deprecated. In its place is a new thing called SMO.

Microsoft does provide a backward compatibility component for customers using DMO to connect to Sql Server 2005. However, you will need to move to SMO sooner or later, because there will come a day when DMO will not be supported at all. To get the DMO backward compatibility component, go to Sql Server 2005 Feature Pack page, and download SQLServer2005_BC installation package.

Sometimes you will need to manually register sqldmo.dll in C:\Program Files\Microsoft SQL Server\80\Tools\Binn\sqldmo.dll using regsvr32. For example, if you get the Server.CreateObject Failed message, you will need to register that dll manually. In asp web page application, you will get the message below:

Server object error ‘ASP 0177 : 8002801d’
Server.CreateObject Failed

Comments

许巍、伍佰很不错

我大学时算是歌迷,偏爱摇滚

95年来美时,伍佰的音乐好像处于起步上升阶段。听说而已,还没来得及欣赏,就来到了大洋彼岸。

去年到过几次纽约,其实在曼哈顿的中国城时就很想买他的唱片。但想起我们的陋室已经几乎无立锥之地,我买的刘宝瑞、侯宝林、马三立(个人目前最喜欢刘宝瑞)等人的相声、动画片《大耳朵图图》、《西游记》等光碟也占了不少地方,就没买。

去年回国,终于买了伍佰的精选,一共三十首左右。果然名不虚传,他的歌真棒!我在车里放,儿子也跟着哼。他好像喜欢《白鸽》和《黄色月亮》。我基本上每首都喜欢,包括闽南歌《往事欲如何》,《世界第一等》等。

去年八月在上海时,在出租车里听了周杰伦的歌。在YouTube上看了看他的MTV,有的不错,有的觉得很搞笑。

最近从我的博客订阅里两次读到一个叫许巍的歌手。上周在华盛顿听到朋友谈到一首叫《蓝莲花》的歌,想起儿子和自己刚刚读完英文的《丁丁历险记》《蓝莲花》,就在网上听了听。哇塞,太牛了!许巍很棒!

有时间会多搞一些国语音乐听听。不知读者能不能推荐一些好的音乐与歌手。

写完这一些,好像有点老土的感觉~~~

Comments (4)

Find out which Sql Server Agent job it is running

In Activity Monitor (Sql Server 2005) or Current Activities (Sql Server 2000), if you suspect a job has been running unusually long, all you see is something like this:

SQLAgent - TSQL JobStep (Job 0×1D8274F1H00B7D44912BD78DCADB1AD0 : Step 1)

Use this statement to find out the job name:

select name
from msdb.dbo.sysjobs
where job_id = cast(0×1D8274F1H00B7D44912BD78DCADB1AD0 as uniqueidentifier)

Comments (2)

Generate script to put Sql Server databases offline

Say you are migrating databases from one server to another. You don’t want users connect to the old instance by mistake. You can do that by putting them all offline. Below is the script t

set nocount on
select ‘alter database ‘ + name + ‘ set offline’ from sysdatabases where
name not in (’master’, ‘msdb’, ‘model’, ‘tempdb’)

Comments

2007年夏北京之行流水帐之四

我们也去了秀水街、王府井、大华市场等地购物。隆福寺北面三联出版社的书店真不错。记不清名字了,但里面有一个韬字。我在这儿呆了一会,买了王蒙自传的前两部(力荐,第三部待出),中华书局的《史记》(并不全,遗憾)。王府井的北边有中华书局的一个店,没得空去。

在京时我们坐过公共汽车。没坐成地铁,主要是打的。

和的哥聊天是很过瘾的事情。因为我们都是陌生人,所以没有了和亲戚、熟人聊天时的顾忌。再加上在美不太说汉语,能痛快地说母语有种亲密、大块朵熙的感觉。我们回瑞典时,太座的姐姐告诉我她看得出小孩娘回瑞典后讲瑞典语时的亲切与水乳交融之感。

我们碰到的的哥大多来自通县、密云等郊区,他们的年龄和我大致相仿。一个通县的哥们70年出生,比我大不到一岁。当时车里的收音机正放着八十年代的流行歌曲。我们一起哼唱着小虎队的歌。我还记得《青苹果乐园》的片段。歌曰:“周末午夜别徘徊,快到苹果园里来,欢迎流浪的小孩”。

我们谈起程琳和她的《酒干倘卖无》。酒干倘卖无是闽南话。唱那首歌时,谁能想到我会到说闽南话的美丽的厦门大学去读书呢?该歌是台湾电影《搭错车》的主题曲。如能搞到,看看这部电影也不错。

我们也谈到了苏芮,邓丽君,张蔷和她的《星期六》:“星期六,星期六,悄悄地接近了。星期六,星期六,明天星期六。”如没搞错的话,张蔷曾去澳大利亚,好像现在回到了中国。还有那个做燕舞广告的年轻人。小伙子唱到:“燕舞,燕舞,一曲歌来一片情eng”,很潇洒。

我说起了我在乡镇上读初中时风靡的《迪斯科》。还记得一些歌词:“没有七彩的灯,没有醉人的酒。我们在月光下,跳一曲,跳一曲Disco, Disco, Discooooo…”。唱到这最后一句“Disco”时,实际上变成了尖叫。初中时我校文艺汇演,应该是初三的两个女生,穿着牛仔裤,合唱该曲,震撼整个校园!另外的一些歌词好像是:“这是心灵的安慰,不是无欲的追求。跳/眺向遥远的路程,莫要做短暂停留”。

另一个的哥的岁数比我大一些,北京城里人。他告诉我他小时候北京的天空特别的蓝,不像现在有这么严重的污染。车驶过什刹海附近,他说这儿有不少酒吧。傍晚华灯初上,灯影婆娑,很有一番情调。若能在此泛舟,见莲花朵朵,肯定会别有雅致的。不知为何,什刹海,北海公园的湖水和白塔,很容易让我想起《让我们荡起双浆》这首歌:“让我们荡起双桨,小船儿推开波浪。海面倒映着美丽的白塔,四周环绕着绿树红墙。小船儿轻轻飘荡在水中,迎面吹来了凉爽的风”。那种纯洁和天真,配上童声合唱,多美啊!

一个的哥喜欢谈政治。看得出他对腐败和官官相护深恶痛绝。我们谈起了共和国的历任领导人,一致认为家宝是个好同志,锦涛同志很有城府。我个人对家宝和锦涛的印象都很好。

另外两个哥们来自密云和通县,他们都是农业户口,家里还点着棒子。密云的哥们告诉我他也就是搞一搞春种而已,并不会到地里照顾庄稼,秋天能收多少就是多少。反正他主要靠开车吃饭。

以下是在京的另外一些照片。必胜客在美国是普通的连锁店,在我国好像摇身变成中产小资的去处。我们在这儿吃了一把。在上海时,父母、哥嫂一家和我们也在上海的必胜客吃了一回。

建国门外大街靠近秀水街的必胜客
One Pizza Hut in Beijing

建国门外大街靠近秀水街的冰激凌店,Baskin-Robbins,忘了它的中文译名。
Ice Cream at Baskin-Robbins in Beijing

王府井下面的大食代,我顶!
大食代

Comments (3)

Tidal wave watching / 钱塘观潮

双语博客. My first attempt of writing the same thing in both English and Chinese. It is pretty time-consuming. English version is in the second half below.

上次回国在杭州时,我爸爸建议去钱塘江看潮。我知道那不是一个好主意,因为我们路不熟,不知道具体在什么地方,也不知道涨潮的时间,顶多也就是从别人问到一些并不可靠的信息。当然也忘掉了伟大领袖毛主席的“没有调查,就没有发言权”谆谆教导。但因为前一天吵过架,我也懒得解释。

老婆身体不舒服,并且饿。但我很想营造一个家庭其乐融融的氛围,没说清楚,就拖着她上路。实际上她并不太明白我们要做什么。怪我不好,我的交流能力还需很大的提高。

所以我们发扬了不做计划、不落实细节、“跟着感觉走”的优良传统,爸、妈、哥嫂一家和我们一家经过两个多小时的艰苦卓绝的长征之后终于在下午五点抵达目的地。看了公园的涨潮周期表后才知那天的潮要到晚上十一点左右才能来,并且公园六点前收费。我们决定先吃饭。但嫌菜贵,决定当即掉头回去。感谢老婆的劝阻,我们买了门票进了公园,也算不虚此行,有此照为证。

这张照片的背景就是雄伟壮观波涛汹涌的钱塘江大潮。我拍这张照片时,老婆坐在石阶上擦眼泪。她现在觉得这一切滑稽得不得了,可当时一点都不好玩儿!

Watching the tidal waves / 钱塘观潮

While in Hangzhou last August, my dad suggested we go see the tidal wave. I knew it was a bad idea, because we didn’t know where exactly it was, how to get there, and the timing of the wave. Because of a fight the previous day, I didn’t want to explain anymore.

So, typical of the Ji clan, my parents, my brother’s family, and us headed out in the early afternoon. My better half was a bit under the weather, hungry and tired. But I wanted to create a happy family together image, so I dragged her along. She didn’t have a good idea of what was going on then. That was really my fault, I should have explained better.

After more than two hours of driving, we finally arrived around 5:00pm, and were faced with the cruel reality that the wave wouldn’t come until 11:00pm that night. The park charges admission before 6. So it was decided to have an early dinner. That plan was soon canceled because the food there were too expensive. Disappointed, we decided to head back right away. Thanks to my better half’s persuasion, we changed mind, bought the tickets and entered the park.

So we can say we’ve seen the tidal wave. You can appreciate all its glory through the background of the picture. While I was taking that picture, my better half sat on the stone steps wiping away her tears. She thinks it is hilarious now, but I assure you it was not fun then.

Comments

Sql Server 2005 SP2 Cluster Install issue

I had some trouble installing SP2 on a Sql Server 2005 64-bit cluster for a client, running on Windows 2003 SP2 OS. All other components patched successfully, except Sql Server Service. It is the single component that failed.

The error number on the active node, where I started the install, is error number 11009. The error number on the inactive node is 29527.

At first I thought MSDTC was not setup properly. But that turned out to be not the case. After some googling, we added the startup account to be part of domain admin. I then logged in with startup account, and setup proceeded without any issues. After SP2 was installed, we removed the startup account from the domain admin group, and all was well.

I recall this happened to me once in the past, when I was trying to get SP2 installed in a virtual server environment. I didn’t dig into it then due to time constraint.

Comments (1)

Sql Server 2005 SP1 Agent email notification not working

It looks that there is a bug in Sql Server 2005 SP1 that renders Sql Server Agent job email notification useless. This notification is enabled through Notification page in job property page. Below is the error message you will see in Sql Server Agent log, even when “Agent XPs” setting is set to 1:

[298] SQLServer Error: 2812, Could not find stored procedure ‘msdb.dbo.xp_sqlagent_notify’. [SQLSTATE 42000] (DisableAgentXPs)

You could still use sp_send_dbmail for notification purposes. SP2 fixes this bug.

Comments

· « Previous entries