You might think that this post will be about a bug in Lessthandot that only manifests itself in Firefox but you are completely wrong. If like me (and most other people I know) you like Lessthandot than you want to make the tab a permanent resident of your browser. And isn’t that what everybody wants in the first place? Of course I hear you thinking that FF already saves the state of the tabs when you close it so why would you need it.
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 working with the reportviewer I found it very annoying that it shows its report in a not printlayout mode. Like this But I want it in printlayout mode by default. After looking through Google and the properties and nearly giving up I found that they made this a function. _viewer.SetDisplayMode(DisplayMode.PrintLayout)``` Nope no DisplayMode property in sight. While all the other settings are properties. Oh joy. SO when you intend to make an API, please be consistent.
I’m going to go over some methods to import data from text files into SQL Server today. The particular file I went out and grabbed is comma delimited and with a few qualifiers in it. It is a typical file you may get and a request made to import or just for your own administrative tasks. Below is the location of field layout and file that I grabbed off the net to play with. This is just a text file comma separated of zip codes. I will attach the file as well to this blog.
I’m switching from a previous reporting engine to the microsoft reporting engine that comes free. No, I never used Crystal reports and I don’t know yet how much I’m gonna hate this one either. But the word free makes up for a lot in this world. And they all seem to have pros and cons. Okay So I wanted to use an objectdatasource since I work with domainobjects and I would have liked to make reports from them. The reportviewer has some little quirks with objects. They have made it with this in mind but not the first thing in mind and it shows a little.
One of my favorite additions to T-SQL language in SQL Server 2005 is Common Table Expressions, CTE for short. Primarily I use them instead of derived tables to improve maintenance and code readability. See also this interesting article on recursive CTE implementation T-SQL: Using common table expressions (CTE) to generate sequences and this interesting discussion about commonly-known problem of splitting delimited values. You may find this article by SQLUSA (Kalman Toth) very interesting.
Part 1 In the first part to this article we went over setting up the lab to show exactly how to perform a migration of databases to a new server with limited downtime. If you haven’t read the first part, you can find it here. Together we went over how to create a mirror and prepare a test lab for utilizing this method. If you already have a mirror in your test or development landscape then you can use that for the follow up. If you need a test lab setup, part 1 will get you in the position to go through all the steps that will follow.
The History A few years ago I needed to move an active set of databases from their current environment to a new server. The move was for a much needed hardware upgrade and, given the 24/7 nature of the business, required as little interruption to normal operations as possible. While reviewing the typical migration methods it occurred to me that we might be able to utilize mirroring to reduce the downtime at the cost of a little more up-front preparation. The idea was to create another database on the new server with all the jobs, security, and supporting objects restored. Once this was completed we could then restore the database from the outdated server on the new server and after restoring all the logs to bring the data in synch, start the new database as the mirror. When migration day came I would, theoretically, be able to kill the original server and watch the new mirror take the whole load, without any associated downtime. This not only would reduce my downtime window but also give me a great deal of freedom to schedule the failover to the new server. The failover plan went well. I had scripts to update the data source connections for the front-end applications and required only that the end users shut down and restart their applications. Failover took seconds instead of the minutes or hours involved in other options we had considered.
I’ll be attending my first SQL Saturday in October. The event is the East Iowa SQL Saturday. I’m excited about having the chance to go to one finally. Over the years I’ve found it very important to stay current with the SQL Server community. One of the goals I set way back in the beginning of the year was to start teaching and sharing what I know about SQL Server and development on the many services we have at our disposal. Work has taken a toll on that goal being accomplished as many of you know.
In a recent article, I explained how to extract numbers from a string. This blog post is slightly different. In the previous article, I show how to extract single numeric values (consecutive numbers). In this article, I will show how to extract all values (non-consecutive). This functionality is particularly useful for formatting data (when you need to export in a consistent way). For example, phone numbers (in the U.S.) are usually 10 digits long, but some people like to use (111) 222-3333 or 111-222-3333 or even 111.222.3333.
I was tagged by Denis in hopes I could actually remember back far enough to talk briefly on how I got started in SQL Server. So here it is… Quiet often DBAs are accidentally created. There have been dozens of blogs and articles written about how that happens in some peoples careers in IT. My story is basically the same as most of the other accidental DBAs out there. Every time I think of it I’m reminded of a sign posted near some bluffs here in WI I visit often.