Thông tin tài liệu
SHOOTOUT: 3 BACKUP COMPRESSION TOOLS p. 43
A PENTON PUBLICATION
April 2008
DEBUG Your SSIS Packages p. 21DEBUG Your SSIS Packages p. 21
LINQ to Your SQL Server Data p. 17
DRILL DEEPER into
Plan–Cache Metadata
p. 34
Dissecting SQL Server’s
TOP WAITS p. 25
SET OPERATIONS
SQL Server 2005
SECRETS Revealed p. 27
DRILL DEEPER into
Plan–Cache Metadata p. 34
T-SQL 101, LESSON 2
INSERT, UPDATE, & DELETE p. 31
&
tY SQLS Dt
17
p. 12
SHARPEN YOUR SQL SKILLS
Surface Area
Con guration Tools
p. 37
—
—
—
—
—
——
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
COCO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
CO
O
O
O
O
O
CO
CO
C
C
C
LO
L
L
LO
LO
LO
LO
LO
LO
O
O
L
L
LO
O
O
O
O
O
O
OKOK
OK
OK
K
K
OK
OK
K
OK
OK
OK
K
OK
K
OK
OK
OK
K
K
K
K
OK
K
K
OK
K
K
K
K
K
O
K
K
K
O
K
K
O
OK
OK
O
O
O
O
O
U
U
UT
T
T
T
T
T
T
T
T
T
T
T
T
T
UT
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
OR
OR
OR
OR
OR
O
OR
OR
O
OR
OR
OR
OR
R
OR
OR
OR
O
O
OR
O
OR
O
OR
OR
O
OR
R
R
O
O
OR
R
R
R
R
R
O
O
O
O
O
O
O
S S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
OMOMOM
O
O
O
O
O
OM
OM
O
OM
OM
OM
OM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S
S
S
S
S
S
IN
IN
IN
I
IN
IN
IN
IN
N
IN
N
IN
N
IN
IN
IN
IN
IN
N
IN
N
I
I
IN
IN
I
IN
N
IN
I
IN
I
I
IN
I
IN
I
I
N
N
N
I
N
N
N
N
N
N
N
N
N
I
N
N
N
N
N
N
IN
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
IN
N
N
N
N
N
N
N
N
N
N
N
N
SI
SI
SI
SI
I
SI
SI
SI
I
I
I
I
SI
I
SI
I
I
I
SI
I
I
I
SI
S
SI
S
S
I
I
S
S
S
S
I
S
S
S
S
S
S
S
S
S
S
S
S
DE
DE
D
D
D
D
DE
DE
D
D
D
D
DE
D
DE
DE
DE
DE
DE
DE
DE
DE
DE
E
E
E
E
E
E
E
E
E
E
E
E
DE
E
E
E
E
D
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
!
O
N
N
NT
NT
N
N
NT
NT
NT
NT
NT
N
NT
N
NT
T
N
NT
NT
NT
N
T
E
ES
ES
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
S
T
T
T
T
T
T
T
T
T
T
T
T
T
T
DE
D
DE
DE
D
D
DE
DE
E
E
E
D
D
DE
DE
D
E
E
E
D
E
E
T
T
T
T
T
T
T
T
TA
T
T
T
T
T
T
T
PAY UP TO
72% LESS
FOR YOUR
BUSINESS
INTELLIGENCE
* 72% claim based upon a comparison of list prices of typical Business Intelligence offerings from leading hardware manufacturers versus Dell/
Microsoft combined offerings. Benchmarked systems confi gured with 4-5 TB of data storage, database application software, and Business
Intelligence analytic software. Dell is a trademark of Dell Inc. ©2008 Dell Inc. All rights reserved.
Dell
™
, Microsoft
®
, and AMD can help reduce the cost and complexity of
Business Intelligence. Our systems are quick to install, easy to manage,
and built with standard components that work with what you already
use—all for up to 72% less per terabyte than the competition.*
SIMPLIFY YOUR IT AT DELL.COM/SQLBI
© 2008 Embarcadero Technologies, Inc. All rights reserved.
21
Number of silos in which your customer data resides.
Coincidentally, also the number of totally different
defi nitions you have for “customer.”
Embarcadero solutions help manage data
enterprise-wide, enabling you to build and
communicate an architecture of your data assets
so you always know what is what, and where it is.
With just one, everything gets simpler. You and
your business are empowered to use and reuse
reliable, relevant, and timely data across a range
of platforms and storage formats. Understanding
your data is fi nally possible, and getting a hold
of the metadata is the key. Standards can be
defi ned and enforced. Data redundancy is
eliminated. It’s no coincidence that the most
sophisticated solution is also the simplest.
See how one gets it done.
Call 415.834.3131 or visit www.embarcadero.com
defi nition
—
C
ontents
C
ontents
APRIL 2008 Vol. 10 • No. 4
WWW.S
Q
LMAG.COM
The Next Generation:
FEATURES
17
LINQ to Your SQL Server Data
—William Sheldon
Build ef cient queries using LINQ, which is
included in Visual Studio 2008.
21
Debugging and Logging in SSIS
—Erin Welker
Easily debug packages, Control Flow tasks,
and Data Flow tasks as well as log package-
execution information using the capabilities
in SSIS.
25
Dissecting SQL Server’s
Top Waits
—Andrew J. Kelly
It’s time to build on your knowledge of wait-
stat collection and reporting. Let’s focus on a
few wait stats that typically account for most
overall system waits.
27
Set Operations
—Itzik Ben-Gan
Circumvent unsupported logical phases,
work around SQL Server 2005’s lack of
INTERSECT ALL and EXCEPT ALL, and
take advantage of the INTERSECT and
EXCEPT operations’ treatment of NULLs.
EATURES
EATURES
12
—Michael Otey
Take a tour of the new features and
functionality in Visual Studio 2008.
—Michael Otey
Take a tour of the new features and
functionality in Visual Studio 2008.
Visual Studio
2008
MORE ON THE WEB
Visual Studio 2008
Bridges Dev and IT
—Karen Forster
Microsoft Senior VP
S. Somasegar candidly
discusses data-enabled
features of Visual Studio,
including LINQ and the
Entity Data Model, and
how Visual Studio sup-
ports SQL Server as a data
platform.
InstantDoc ID 98342
31
T-SQL101, Lesson 2
—Bill McEvoy
Learn how to create T-SQL queries that
insert new data, update existing data, and
delete old data by using a database named
MyDB, a table named MyTable, and some
dummy tables.
34
Further Explorations in
Plan-Cache Metadata
—Kalen Delaney
Uncover more valuable metadata that
can aid you in troubleshooting and
performance-tuning your queries.
37
Sharpen Your Basic
SQL Server Skills
—Pinalkumar Dave
Get answers to your questions about SQL
Server 2005 Surface Area Con guration
tools, and learn how to lower the risk of
a security breach.
39
Data Warehousing: Horizontally
Partitioning the Fact Table
—Michelle A. Poolet
Save yourself from having to deal with
large, dif cult-to-manage fact tables by
partitioning the rows.
M
V
Vi
[...]... two FILENAME entries, replace C:\Program Files\ Microsoft SQL Server\ MSSQL.1\MSSQL\DATA\ LEARNING PATH SQL SERVER MAGAZINE RESOURCES “T -SQL 101, Lesson 1,” InstantDoc ID 97724 SQL Server Magazine • www.sqlmag.com MyDB.mdf with a valid path on your server Run the query to create MyDB To create MyTable and the dummy tables, copy the code in MyTable .sql into the query window and execute it Before working... KIMBERLY L TRIPP SQLSKILLS.COM SQLSKILLS.COM SQL SERVER MAGAZINE CONNECTIONS CONFERENCE CO-CHAIR SQL SERVER MAGAZINE CONNECTIONS CONFERENCE CO-CHAIR > > 100+ EXPERT SPEAKERS 150+ SESSIONS UNPARALLELED WORKSHOPS DYNAMIC CONTENT HOT LOCATION EXCITING ANNOUNCEMENTS www.DevConnections.com • 800-438-6720 • 203-268-3204 10 SQL SERVER Top w 2008 e NDeveloper Features By Michael Otey SQL Server has always... XML, BULK SQL etc Selectively recover data without a backup 26 April 2008 ApexSQL s o f t w a r e www.apexsql.com or phone 866-665-5500 SQL Server Magazine • www.sqlmag.com FEATURE SQL Server 2005 tips S et operations are fundamental operations in set theory that let you unify sets, figure out the intersection of sets, and determine which elements appear in one set but not the other SQL Server 2005... Edit rules in a powerful IDE with Intelliprompt 20 April 2008 ApexSQL www.apexsql.com s o f t w a r e or phone 866-665-5500 SQL Server Magazine • www.sqlmag.com FEATURE Debugging and Logging in SSIS Use breakpoints and checkpoints to more efficiently debug packages I t’s been more than two years since SQL Server 2005 shipped with SQL Server Integration Services (SSIS) However, many companies still haven’t... 2008 AND SQL SERVER Visual Studio has always featured tight integration with SQL Server Microsoft continues this trend by offering no less than three different editions of SQL Server 2005 with Visual Studio 2008 First, both the Visual Studio 2008 Professional and Standard editions include new support for the SQL Server Compact Edition 3.5 Designed primarily for mobile applications, the SQL Server Compact... internationally He manages the Israeli SQL Server Users Group, is a SQL Server MVP, and is the author of the Inside Microsoft SQL Server 2005: T -SQL series (MSPress, 2006) M MORE on the WEB Download the Web listings and see the Web tables at InstantDoc ID 98159 INTERSECT ALL and EXCEPT ALL ANSI SQL supports two versions of each set operation—a DISTINCT version and an ALL version SQL Server 2005 implements both... tables with the MyDB sql and MyTable .sql files You can download these files by going to www.sqlmag.com, entering 98105 in the InstantDoc ID text box, and clicking the 98105 zip hotlink After you’ve downloaded and unzipped the 98105.zip file, open a query window in either SQL Server 2005’s SQL Server Management Studio (SSMS) or SQL Server 2000’s Query Analyzer and copy the code in MyDB .sql into the window... SQL Server 2008 provides a new SQL Server Relational Engine provider that enables PowerShell scripts to access SQL Server database objects In addition, a new SQL Server Policy Management provider enables you to use PowerShell to manipulate SQL Server s new policy-based management framework 10 AD VE RT ISIN G SU PPL EM EN T s pons ored by D E L L FEATURE LINQ to Your SQL Server Data Efficiently build... source for the datagrid The resulting grid (shown in Web Figure 1—www.sqlmag.com, InstantDoc ID 98205) doesn’t support editing or adding entries at runtime Instead you have created the functional equivalent of a T -SQL statement in which the results have been assigned to a data set SQL Server Magazine • www.sqlmag.com LINQ TO YOUR SQL SERVER DATA Adding Rows to the Grid FEATURE LISTING 1: Modifying the... full-featured in-process relational database The SQL Server Compact Edition can be freely distributed with your applications In addition, like the earlier Visual Studio 2005 release, both the Visual Studio 2008 Professional and Standard editions include the SQL Server 2005 Express edition as an optionally installed component Like the full blown version of SQL Server, SQL Server Express runs as a background service . Web site strategic editor, SQL Server Magazine SQLMAG.COM Community Dialog Readers talk back to community dialog 8 April 2008 SQL Server Magazine • www.sqlmag.com Make SQL Mag Bigger! Reader Mark. with SQL InstantDoc ID 98019 12 April 2008 SQL Server Magazine • www.sqlmag.com COVER STORY Michael Otey (motey@sqlmag.com) is technical director for Windows IT Pro and SQL Server Magazine . CLARK MICROSOFT KEYNOTE SPEAKERS PAUL RANDAL SQLSKILLS.COM SQL SERVER MAGAZINE CONNECTIONS CONFERENCE CO-CHAIR KIMBERLY L. TRIPP SQLSKILLS.COM SQL SERVER MAGAZINE CONNECTIONS CONFERENCE CO-CHAIR CONFERENCE
Ngày đăng: 28/03/2014, 14:20
Xem thêm: SQL Server Magazine pptx