Lost Password? No account yet? Register
Home arrow Howto's
The Most $100k+ Jobs. Over 30,000 new open positions monthly. Sign up now with TheLadders.com. Find 70,000 Jobs that pay over $100,000 � Search now at TheLadders.com
Howto's
Networking Basics: Part 14 - Security Groups PDF Print E-mail
Written by David Noel-Davies   
Thursday, 06 December 2007

In the previous article, I showed you how to create security groups in Windows Server 2003. When I walked you through the process though, you might have noticed that Windows allows you to create a few different types of groups, as shown in Figure A. As you might have guessed, each of these group types has a specific purpose. In this article, I will explain what each type of group is used for.

Register to read more...
 
Networking Basics: Part 13 - Creating Groups PDF Print E-mail
Written by David Noel-Davies   
Thursday, 06 December 2007

In the previous article in this series, I showed you how to use the Active Directory Users and Computers console to create and manage user accounts. In this article, I want to continue the discussion by teaching you about groups.

In a domain environment, user accounts are essential. A user account gives a user a unique identity on the network. This means that it is possible to track the user’s online activity. It is also possible to give a user account a unique set of permissions, assign the user a unique e-mail address, and meet all of the user’s other individual needs.

Register to read more...
 
Networking Basics: Part 12 - User Account Management PDF Print E-mail
Written by David Noel-Davies   
Thursday, 06 December 2007

In the previous part of this article series, we began discussing the Active Directory Users and Computers console. Although that article explained how to connect to the domain of choice using the console, it never actually explained how to use the console for day-to-day management tasks. In this article, we will show you some basic techniques for user account maintenance.

Register to read more...
 
Nondeterministic Row Numbers PDF Print E-mail
Written by David Noel-Davies   
Monday, 03 December 2007

The row_number function is an extremely powerful tool that I use to simplify and optimize solutions to many
problems. Occasionally I needed to calculate nondeterministic row numbers where order didn’t matter. For
example, suppose you have the following t1 table:

set nocount on;use tempdb;goif object_id('dbo.t1') is not null  drop table dbo.t1;gocreate table dbo.t1(col1 varchar(10) not null);insert into dbo.t1(col1) values('c');insert into dbo.t1(col1) values('a');insert into dbo.t1(col1) values('b');insert into dbo.t1(col1) values('a');insert into dbo.t1(col1) values('b');insert into dbo.t1(col1) values('b');insert into dbo.t1(col1) values('c');insert into dbo.t1(col1) values('a');insert into dbo.t1(col1) values('b');insert into dbo.t1(col1) values('a');go

You need to return all rows from t1 along with unique incrementing row numbers in no particular order. If
order doesn’t matter, of course you can always specify an existing column from the table in the row_number
function’s order by clause:

select col1, row_number() over(order by col1) as rownum

from dbo.t1;

However, the execution plan for the query would involve sorting (or an index order scan if an index exists on
the sort column). Here’s the plan you get for the above query:

  |--Sequence Project(DEFINE:([Expr1004]=row_number))       |--Compute Scalar(DEFINE:([Expr1006]=(1)))            |--Segment                 |--Sort(ORDER BY:([tempdb].[dbo].[t1].[col1] ASC))                      |--Table Scan(OBJECT:([tempdb].[dbo].[t1]))

If the order of the row numbers doesn’t matter to you, you’d probably rather not pay the sort penalty. The
problem is that SQL Server doesn’t allow a constant in the row_number function’s order by clause. Try running
the following query:

select col1, row_number() over(order by 0) as rownumfrom dbo.t1;

And you will get the following error:

Msg 5309, Level 16, State 1, Line 1Windowed functions do not support constants as ORDER BY clause expressions.

Until recently, in order to avoid sorting I defined a table expression (CTE or derived table) based on a query
that returns the table rows along with a constant (call it const). In the outer query I invoked the row_number
function with order by const:

with c as(  select col1, 0 as const from dbo.t1)select col1, row_number() over(order by const) as rownum

from c;

Here, the optimizer is smart enough to realize that sorting is not required. Here’s the plan I got for this query
(notice there’s no sort operation):

  |--Sequence Project(DEFINE:([Expr1005]=row_number))       |--Compute Scalar(DEFINE:([Expr1007]=(1)))            |--Segment                 |--Table Scan(OBJECT:([tempdb].[dbo].[t1]))

Even though this technique avoids sorting, it is a bit awkward. Recently I got a tip from a T. Wong how to
achieve the same thing without the need for a table expression—simply specify order by (select 0)!

Here’s the solution query with the new technique:

select col1, row_number() over(order by (select 0)) as rownum

from dbo.t1;

It is much more elegant than the previous technique, and also here the plan shows that the optimizer realized
that sorting is not needed:

  |--Sequence Project(DEFINE:([Expr1006]=row_number))       |--Compute Scalar(DEFINE:([Expr1008]=(1)))            |--Segment                 |--Compute Scalar(DEFINE:([Expr1005]=(0)))

                      |--Table Scan(OBJECT:([tempdb].[dbo].[t1]))

Last Updated ( Monday, 03 December 2007 )
 
Outlook Performance: Cached and Uncached PDF Print E-mail
Written by David Noel-Davies   
Monday, 03 December 2007

On April 13, Microsoft released an update for Microsoft Office Outlook 2007 that addresses performance problems with large mailboxes. The Microsoft article "Description of the update for Outlook 2007: April 13, 2007" describes what the patch fixes. I regularly use three different Outlook 2007 profiles against three different Exchange Server organizations, and I've occasionally noticed poor performance on one particular server. I eagerly installed the patch and found that, as promised, it helped improve the performance of Outlook 2007 on that server. However, I decided to experiment a bit and found an even more dramatic improvement from doing something that I'd never done before: I turned off Cached Exchange Mode.

Read more...
 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 37 - 45 of 118

Related Items