Don’t mix and match databases, kids.
So, in my job, I have to deal a lot with Visual Basic (still currently VB 6, even though development is speeding on towards C#), and even more inside of SQL Server (2000/2005). All of our applications are semi-self contained, with interfacing dlls to pass calls between the modules that have to communicate. So, in all, everything is very independent. There’s only one thing that we do that allows external communication, but it is relatively minor. We have the ability to create a view of the data to be able to interface with 3rd party GIS solutions. Usually, we set it up, it works, and that’s it. That is, until something went wrong with it today. This customer had a server changed out earlier this year, and unknown to anyone at the time, the mapping link was no longer working. So, I took the call, let them know that the server name had changed, and that was it. They accepted that as the workaround, and we ended the call. Well, they called in later that day, and it still wasn’t working. So I started digging. Tried to set everything up as it had never had the mapping installed, didn’t work. Tried setting up the ODBC DSN to see what was happening with it, and it wouldn’t allow the connection. After re-setting the password on the account, and it still not connecting to the database, something connected in my brain. When we set up a new server, we don’t keep the original master database, we use the one with the new install. Well, the new server didn’t have the new log-in in it… until I tried to set it up earlier. So what was up?
I then remembered that earlier, the setup of the solution had complained about something, and I thought it was just complaining about the SQL view being there. Ran the same sql command, and looked at the other error that was right above the complaint about the view. It complained about the login already created. So I deleted it from the users in the master database. And it still complained.
So, I had to dig more.
Found that the user was also stuck on the database. But why wouldn’t it work, didn’t I just create it? The underlying answer to all of this: no, I didn’t create it. It had been there all the time. There was one customer login that was with the old master database, and when the old server was turned off, it severed the connection with the external database. The new customer login was a fully different account, just happened to share the same name. In the end, I had to remove all traces of the login from the database, the schema, and the roles, and then have the stored procedures re-create all them. In the end, the amount of work was 5 minutes. The discovery took over an hour. And the experience, as is said, was priceless.
Daily Stops
My People
Recent Posts
Recent Comments
Archives
- May 2010 (2)
- March 2010 (1)
- February 2010 (1)
- January 2010 (2)
- December 2009 (1)
- July 2009 (1)
- June 2009 (1)
- April 2009 (1)
- March 2009 (3)
- January 2009 (2)
- December 2008 (4)
- October 2008 (3)
- September 2008 (6)
- August 2008 (2)
- June 2008 (3)
- May 2008 (6)
- April 2008 (6)
- March 2008 (5)
- February 2008 (2)
- January 2008 (1)
- December 2007 (1)
- October 2007 (2)
- September 2007 (5)
- August 2007 (7)
- July 2007 (15)
- June 2007 (8)
- May 2007 (9)
- April 2007 (9)
- March 2007 (13)
- February 2007 (12)
- January 2007 (24)
- December 2006 (13)
- November 2006 (6)
- October 2006 (3)
- September 2006 (4)
- August 2006 (2)
- July 2006 (3)
- June 2006 (5)
- May 2006 (4)
- April 2006 (7)
- March 2006 (10)
- February 2006 (5)
- January 2006 (17)
- December 2005 (6)
- November 2005 (15)
- October 2005 (6)
- September 2005 (5)
- August 2005 (7)
- July 2005 (9)
- June 2005 (11)
- May 2005 (14)
- April 2005 (10)
- March 2005 (16)
- February 2005 (14)
- January 2005 (11)
- December 2004 (12)
- November 2004 (12)
- October 2004 (14)
- September 2004 (11)
- August 2004 (13)
- July 2004 (18)
- June 2004 (15)
- May 2004 (11)
- April 2004 (15)
- March 2004 (12)