I just finished reading the NHibernate 3.0 Cookbook, part of Packt Publishing’s Open Source series, and I’ve been really impressed. The book is written by Jason Dentler, whose blog I’m sure anyone doing frequent searches for NHibernate has run across once or twice in their travels. What really stood out to me about this book was how easy it was to read. You can tell that Jason went out of his way to make the book approachable for people unfamiliar with the concepts (without dumbing down the content) and in my opinion it really paid off. It makes for a much lighter and more enjoyable read than most technical books (I could routinely knock out 40-50 pages in a 45 minute train ride). I think it also makes it easier to grasp the concepts as well (at least this was true for the topics I was less familiar with).
This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.
When school started this year, my 7th grade daughter was informed that she is expected to complete a science fair project. I plan on convincing her to post her final report as a blog on this site, but it’s not scheduled to be completed for a couple more months. I plan on writing a series of blogs outlining the steps involved from a parents’ perspective. Step 1: Picking the project.
There is a long list of reasons not to use Unit Testing in your current projects. In fact I was able to make such a long list of reasons not to use automated Unit Testing that I wasn’t able to use them all in my presentation for the Raleigh Code Camp this coming weekend. While my presentation aims to dispel a number of these and show that unit testing can return a lot of value for low cost, I thought I would share the highlights from the “Why Not To Do It” list.
(Given the size of this article, a download e-paper is also available here) The obstacle SQL Server and data storage itself is only as good as the means in which we can read the data. Very seldom are databases created only for the purpose of inserting and storing data without the intent of ever reading that data. While the type of structure or design of the data storage will vary depending on the type and majority of transactions that will occur on the database, the fact remains that the mechanisms in place must return the data quickly and without directly affecting other transactions from committing their own primary objectives. With SQL Server, execution plans are a foundation and starting point of the tuning process after the infrastructure phases of building a database server have been optimized.
We found ourselves in a tricky situation at work this week. I’m surprised it hadn’t come up before, but I suppose our customers aren’t always the type to move to a new technology quickly. But we had a customer trying to install the back end of our application on a Windows 2008 server, and having trouble. We use AzMan to get our application’s permissions to work with windows authentication, and there was a new version included with server 2008. Our application was compiled against the 2003 version, and it was having problems when installed in this environment.
Default Trace With SQL Server 2005, 2008 and on, there are many ways for us to now track events like SHRINKFILE. Some of these are Event Notifications, XEvents and the well-known but often-forgotten, Default Trace. The Default Trace has been in SQL Server since 2005 and by default is set to enabled. The Default Trace essentially captures and logs most configurations and schema changes that occur on SQL Server. Since the default trace is enabled by default, the chances of this logging mechanism being on in your environment are good. At the time you find a configuration or major change to the database servers you are in charge of, you can turn to the trace files to analyze when and who may have done the changes.
There are a number of environments or situations where large-scale systems monitoring is either not cost effective or simply not available. Windows 7 and 2008 include a feature for sending notifications when specific events occur in the event log. Technical Area: Accidental Systems Administrator, Accidental Database Administrator Level of Difficulty: Additional Articles:Virtual Lab entry on the LTD Wiki Using the Built-In Email Windows Vista, 7, and 2008 have a built-in option that allows us to attach actions to events from the event log. These actions take the form of Tasks, similar to scheduled tasks with the exception that they are trigger by events rather than time. The services infrastructure in windows logs startup and shutdown events for services and many applications use the event log rather than a custom logging format. We can take advantage of these messages to create a notification that emails us when certain events occur.
Someone at my job needed to grab a filepath, take out the filename and then split all the pieces into their own columns which were separated by either a dot or an underscore. If you had the following table CREATE TABLE #test (id INT primary key, PATH VARCHAR(1000)) INSERT #test VALUES(1,'Y:dgfdgdgd_Databla_2010_10_14_Pre_Calc.BAK') INSERT #test VALUES(2,'Y:dgfdbla_2010_10_15_Pre_Calc.BAK') INSERT #test VALUES(4,'Y:dgfdgdgdgdgdgdgdSome_Databla_2010_16_Pre_Calc.BAK') INSERT #test VALUES(3,'Y:dgfdgdgdgdgdgdgdSome_Databla_2010_11_12_Pre_Calc.BAK') Then this was the required output. id <th> PATH </th> <th> 1 </th> <th> 2 </th> <th> 3 </th> <th> 4 </th> <th> 5 </th> <th> 6 </th> <th> 7 </th> <th> 8 </th> <th> 9 </th> </tr> <tr> <td> 1 </td> <td> bla_2010_10_14_Pre_Calc_BAK </td> <td> bla </td> <td> 2010 </td> <td> 10 </td> <td> 14 </td> <td> Pre </td> <td> Calc </td> <td> BAK </td> <td> NULL </td> <td> NULL </td> </tr> <tr> <td> 2 </td> <td> bla_2010_10_15_Pre_Calc_BAK </td> <td> bla </td> <td> 2010 </td> <td> 10 </td> <td> 15 </td> <td> Pre </td> <td> Calc </td> <td> BAK </td> <td> NULL </td> <td> NULL </td> </tr> <tr> <td> 3 </td> <td> bla_2010_11_12_Pre_Calc_BAK </td> <td> bla </td> <td> 2010 </td> <td> 11 </td> <td> 12 </td> <td> Pre </td> <td> Calc </td> <td> BAK </td> <td> NULL </td> <td> NULL </td> </tr> <tr> <td> 4 </td> <td> bla_2010_16_Pre_Calc_BAK </td> <td> bla </td> <td> 2010 </td> <td> 16 </td> <td> Pre </td> <td> Calc </td> <td> BAK </td> <td> NULL </td> <td> NULL </td> <td> NULL </td> </tr> I thought that this was an interesting exercise, the person who asked me about this wrote some procedures and user defined functions but it was too slow because he was using a lot of charindex and substring functions and storing results in intermediate variables, then continued parsing until the end of the string.
PASS, the largest annual SQL Server conference, is quickly approaching. This means you only have a very short time to convince your Boss to make it his good deed for the year to send you. If you are required to justify why your company should spend thousands of dollars for you to attend, check out the ROI page on the PASS website for help/tips. Use all your charms and give it your best shot.
Today my good friend Aaron Lowe (Blog | Twitter) let me know he was having problems getting SQLCop to run. The error would come up as soon as the executable would be run to do the initial install and run of the program. Proxy servers lock down internet traffic to the point explicit allowances must be set in order for programs like SQLCop to function. SQLCop uses an internet connection to ensure that all checks and updates that are added are maintained. When SQLCop first loads, it checks the SQLCopConfig.xml file to determine if a new SQLCop.xml file needs to be downloaded. If SQLCop is unable to download the configuration file, it will automatically use the previously saved sqlcop.xml file. Because of this, a remote file request is always performed when you start up SQLCop.