Skip to main content
tclaremont
Inspiring
September 28, 2010
Question

Strange CF/SQL Behavior

  • September 28, 2010
  • 1 reply
  • 840 views
Yesterday I started getting "login failed" error messages when CF attempts to run a query against my SQL Server database. The site was basically useless since everything runs off a query. What follows is an email to a fellow employee looking for some help.
IIS, SQL2005, all Windows environment. Same configuration has been working for years.
Soon after we had everything running again, I started getting the "Login Failed" error message all over again. I took a look at the log files and was seeing that the login would be successful, and then, in the same nanosecond, would fail. So there would be two entries for every attempt.
Looking at the SQL database, I saw that it had grown to almost exactly 1 GB. I went to use the "shrink database" command, but it was grayed out. I took the DB offline, and a few minutes later I was able to shrink it. Still no luck with accessing it though.
I went to my tracking tables within the database, and deleted a few years of records. I also emptied out a couple of test tables that I had created. That brought the database down to around 650 mb. Everything has been running fine since then.
Can you think of any mystery surrounding a cutoff point of 1 GB?
This topic has been closed for replies.

1 reply

Inspiring
September 28, 2010

It's a full version of SQL Server, right, not SQL Server Express?  SQL Server Express does have a maximum DB size, but my hazy recollection is that it's around the 4GB mark, not 1GB.  Don't quote me on that.

Also... given this is a SQL Server question not a CF question... you have asked the same thing on a SQL Server forum, yeah?

--

Adam

tclaremont
Inspiring
September 28, 2010

Full version. No database size limit.

I put it here because the database was rejecting the login from the CF Server. I was hoping there was a relationship between the successful login immediately preceeding the failed login. After some more research I am not so sure that is the case.

Bottom line is that I believe the autogrowth properties on the database were not set optimally. I think the DB was hitting the maxsize limit. What concerns me is the ugly failure mode, though. The error logs don't hint at the fact that the maxsize has been reached.

The original db developer had the maxsize set to 1 gb for the database. That was seven years ago when the hdd was tiny. I changed the maxsize to 4 gb since we are now running on dedicated 144 gb drives for the db, and now things are running smoothly.

It is amazing how quickly you learn about SQL Server when you are faced with an issue....

Inspiring
September 28, 2010

Interesting.  It'd be nice if the DB gave you a bit more prior warning, eh?  Like "you're running out of space... you've only got nn MB left..." or something.  Like how Windows does with HDD space.

Anyway... glad you sorted it out.  And yeah: being dropped in it is a good way to have to learn how to swim...

--

Adam