LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

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.

Bulk Editing With Sed

This week, after refactoring some XML based Java classes, I was left with ~50 XML documents (used for testing) with the wrong root element. After a few seconds pondering opening a text editor and find/replacing 50 times I had a better idea: sed. sed can be used to perform regular expressions on each line of a file (or files). To solve the problem all it took was: sed -i s/oldroot/newroot/ * -i: edits the files in place instead of printing to stdout All 50 documents updated, simple as that.

Read More...

300

I’m not a person to write long texts or poetry. I am not the person to share you my most inner feeling. I am not the person that talks much. I am not the person to take the first steps. I am not the person that is always happy and cheerful. I am not the person who wants to be liked and admired. I am not the person that want to be in the spotlight.

Read More...

Techdays 2011 Belgium

Introduction My techdays 2011 (Belgian edition) started on Monday evening with a small dinner with Scott Hanselman, Glenn Block, Hadi Hariri, Maarten Balliauw, Yves Goeleven and Katrien De Graeve. It was great to meet this people, most for the first time. And Scott looked even worse than usual, respect man, travelling across the world to speak to people you do not know when you are in pain and just lost your voice, respect.

Read More...

SQL Server DBA Tip 4 – Server Considerations – 32 bit / 64 bit

Having to make a decision between 32 bit and 64 bit servers is becoming less common. 64 bit servers are the predominant platform when purchasing hardware. With that said, existing hardware still varies greatly between the two platforms. Purchasing new hardware When purchasing new hardware, it will be difficult to find hardware that is only 32 bit. Although 64 bit hardware is an accepted, better choice for scalability, primarily in regards to memory, 32 bit platforms are still wanted for certain situations.

Read More...

SQL Server DBA Tip 3 – Server Configuration – Model Database

The Model database is used as a template for all user databases that are created in SQL Server. This means the options, tables, routines and many other objects and settings that are in Model, will be in new user databases. Knowing that Model is utilized for this task can be useful by taking advantage of it by changing Model to match the best practices that fit your SQL Servers. To see a full list of database options that can be changed and flow to new user databases, read Model Database.

Read More...

Adding User Emulation to an Application

One of the tricks I picked up from my last job (and our forum software, now that I think of it) is the idea of user emulation. I could log into the application, search for a user, and, at the push of a button, temporarily become that user. The only differences between emulating them and actually logging in as them were a black bar that indicated who I am (with a link to stop emulating), all audit records continued to reflect my own user id, and I didn’t need to keep track of 30 different sample accounts and passwords.

Read More...

SQL Server DBA Tip 2 – Server Configuration – Data/Log Files

The second SQL Server DBA Tip is going to cover placing data files. There are a few primary concerns when deciding where to place data and log files. System Databases, I/O Overall Performance and Space Considerations will be the focus today. Storage comes in many forms and configurations. With Solid State Disk coming into the mix with Hard Disk Drives, a new avenue is paved in performance measurements. SSD comes with an extremely high price tag and this has kept it from truly taking a hold in all data centers.

Read More...

SQL Server DBA Tip 1 – Server Configuration – MAX Memory

For the first post in the SQL Server DBA Tip of the day series, MAX Memory configuration is the topic. Let’s get right to it… SQL Server Maximum Memory configuration is a value specified to limit how much memory the buffer pool can have. The Buffer Pool consists of dirty and clean pages that SQL Server has used. The entire contents of the pool can be seen with the DMV sys.

Read More...

SQL Server Filegroups: The What, The Why and The How

I once had a boss whose desk looked something like this: Shudder. I like things organized, from the files on my desk to the files in my database. There’s a mechanism in SQL Server to help you separate and organize files: filegroups. What is a Filegroup? A filegroup is a logical structure to group objects in a database. Don’t confuse filegroups with actual files (.mdf, .ddf, .ndf, .ldf, etc.

Read More...

Spatial Data From Your iPhone

Interested in finding out where your iPhone has been? How about importing that data into SQL Server and being able to analyze it and create maps from the spatial data? If you have an iPhone and/or follow any of the security news about it, you may have seen multiple posts recently stating that Apple is tracking everywhere your iPhone goes even when you have location services turned off. There’s even an open source application called iPhoneTracker that will create a map for you.

Read More...