Archive for October, 2006

Midsommar and kräftskiva

The normally reserved Swedes celebrate summer in a big way. The biggest celebration of all is Midsommar, where people put up a maypole, sing and dance around it while imitating frogs, pigs, and violen playing, and just be merry in general.

I’ve never attended Midsommar celebration during my summer trips in Sweden, because we were there in August. I have, however, attended 2 such celebrations in Chicago area organized by local Swedish-Americans. That event is held yearly at Old Templar park in Geneva, Illinois, a far west suburb of Chicago. It was kind of fun, although I found it a bit strange the religious connotations the organizers brought both times I attended. For example, this summer, one pastor did a full sermon before things got started. If anything, the Swedish Midsommar is a pagan tradition and has nothing to do with Christianity. (The pastor’s message, however, was relevant, depending on your point of view at this particular holiday. He preached against drinking.) Here is a picture taken at Old Templar park:

Midsommar

Another Swedish summer tradition is crayfish party, usually in August. Friends would gather together, eat crayfish, drink vodka, wear an optional paper crayfish hat, sing, and have a good time. The crayfish are boiled, usually seasoned with salt and dill, and then served cold. Nowadays, it seems most of crayfish is imported, prepackaged and ready to eat, from China or Turkey. Thawing the package takes some time. People usually leave it in the sink under the faucet, and run cold water over it to speed up the thawing process.

I had crayfish for the first time while visiting relatives in Vasteras last year. I really enjoyed it. Here is a picture of it.

2005SwedishSummer1 033
In the above picture, I think I just arrived Sweden from the US, after being stranded at London Heathrow airport for a day because of BA’s labour troubles. I wore other people’s clothes because I didn’t have my luggage with me. I had to book a different flight from London to Stockholm, via Oslo, so that I wouldn’t miss a funeral I was supposed to go to. Fortunately, I did get my money back. In 2004, my BA flight was seriously delayed at Heathrow because of labour strike. Of course, there were alleged terrorist plots at Heathrow this year that caused massive delays. All of them happened in August. My advice: avoid British Airways and Heathrow in August if you can.

This summer, I was happy to discover that the IKEA store in Chicago sold crayfish, and it is from China! What a great combination! Below is the pack I bought.
Crayfish and Vodka, a Swedish tradition

Back of the package:

Crayfish

To top it off, the store also got the crayfish hat:
Crayfish hat

This is the feast after the the package is thawed and ready to eat.

The feast

I finished it all by myself, since my better half is a vegetarian and my son would not eat it. Too bad nobody was around to sing Helan går with me. I was told that you can join in even if you don’t know any Swedish, since everybody is drunk and wouldn’t be able to tell anyway.

For those who are interested, as far as I know, there are 2 places in Chicago that sell Swedish food: one is IKEA in Schaumburg, the other is Wikstrom’s Scandinavian Foods and Gifts in Chicago at 5247 North Clark Street, just north of Swedish-American museum.

Comments

Sql Server Browser needs to be started for remote connection to a named instance

A default installation of Sql Server 2005 is pretty easy. After install, you can connect to it remotely, either through Sql Server Management Studio or sqlcmd. However, if you install a named instance on the same box, you may not be able to connect to it remotely, although connecting to it locally would still work.

This is the error message if you try a remote connection to the named instance via Management Studio:


An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

——————————
BUTTONS:

OK
——————————

This is the error message when you try the same connection via sqlcmd:


C:\>sqlcmd -S MyServer\MyNamedInstance
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under
the default settings SQL Server does not allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

It turns out that for named instance, Sql Server Browser needs to be running to facilitate remote connection. To start it, log on to the server, then go to Sql Server Configuration Manager, and check Sql Server Browser under Sql Server 2005 Services. You may not be able to start it right away, because it is disabled. To solve that, go to its property page, click on the second tab (Service tab), and change the Start Mode to Automatic. You can then start it. Remote connection to named instance should work afterwards.

Comments (1)

Issues connecting to SSIS and browsing packages in msdb when database service is clustered

In Sql Server 2005, you cannot cluster Sql Server Integration Service (SSIS).

During database cluster install, you can pick to install Integration Service. SSIS will only be installed on the node where installation process starts from. For example, suppose you have Node1 and Node2, and the install is started from Node1, then database service and binaries will be installed on both nodes automatically, but SSIS will only be installed on Node1.

Now, suppose the database cluster name is VirtualDb. When it is running on Node1, to connect to Integration Service in Sql Server Management Studio, you can choose to connect to VirtualDb, because under the cover, you are really connecting to Node1, which does have SSIS installed. However, if VirtualDb happens to run on Node2, then you have a problem, because there is no SSIS on Node2. Instead, you will have the message below:

Connect to SSIS Service on machine “VirtualDb” failed:
Class not registered
——————————
BUTTONS:

OK
——————————

So, SSIS wise, you can only connect to Node1 or VirtualDb when it is running on Node1, but we are not done yet. You will get an error when you try to browse Stored Packages -> MSDB in Object Explorer. Below is the error you will get:

The SQL server specified in SSIS service configuration is not present or is not available. This might occur when there is no default instance of SQL Server on the computer. For more information, see the topic “Configuring the Integration Services Service” in Server 2005 Books Online.

Login timeout expired
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Named Pipes Provider: Could not open a connection to SQL Server [2]. (MsDtsSrvr)

——————————
BUTTONS:

OK
——————————

The reason is that the meta data of package location is controlled by a file located on Node1, and part of it is incorrect. If you browse through the path of Sql Server, look for C:\Program Files\Microsoft SQL Server\90\DTS\Binn\MsDtsSrvr.ini.xml. Open it up and you will see this piece of code:

    <folder xsi:type="SqlServerFolder">
      <name>MSDB</name>
      <servername>.</servername>
    </folder>

Here, you can see that the ServerName is a dot, which means default instance of Sql Server on this local machine. To fix the problem you encountered earlier while browsing packages, you will need to change it to VirtualDb. After that, restart SSIS, and it will work for you in Management Studio. The dot here would have worked, had the database service been a non-clustered service. I do believe this should be treated as a Microsoft bug. Instead of just putting a dot here by the installer, it should put in the virtual database server name, when database service is installed as a cluster.

Hope this information will help somebody.

Comments (1)

One year of blogging and trying to get out of my funk

It has been a little more than a year now since I started blogging. I started writing Sql Server related entries at http://blogs.sqlservercentral.com/blogs/haidong_ji/default.aspx. Shortly after that, I established this site, where I post all my blog entries.

My purpose is simple: sharing my musings and observations, sharing my learning experience of various technologies, and keeping a somewhat loose journal of my life so that I can give it to my child(ren) later. I don’t think there are many people reading my blog, but I have learned quite a bit from the comments and conversations I had with the few readers I have.

A lot of things happened in one year. The most significant is that I found myself enjoying my son more. He had a great year in first grade. He is making great progress in second grade. He started Saturday Chinese school after summer, and we are very happy with the results. I am constantly thinking of creative ways to help him to learn and enjoy Chinese, because most times, kids born and raised in a language environment different than that of his parents often resist the parents’ native language(s). In fact, Benjamin has asked me not to speak Chinese to him so often, especially in public, as if that somehow embarrasses him. I, on the other hand, think that I am not using Chinese enough. So I’ve got to pay attention to methods and ways of delivery. Overall, we are having great time together. Often times I think that he gives me more than I can ever provide him.

I also spent some time on another Sql Server 2005 book, Professional Sql Server 2005 Administration, which will come out soon. I am currently working on the third Sql Server 2005 related title.

I have to say that I’ve been in a kind of funk for awhile. Sure, I have a lot of things going on at the same time. There are plenty of emails, meetings, and phone calls that cause constant interruption. The uncertainty of when my better half will finish her program is also a big factor to consider. But in the last few months or so, many times I feel I don’t get much done during the day, letting inertia or mindless surfing taking over, and wasted my time away. Now if you’ve watched/listened to Ellen DeGeneres‘ stand-up show called Here and Now, you may think that is ok, because she pokes fun at the pressure of modern life and suggests that procrastination is actually a good thing. But I guess there is a limit to that.

Anyway, I’ve read David Allen’s great book Getting Things Done more that one year ago. I know some ways to really organize my thoughts and put them in action. In fact, I used to write what I want/need to do daily on a piece of paper, work on them, and cross them off during the day, which was very effective to me. I’ve also made a life plan in a spreadsheet file (lifetime goal, 10-year goal, 5-year goal, 2-year goal, and 1-year goal). I need to analyze them again, break them down into actionable pieces, and drag over my big fat ass to just do it!

Kind readers, do you have good suggestions/tips? What works for you?

Comments (2)

Grant database read/write access to Windows login

Regular readers may have noticed that I am a big fan of automation. As such, for repetitive tasks, I prefer scripting over point and click. Nothing wrong with point and click though. For one time task, I don’t mind using GUI to get it done quickly. Repetitive is the key word here.

Below is a working sample script that grants MyDomain\LoginName read and write access to MyDb. It also assign a default schema to this Windows login, which is dbo in this case. Replace all that with your data and it should work. This works only for Sql Server 2005.

USE [master]
GO
if not exists (select * from sys.server_principals where name = 'MyDomainLoginName')
CREATE LOGIN [MyDomainLoginName] FROM WINDOWS WITH DEFAULT_DATABASE=[MyDb]
GO
USE [MyDb]
GO
if not exists (select * from sys.database_principals where name = 'MyDomainLoginName')
CREATE USER [MyDomainLoginName] FOR LOGIN [MyDomainLoginName]
GO
ALTER USER [MyDomainLoginName] WITH DEFAULT_SCHEMA=[dbo]
GO
EXEC sp_addrolemember N'db_datareader', N'MyDomainLoginName'
GO
EXEC sp_addrolemember N'db_datawriter', N'MyDomainLoginName'
GO

Comments

Swedish Candy / Godis

Relatives from Sweden brought us Swedish candy this summer. It sure made the family very happy. Thanks Malin and Mathias. It’s great to have you here!

In case you don’t know, I am a Swede who dyes his blond hair black as a fashion statement.

Godis
Godis

Saft, sylt, och O’boy
Godis

Comments (2)

sp_who has a new column

For Sql Server DBAs, sp_who is an indispensable diagnostic tool for researching, monitoring, and troubleshooting. For example, you can use it to iterate through all sessions to a particular database, logins used, and host name where a session is initiated from, etc..

sp_who is modified slightly in Sql Server 2005. It now returns one additional column called request_id. I found this out because I have a kill session script that uses sp_who. The script builds a temp table that stores sid that connects to a database, then iterate through the table to kill all the sessions.

I actually don’t know what this field is for. But if you have scripts like mine, you will need to modify them a bit to accommodate this new column.

Comments

A short trip to Madison, Wisconsin

We took a short trip to Madison, Wisconsin, before school got started. It was a pretty good trip. The only downside of it is that it is too short. (I learned over the years that “The vacation/weekend is too short” is a fairly common response when you ask the question. I do mean it here, though.)

We booked our hotel through Hotwire.com. Based on my reading and experience, Hotwire is very good at getting good deals on hotels. You do need some flexibility to get the best deal, because it does not tell you exactly which hotel you will get until after you make the payment. But the savings can be pretty significant.

We got a room for 58 dollars per night at La Quinta, with the normal price around 120 dollars. Our room was nice and clean, with a king size bed and a sofa bed. Supposedly, there is free wireless Internet service, but I didn’t bring my laptop so I cannot verify that. We got free continental breakfast: bagels, muffins, cereals, and such. (I am actually surprised that George Carlin has not made fun with the term “continental breakfast” yet.) My son was pretty excited in staying in a hotel. He and I spent good time swimming in the hotel pool.

We met my friend James Luetkehoelter and his wife Kim. James and Kim hosted us at the Great Dane Pub & Brewing Co. in downtown Madison. It is a pretty popular joint with a good selection of freshly brewed beers. I am not a big beer fan. The only beer I can really say that I enjoy is Guinness. Granted, I haven’t tasted many beers. I remember my first time with my Guinness fondly. It was in Dallas, Texas, during PASS conference last year. I was reading Angela’s Ashes at dinner in the hotel, and thought a Guinness would go well with it. It was really great.

Anyway, at the pub, I ordered Emerald Isle Stout, the closet thing to Guinness I can find on the menu. It is not bad, but certainly not in the league of Guinness. Here is a picture of it. Prince Roy, this one’s for you!

Irish Stout

Madison is the capital of Wisconsin. It looks very nice. We later learned that during the weekend we were there, there was a Nazi march in town. That’s kind of creepy. We learned from the locals that Madison is a pretty tolerant place, with all kinds of people living there. It is common to have demonstrations and counter-demonstrations all over the city. In fact, there was an anti-Nazi rally that weekend when people learned that the Nazis would do a march.

Here is a picture of the capital building.

20060919 078

Comments (1)