Data Management:
A while back I wrote, “To SA or not to SA”. That blog touched my security side that I take very seriously in my database server landscape. I’m glad to have seen so many read the blog in hopes it brought attention to the SA account where it may have been overlooked. In a reply to one of the comments I touched on another d (Read More)
Data Management:
When the collation of your user database does not match the collation of TempDB, you have a potential problem. Temp tables and table variables are created in TempDB. When you do not specify the collation for string columns in your table variables and temp tables, they will inherit the default collation for TempDB. Whenev (Read More)
Data Management:
Collations control how strings are sorted and compared. Sorting is not usually a problem because it does not cause collation conflicts. It may not sort the way you want it to, but it won't cause errors. The real problem here is when you compare data. Comparisons can occur several different ways. This can be a simple co (Read More)
Data Management:
With SQL Server versions prior to SQL2005, the only way to store large amounts of data was to use the text, ntext, or image data types. SQL2005 introduced new data types that replace these data type, while also allowing all of the useful string handling functions to work. Changing the data types to the new SQL2005+ equiva (Read More)
Data Management:
I believe I have discovered a deadlock situation that SQL Server is not able to detect, so a perpetual block occurs.A deadlock is nothing more than mutual blocking. Blocking is when a process is forced to wait for a resource while another process exclusively accesses it (where the exclusivity is managed through locks). Mutu (Read More)
Data Management:
I’ve found that many companies find out what true Disaster Recovery is only in the presence of a true disaster. Obviously this is not a very optimal time to start thinking about what could have done to keep the money flowing through the veins of the company. In the near future I will be writing a series based around DR. (Read More)
Data Management:
When you use an undocumented stored procedure, you run the risk of not being able to upgrade your database to a new version. What's worse... you could have broken functionality and not even know it. With undocumented stored procedures, Microsoft may not document when they decide to deprecate it, so you may not know about (Read More)
Data Management:
The countdown to PASS has officially reset. Good news is we have under 365 days to go until the next PASS. Bad news is we have just under 365 days to go. It’s been great watching the tweets and laughs going back and forth from new friendships made there this year. Although I didn’t have the chance to make it to PASS thi (Read More)
Data Management:
Best Practice: coding SQL Server triggers for multi-row operationsThere are many forum posts where people code triggers but these triggers are coded incorrectly because they don't account for multi-row operations. A trigger fires per batch not per row, if you are lucky you will get an error...if you are not lucky you will n (Read More)
Data Management:
There can only be one clustered index per table because SQL Server stores the data in the table in the order of the clustered index . When you use a UniqueIdentifier as the first column in a clustered index, every time you insert a row in the table, it is almost guaranteed to be inserted in to the middle of the table. SQL (Read More)
Data Management:
I am writing this blog as an introduction to matrixes. In SQL Server 2005, Reporting Services has two main controls, tables and matrixes. Tables, however useful, only expand vertically. Matrixes, however, expand both horizontally and vertically, giving you a different view of data. A good set of data to view in a matrix (Read More)
Data Management:
By definition, primary keys must contain unique data. They are implemented in the database through the use of a unique index. If there is not already a clustered index on the table, then the primary key's index will be clustered. It's not always true, but most of the time, you want your primary keys to be clustered becau (Read More)
Data Management:
Column names (and table names) should not have spaces or any other invalid characters in them. This is considered bad practice because it requires you to use square brackets around your names. Square brackets make the code harder to read and understand. The query (presented below) will also highlight columns and tables w (Read More)
Data Management:
Last week I wrote that SQL Server 2008 R2 Editions pricing has been announced, Microsoft today made availabe for download the SQL Server 2008 R2 November CTP. SQL Server 2008 R2 November CTP is available today for MSDN and TechNet subscribers and it will be available to the general public on November 11thGo to http://www.mi (Read More)
Data Management:
There are several string data types in SQL Server. There are varchar, nvarchar, char, and nchar. Most front end languages do not require you to identify the length of string variables, and SQL Server is no exception. When you do not specify the length of your string objects in SQL Server, it applies its own defaults. Fo (Read More)