Register
Friday, March 12, 2010
 
 DBAs And ProgrammersBlog
  
News! Minimize
   
 
 Print   
 
Misc Blog Stuff Minimize
   
 
 Print   
 
The Reluctant DBA Minimize
 
 
 
 Print   
 
Reluctant DBA Minimize
   
 
  
 
Reluctant DBA Minimize
   
 
  
 
The Reluctant DBA Minimize
 
Author:CarpDeusCreated:4/18/2008 6:56 AM
As a programmer and database administrator, I've seen a lot and here I'll record bits of information about what I'm doing and how I'm overcoming various challenges

 SQL Server Cursors are, by themselves, neither good nor bad. But they are highly inefficient in the SQL world because SQL Server really works best with SET data. Having said that, cursors are very familiar to programmers, especially VB programmers who have learned to process record sets one row at a time in a FOR or WHILE loop.

Read More »

Want to know what terror feels like? Open up the properties for a production database and see that the last backup date is null. That'll do it. Then look in the log and see that the reason the database isn't backing up is a truly funky error message:

Msg 9987, Level 16, State 1, Line 1 The backup of full-text catalog '' is not permitted because it is not online. Check errorlog file for the reason that full-text catalog became offline and bring it online. Or BACKUP can be performed by using the FILEGROUP or FILE clauses to restrict the selection to include only online data.

The most interesting part of the error message is that the name of the full-text catalog is an empty string.

As you might guess, this was something that needed figured out and fast! So it was off to Google, which failed me. And Twitter, which didn't help (when BrentO doesn't have any idea, you know you've found something interesting). And finally StackOverflow....

Read More »

 

Read More »

 

Read More »

The short answer, of course, is when it's a short, but that's not why the following code throws an error:

(CanContactGeneral == string.Empty ? 0 : Convert.ToInt16(CanContactGeneral))

Here we are evaluating a string to determine whether to use a number or a 0. And the error that gets thrown is Type of conditional expression cannot be determined because 'int' and 'short' implicitly convert to one another. Which makes perfect sense, I was being lazy and should have handled this better, but I was asking the compiler to turn this expression into either an int or a short but not giving it any guidance. So I could change the 0 to Convert.ToInt16(0), but then I realized I was using this in a string.Format, so I just eliminated the Convert statement and all was well.

That may sound like a mundane question, but to a database designer, it's rather important. If you take a moment and review all of the email addresses you've ever had or all of those you've known, then you probably would assume that 100, 150 characters should be long enough. But that's only a good assumption until it gets broken. And, if you are a programmer building in constraint checks, is the following a valid email address:

777ACE43B87D476C98AD7B2D173FCB6F8385EA80E9A24EC98BDC56C24393043AEC98BD@yourcompany.example

It's 84 characters long, but it isn't valid. Why? Because the local part (before the @) can only be 64 characters long. That's according to RFC 5321, in the section Size Limits and Minimums. Which means a maximum email length would be 320 characters. Which is, in all probability, something...

Read More »

My websites all run on the Dot Net Nuke platform. And DNN released version 5 on Christmas. Lots of big news in the community, one might think that angels themselves had come down with trumpets to announce the joy that was DNN 5.0.

Except, it didn't work.

When I tried to upgrade the first time, the install died because third-party software I was using had some major problems with the release. So, I reset my platform, removed that particular piece of software and tried again.

The install finished, but now I couldn't log in because one of the other pieces of software I use didn't work with 5.0.

Now, you could say that the vendors have had time to fix this since the beta was released.

But I prefer to say that DNN broke one of the major software tenets, one I've broken often enough, "Don't break existing code with new release!"

The developer who's software broke the install said,

I'm going to have to put a notice on our site .. Even trying to upgrade a DNN supplied module...

Read More »

 While Velocity supports tags, it's not an easy proposition. But with this quick function, you can fix that lack.

Read More »

So, I'm giving a talk next week in Dallas at VSLive and I'll be talking about Velocity. So, I'm building demos to talk about caching and I'm using SDS (MS... please keep the servers up for my talk).

Read More »

 

Read More »

 
 
 Print   
 
Privacy Statement | Terms Of Use Copyright 2001-2008 by ReluctantDBA.com