Tag: sql server

Community

Attach and Detach..Again

(Andy Warren) Attaching and detaching databases has got to be one of the handiest features in SQL7/2K. It worked well enough in SQL7, but SQL2K added a nice interface in Enterprise Manager to let you browse the file structure and pick the files you needed – a great time saver compared to typing in t

Community

Counting rows in a subtree

(Rudy Limeback) There is a table called User (userID PK, userName, supUserID FK). SupUserID refers to userID and contains the userID value of the user’s superior. The highest user has no user superior to itself (NULL instead of a value) and can have under itself one or more users or no users at all.

Community

Random Sampling in T-SQL

(Brian Connolly) Whether you’ve got a gargantuan data warehouse, a huge transaction database, or a smaller workgroup database or data mart, it’s not uncommon to want to “sample” your data. Although selecting a random sample of rows isn’t a natural SQL operation, over the years, SQL Server profession

Community

Measuring SQL Performance

(Christoffer Hedgate) One thing that often amazes me is that many SQL Server developers do not actually measure the performance of their queries. When you are working with a small site or home project you might not see a big difference, but when implementing systems with large amounts of users and h

Community

Object Ownership and Security

(Kalen Delaney) Ownership chaining, which I described in “Crossing the Line: Ownership Chains” (February 2004, InstantDoc ID 40963), offers a limited way to specify what context a particular executable module should use when being executed. The context depends on the owner of the module and the iden

Community

SQL Server Failover Clustering

This chapter introduces Microsoft® SQL Server™ 2000 failover clustering, which is available only in SQL Server 2000 Enterprise Edition. It describes single instance failover clustering (active/passive) as the recommended approach for the Office Solution Accelerator for Intranets. This chapter also d