Datasheet
New datatypes
SQL Server 2005 supports several new datatypes:
⻬ varchar(max): This allows you to use sequences of characters greater
than 8000 bytes (8000 characters). The maximum size is 2GB.
⻬ nvarchar(max): This allows you to use sequences of Unicode characters
greater than 8000 bytes (4000 characters). The maximum size is 2GB.
⻬ varbinary(max): This allows you to use binary data greater than 8000
bytes.
Each of the preceding datatypes can be up to 2GB in size. This allows major
size increases in size compared to varchar(8000) and nvarchar(8000),
which were each limited to 8K.
SQL Management Objects (SMO)
SQL Management Objects (SMO) replaces Distributed Management Objects
(DMO), which were used in SQL Server 2000. SQL DMO applications run on
SQL Server 2005 but no updating of DMO objects took place for SQL Server
2005. Developers use SMO. However, applications created with SMO often
provide custom management tools for administrators.
SMO is faster than SQL Server 2000 DMO in many settings because each
object is only partially instantiated. For example, if you want to enumerate
what might be thousands of databases on a powerful server, you don’t need
fully instantiated objects to populate a tree view. You need only the object’s
name. Having partially instantiated objects saves a lot of time for commonly
used, simple tasks because you probably need a fully instantiated object for
only a small number of the total number of objects.
Scripting actions
If you have used Microsoft programs such as Access and Excel you’ll know
that you can create macros to allow you to automate certain tasks. SQL
Server 2005 now has a feature that automatically creates Transact-SQL
scripts from actions you take using the graphical user interface in SQL Server
Management Studio. You can use these scripts exactly as SQL Server
Management Studio creates them or you can modify them in ways to exactly
suit your intentions.
25
Chapter 2: New Features in SQL Server 2005
06_577557 ch02.qxp 12/20/05 9:43 PM Page 25