For one of my clients, it was the time to say good bye to SQL 2000. It has been already late to say it but now they are upgrading everything to latest technology, including virtual servers on SAN storage, 2K8R2 etc. and SQL 2008.
I did not want to do an in-place upgrade of 2k3 server and SQL, but restore the database to a fresh 2K8R2 server. Test platform was ready - thanks to virtualization it is so easy to get new servers going - and moving the database was smooth. Everything was good till we start the app, then
18456 severity: 14 State: 8 - Login failed for user 'xxxx' [CLIENT:xxx.xxx.xxx.xxx]
This system is coming from the days where most of the computers did not have a virus guard. The password is not complex so no way we could typed it wrong 100s of times. However, going around that till mid night did not resolve the issue.
In the morning went through all the events with a fresh mind. With all the knowledge gathered from posts in the web it became clear what the issue was. Looking at the binaries confirmed the suspicion, and with a single change it started working.
SQL Server 2000 passwords are not case sensitive. The database had a mixed case password, which is hard coded in the app. After migration, password was set to all lowercase, just like it was typed. Admins were using the password in lowercase for all those years! When passwords become case sensitive by default in newer version, it did not work anymore.
Today, we don't even thinking of hardcoding passwords. We want the user name to be case sensitive let alone the password. We failed to grasp that it was the norm just a few years back. Times are changing and we are forgetful.
Thursday, May 20, 2010
Monday, May 17, 2010
Selenium and Visual Studio 2010 C# (CSharp) Express edition
Again, that question - what tool to use for this automation script? It is not a big script so the risk is low even if the selection is not optimal....
Looked at Watir and Selenium. Watir is more command line oriented than Selenium. I was impressed with both as I could execute a single line in interpretive mode and get something to happen in the browser. Amazing!
Selenium had the advantage of having a recorder. It is really handy to get most of the controls without painstakingly going through the source. In couple of sites there was a reference to a recorder for Watir, but never found the tool. This was the main reason to go to Selenium. It didn't take long to realize that the builtin scripting capabilities are not flexible enough to my work. Then, the next stage -went for Selenium RC. It supports many different languages to drive automation. I went for VS C# 2010 Express, which is free from MS.
I was pleasantly surprised of the compatibility of Selenium generated C# script and the VS C#. All I had to do was changing the Target .net framework version in C# project and then copy the class.
- After recording, select the 'C# - Selenium RC' from Options->Format. This will generate the C# class for your test.
- Note down the class name from 'public class ' statement. This is the name of the test case.
- Go to the VS project properties and change the target framework to .Net framework 2.0. This gave me hours of trouble till found!
- Remove any references marked with a yellow icon in Solution Explorer, and then any 'using 'statements marked with red underline in program.cs.
- From the same dialog, brows and add all the dlls in 'Selenium-dotnet-clientdriver-<ver>' package. This is in Selenium-remote-control <ver>.zip file. I was using version 1.0.3.
- Create a new class. Use the name noted in 2. Cut and past the output from Selenium IDE to this class file.
- Add the name space of class to program.cs
- Simply create the object, and start calling the SetupTest(). Then write your program, you can use/add/edit functions created by Selenium. Call TearDownTest() at the end, which would close everything.
It was a rare situation where two independent software programs agreed with each other so well :-)
Sunday, May 16, 2010
Finally ..
After a much delay, finally managed to start this blog. Well - I was not sure to start it under my name or my company name. End of the day it was not hard to decided as all the common shorten forms of the my name has already been taken, so settled down with company name :-)
Subscribe to:
Posts (Atom)