|
|
|
|
Checking out SQL Server via empirical data points
Browse by Tags
All Tags » Best Practices (RSS)
-
How do you set up linked servers in your QA environment? You set them up the same as you do in the production environment, right? Why even ask? Correct. There is no difference in the actual steps of setting up a linked server between your QA and prod. Read More...
|
-
Lookup tables are widely used in database applications for good reasons. Usually, a lookup table has a small number of rows and looking it up with a join is fast, especially when the table is already cached. Recently, I needed to update every row in many Read More...
|
-
When you have some data on a SQL Server instance (say SQL01) and you want to move the data to another SQL Server instance (say SQL02) through openquery(), you can either push the data from SQL01, or pull the data from SQL02. To push the data, you can Read More...
|
-
In an earlier post , I highlighted that linked server security configuration can have a huge performance impact, and complained that this was not properly documented in SQL Server Books Online and filed a Connectitem for this. Good news is that in Books Read More...
|
-
I have written a lot of throw-away scripts, some of which were written to control the execution of a large number of SQL scripts. The logic of these control scripts is often simple, but their execution can last for a long time (e.g. hours). When writing Read More...
|
-
Recently, I got into some discussions on deprecating stored procedures from the production environment. If you want to remove a proc from your production database, what are the steps you take to accomplish that? The act of actually removing a proc from Read More...
|
-
It’s a well known good practice to control the batch size when you perform large data changes. For instance, you may need to purge a large amount of data monthly, and if you delete them all in one shot, you may blow up your transaction log. Therefore, Read More...
|
-
Sometimes, when you kill a session (i.e. a spid) in a SQL Server instance, the spid just refuses to go away not because it’s doing a rollback. Perhaps, it’s stuck on a certain dependency on something external to SQL Server or it’s just simply stuck for Read More...
|
-
It’s common to see a client application referencing the hostname of a SQL Server instance in its connection string. For instance, assume that you have a server whose hostname is NYCSQL01, and you install a default SQL Server instance on it. Naturally, Read More...
|
-
In SQL Server, it is rather handy to retrieve data from a different SQL Server instance and use the result locally in another SQL statement for further processing. In theory and in the set purists’ fantasy land, it shouldn’t matter where you get your Read More...
|
-
Is it better to move data to procedures or move procedures to data? The answer is, of course, “it depends.” Let’s consider a scenario where you have two SQL Server instances: ServerA and ServerB, and you have a procedure on ServerB (call it procB), but Read More...
|
-
Aaron Bertrand has been writing an excellent series about Bad habits to kick , highlighting some of the bad practices, primarily, in the areas of T-SQL coding. I’m going to steal his idea and comment on the bad practices I have seen in managing databases. Read More...
|
-
I posted the following SQL Server challenge yesterday: Describe a reproducible workload that would see significant throughput improvement when trace flag 1118 is enabled. In response, Konstantin Korobkov wanted to know whether the number of data files Read More...
|
-
Here is a SQL Server challenge as I have failed so far: Describe a reproducible workload that would see significant throughput improvement when trace flag 1118 is enabled. I have seen a lot of chatters, anecdotes, and stories on the impact of trace flag Read More...
|
-
SQL Server can run in one of two modes: thread mode or fiber mode. By default, SQL Server runs in thread mode in which a SQL Server worker is associated with a Windows thread throughout all phases of its execution. This can be changed with the sp_configure Read More...
|
|
|
|
|
|