Welcome to our second class for HA and DR week of SQL University. Yesterday we went through defining HA and DR along with some common practices you can use. Today we are going to focus on the concept, “Backups are for sissies!” OK, we’re really going to look at backup and restore for Disaster / Recovery (DR) and how being a sissy and always backing up our databases and testing out restores is a proven strategy for DR.
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.
Welcome to SQL University HA and DR week! My name is Ted Krueger and I will be covering various High Availability and Disaster Recovery (HA and DR) strategies and methods. During the week, we will talk about defining HA and DR and introduce some points to consider while putting them into practice in your centers. Next, we will go over DR. The DR class will be composed of a Log Shipping setup and also a backup/restore discussion. Finally, we will setup a database mirror and discuss the basics of this HA feature, which is available in SQL Server 2005, 2008 and 2008 R2. The HA and DR will also cover testing your solutions. That is critical to these life saving strategies – we need to know they will work in the time of need!
In .Net 4.0, and VB10 that goes with that, you can now use a new type called a Tuple. The Tuple is not very fancy and something that is overlooked sometimes but it can be very handy on occasion. This is what wikipedia has to say about a Tuple In mathematics and computer science a tuple is an ordered list of elements. In set theory, an (ordered) n-tuple is a sequence (or ordered list) of n elements, where n is a positive integer. There is also one 0-tuple, an empty sequence. An n-tuple is defined inductively using the construction of an ordered pair. Tuples are usually written by listing the elements within parentheses ‘( )’ and separated by commas; for example, (2, 7, 4, 1, 7) denotes a 5-tuple. Sometimes other delimiters are used, such as brackets ‘[ ]’ or angle brackets ‘⟨ ⟩’. Braces ‘{ }’ are almost never used for tuples, as they are the standard notation for sets.
This question came up again yesterday in our SQL Server forum so I decided to create a short blog post about it. The version of SQL Server Management Studio that ships with SQL Server2008 comes with IntelliSense enabled, I still think IntelliSense is sometimes more in my way than it is useful but I won’t bore you with that. What will eventually happen is that if you create new tables and stored procedures IntelliSense will not know about those, when this happens you have to refresh the local IntelliSense cache for it to see the new objects.
This post will illustrate two methods for removing old files from directories using SSIS. This task is often used to delete old backup files and other ETL files that are not required any longer. We’ll step through two methods. First method uses a script task entirely for the removal and the logging events. This method will also have some comments in for logging and using the FireInformation method to mimic the normal logging abilities of SSIS. The FireInformation method didn’t provide much more of a performance boost so it wasn’t used here. Second method uses a Foreach Loop Container, Script Task for logic and a File System Task for the delete event. SSIS Logging will be utilized with the OnPreExecute and OnPostExecute events in the second method over the System.IO method of AppendText.
I have an application that is used on a bigscreen TV to show some stats and calender things. The application runs 24/7. It is not something that I want to spend lots of time on. After I made some changes to the application it started crashing every 12 hours or so. The time it took to crash seemed pretty consistent too. Just restarting the app would work but gets annoying after the second time. It wasn’t actually the app as a whole that crashed either. Just a few richtextboxes that change every 10 seconds that stopped updating. They were stuck.
This is just a quick post in case you run into this problem. This is an interesting error and it had a coworker worry about table corruption. This coworker connected to a database on a fairly new server, he then executed a query like the following SELECT * FROM SomeTable And here is the error message he got An error occurred while executing batch. Error message is: Invalid attempt to GetBytes on column 'BookDate'. Error: The GetBytes function can only be used on columns of type Text, NText, or Image. Then I decided to run the same query from my machine and it all worked without a problem. From here it is pretty easy since the problem must be with the client software. And after we checked the version of SSMS we noticed that he connected to the 2008 instance with a 2005 SSMS client. He then connected with SSMS 2008 and it all worked again. What is interesting is that if you use Query Analyzer then you don’t get an error and it just works
Switching to a new framework can be fun at times. This time I had a little problem with the Reportviewer. Report execution in the current AppDomain requires Code Access Security policy which is off by default in .NET 4.0 and later. Enable lagacy CAS policy or execute the report in the sandbox AppDomain. I like the and later part. Here is the printscreen, just in case you don’t believe me.
I’ve been using StructureMap 2.5x for some time, and I have been quite pleased with it. I’d read a bit about 2.6x, and the improvements to the registry DSL seemed cool but not quite cool enough to give me the motivation I needed to make upgrading the version used in my project a priority. A week or two ago, I found what proved to be my compelling reason. It’s a method called
We recently had a requirement to programatically create an entry in an existing Sharepoint calendar, so here is an example of how we went about doing this. I’ll be using Visual Studio 2008 for this, but the process will be similar for any other versions you are using. First of all, you will need to add a reference to one of the Sharepoint web references, so right-click your project and select Add Web Reference. You’ll then be presented with a screen that asks you for a URL for that web service, so go ahead and write it in the following format: