?????????? ?????????? ????? ????????? ????? ?????? ??????? SQL Server, ????????? ????????? ????? ??????????????? ??? ??????. ????????? ??????, SQL Server 2008, ???????? ????????? ????? ??????? ? ????????????, ??????????? ?????????? ?????????????????.
?????????????? ??? ??????, ???????????? SQL Server? 2005 ???-???? ?????, ????????? ????????? ???????, ???????????? ? ?????????? ??????, ?? ?????? ??? ????? ?????????, ??? ??? ???????? ???????? ???????? ? SQL Server 2008. ????? ???????????, ?????????? ?? ???????????? ????????, ????????? ????????? ?????????? ???????? ????? ??? ????????, ??????? ????? ??????????? ??? ????????????? ????????? ??????? ? ??????? ?????? ??? ??????.
????? ??????? SQL Server 2008 ???????? ??????? ???????? ????? ??????? ???? ??????, ??? ????????? ?? ?????????????. ??? ?????????? ??????? ?? ????????? ???????? ? ?????, ??? ? ????????? ????????? ????????? ??????, ?????? ? ????? ??????? X ? ????????? Y, ????? ??? ???? ????????? ? ????????? Z. ??? ?????? ???????????, ?? ??????? ??????, ??? ?????? ???? ???????? ????? ????.
? ???????, ??? ??????????? ?? ????? ?????? ????? ????????? ????????? ???? ???????, ?? ? ????????? ????????????????? ????? ??????? ?? ????????? ????? ??????????: ??????????, ????????????????, ??????????????????, ??????? ???????????, ????????????, ?????????? ? ??????-?????????.
??? ??????????????? ??? ?????? (?????, ??? ?) ?????????????? ??????? ?????????? ?????? ?????? SQL Server 2008 ????? ???????? ?????????. ????? ?????????? ??????????, ??????????? ?????????? ???????? ???????, ??????? ???????????? ? ??????? ??????/ ????????? ?????????? ????????????? ????? ?????? ??????????? ??? ??????????????? ??? ??????, ??????? ????? ???????????? ?? ?????????? ???????? ? ???????? ??????? ??? ?????? ? ??????? ??? ???????? ??? ?????? ?? ???????? ??? ???? ?????? ????????.
??????? ?????????? ?????????? SQL Server 2008, ??????? ?????????? ???????? ????????????? ?????????? (DMF ? Declarative Management Framework) ? CTP-???????, ????????? ????????? ? ????????? ???????? ???????????? ??? ?????? ??? ?????????? ???????? ??? ??????. ??? ???????? ???????????? ?????????? ?????????? ??????????? ???????????? ?? ???? ??????? ???????? ? ????? ??????. ?????? ???? ??????? ??????? ?? ???. 1.
??? 1 ???????? ???????????? ?? ?????????? ?????? ?????? ? ????????
???????? ????????? ?? ?????? ????????????????? ?????? ????????. ?????? ?????? ???????? ????????? ?????????? ???????????? SQL Server 2008 ? ?????? ???????, ???????? ????? ?????????. ?????? ???????? ?????????????? ??????? ??? ???????? ????????. ??????? ? ??? ????????, ??????????? ??? ??????? ???????, ?????????? ???????????? ??? ?????? ???????, ???????????? ? ?????? ???????.
????????? ????? ???????? ????????, ???????????? ??? ???????? ????????. ???????????, ???????? ?????????? ????????? ?????? ??? ???????????? ???? ??????. ? ???? ?????? ????? ??????? ???????, ?????????? ??? ???? ??????, ? ????? ???????? ??? ??????? ? ????????. ????? ????? ???????? ????? ??????????? ?????? ? ?????? ???? ??????. ???????? ???, ?????????? ?????????? SQL Server 2008 ????? ?????????? ???????, ?? ???? ?? ?????????? ??? ????????????, ?? ?????????, ??? ??? ?????????? ???????? ???????.
????? ??????????? ?????????????? ?????????? ???????? ? ??????? ???????????? ?????? ??? ????????????? ?????????????? ?????????? ???????? ? ?????????? ????????. ????? ???????????????? ??????? ? ????? Management Studio, ? ????? ?????????? ?? ? ??????? ?????????????. ??? ????????????? ?????????? ???????? ??? ??????? ??? ???? ???????? ? ????????????? ?? ??????? ?????? ???????? ?????? ??????? ???? ? ????????? ????????? ????????.
?????????????? ????????????? ???????? ??????????? ????????? ???? ??????? ??? ???????? ?????? ?????? ??????????? ??? ??????? ??? ??????????? ??????? ??????????? ? ???? ??????? ?????. ????? ????? ???????, ????? ?? ????? ??????? ? ??? ?????? ???????? ?????? ???????????, ????? ???????? ?????????? ??? ????????? ????????. ??????????? ?????????? ?????????????????? ???????? ?? ??????? ????????????, ? ?? ? ????????? Management Studio ???????? ??????? ?????????????.
?????? ????? ??????????????? ???????? ?????????? ???????? ??????? ??????. ??????????????? ??? ?????? ????? ????????? ???? ?????? ?????????? ?? ???????? ????? ????????, ? ?????? ?????????????? ??????? ??????????? ??????? ??? ?????????? ????? ????????. ??????? ?????? ? ??? ?????????? ????????, ?????????? ?????? ????? ??????, ??????????? ? ??????????. ?? ????????? ???????????? ????? SQL Server ? ?????? SQL Server Integration Services (SSIS) ??? ???????? ????????? ??? ????? ? ?????????? ??????, ???????????? ??????????? ????????? ??????, ?????? ? ??????? ??????? ????? ??????.
? ??????? ?? ??????? ????????? ????????????? ? ???????????????? ??????? ??????? ?????? ????? ?????????? ??????? ??????????? ??????????????? ??? ??????, ????????? ?? ?????????? ????? SQL Server Agent ? ?????? SSIS ??? ???????? ?????? ??????? ? ??????? ??? ????????? ???????????, ????? ? ???????? ?????? (??? ???????? ?? ???. 2). ????? ?????????? ?????? ? ???????????????? ?????????, ??????? ?????????? ?????????? ??????????, ??? ????? ??????????????? ? ??????????????????? ? ??????? ?????? ?????????? T-SQL ? ??????? ????? SQL Server 2008 Reporting Services. ??? ???????????????? ????????? ?????? ??????????? ???????? ?????? ? ???????? ????? ??????????? ?????????? ????? ???? ??????.
??? 2 ???? ??????? ????????????? ????????? ???????????? ???????? ??????
?? ??????????? ??????????? ??????????????? ??? ?????? SQL Server ?????? ?? ???? ??? ?????? ????????? ?????????????. ? ??????????? ??????? ????? ???? ?????? ????????? ????? ??????? ? ???????? ??? ??????????? ????????????????, ??????????? ??? ??????????? ???????????. ? SQL Server 2008 ????????? ????????? ????? ???????, ??????? ????? ? ???? ??????.
SQL Server 2008 ????? ?????????? ??????? ??????, ??????????? ??????? ????? ???? ?????? ? ???????? ??????????, ????????? ? ??????????????? ????? ??????. ? SQL Server 2005 ????????? ??????????? ?????? ?????? ?????? ??? ???????? ?????, ????????? ?????? ??? ??????, ?? ??? ????? ?????? ?????? ?????????? ??????????? ?????? ???????? ??????? Windows? NTFS. ? SQL Server 2008 ????????? ?????? ?? ?????? ????? ? ???????, ??????? ????????????? ????????????, ??????????? ??? ?????? ?? ?????? ?????? ??????.
?????? ?? ?????? ????? ? ??????? ????????? ??????????? ???????????? ??????, ? ????? ??????????? ?????? ??????, ????????? ?????? ? ?????? ???????? ???????. ?????? ?????? ? ?????? ????????? ????????? ????????????? ??????, ??? ??????? ??? ???????????????? ????????? ??????.
? SQL Server 2008 ????? ????????? ?????? ?? ?????? ????????? ?????. ???? ??? ????????? ??????????? ???? ?????? ????????? ?????? ????????? ????? ???????? ????? ???? ??????, ??? ???????????? ????????????? ????? ???????? ??? ???? ???????? ???????? ?????????? ????????????. ? ?????? ??? ?????? ? ??????????? ??????? ????? ????????? ????? ??????? ????????? ???????? ??? ????????? ????? ????? ???????? ?????? ???????? ????????????, ??????? ????? ?????????????? ????? ??????????. ???????????? ??????????????? ??? ?????? ??????????? ?????? ?????? ????????? ????? SQL Server 2008 ??????????? ????? ????? ????????????, ????? ??? ????? ?????????????? ??? ???????? ??????.
????? ???????? ????????? ????????. ??? ????? ??????? ????????? ?????????? ????? ????????, ??????? ????? ?????????????? ?????????? ???????? ?????????? ??? ???????? ??????? ???????? ?? ????? ??????????. ????????? ???????? ????????? ????????? ?????, ? ??????? ?? ????? ??????? ???????????? ????????? ????????? ??????? ???????? ??? ????????? ????, ??? ???? ??? ????????? ???? ???????? ??????? ?????????? ??????? ??? ???????? ?????????????????? ?????? ??????? ????????.
???????????? ???? ??????? ??????????? ? ???, ??? ??? ???????????? ??????????? ????? ???????????? ????????????? ?????? ?????? ????????, ????????? ?? ???????? ??? ??????. ?? ???. 3 ??????? ?????? ????????????? ?????????? ???????? ??? ??????????? ???????? ?? ???????.
????3?Limit activity with the Resource Governor
USE master go --Drop function IF OBJECT_ID('rgclassifier_demo','Function') IS NOT NULL DROP FUNCTION rgclassifier_demo go --Create a classifier function for report group CREATE FUNCTION rgclassifier_demo() RETURNS SYSNAME WITH SCHEMABINDING AS BEGIN DECLARE @group_name AS SYSNAME IF (USER_NAME() LIKE '%Launch_Demo%') SET @group_name = 'demogroup' RETURN @group_name END GO --Drop workload group for anything coming from Management Studio IF EXISTS (SELECT name FROM sys.resource_governor_workload_groups WHERE name = 'demogroup') BEGIN DROP WORKLOAD GROUP demogroup END GO --Create workload group CREATE WORKLOAD GROUP demogroup GO --Register the classifier function with --Resource Governor ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION= dbo.rgclassifier_demo) GO --Alter the dbogroup workload group to only --allow 10% of CPU for each workload request ALTER WORKLOAD GROUP demogroup WITH (REQUEST_MAX_CPU_TIME_SEC = 10) GO --Create a new resource pool and set a maximum CPU limit for all workloads. IF EXISTS (SELECT name FROM sys.resource_governor_resource_pools WHERE name = 'pooldemo') DROP RESOURCE POOL pooldemo GO CREATE RESOURCE POOL pooldemo WITH (MAX_CPU_PERCENT = 40) GO --Configure the workload group so it uses the --new resource pool. ALTER WORKLOAD GROUP demogroup USING pooldemo GO --Apply the changes to the Resource Governor --in-memory configuration. ALTER RESOURCE GOVERNOR RECONFIGURE GO
SQL Server 2008 ??????????? ????? ?????????????????? ??? ??????. ????????? ?????????? ????? ????????, ?????????????? ? SQL Server 2008, ????????? ??????????? ?????????? ? ?????????? ?? ??????????????????? ??? ?????? ? ??????????, ??????? ??????????? ?? ???.
??? ??????? ????????? ??????????, ??????????? ?????? ???????, ??????????, ?????? ???????????? ?? ??? ?????????? ???? ??????????, ????? ????? ?????????? ??????????? ?? ?????????????????? ?????????? ???? ??????. SQL Server ???????????? ?????????? ?????? ????? ??????????, ??????????? ?????????, ????????? ?????????? ????????? ?????????? ?????? ????? ? ??????? ?? ??????? ?????????? ?????? ??????. ?? ????? ????????, ??? ????? ?????????? ?????????? ????? ???????? ????????. ????????, ???? ?????????? ????? ??????????? ??? ??????? ? ?????????????? ?????? ?????? ?????????? ? ???.
SQL Server 2008 ???????? ? ?????????? ??????????????? ?????? (??????? ???????? ? SQL Server 2005), ???????? ???? SQL Server ????????? ?????????? ?? ?????? ?????? ?? ?????? ???????. ???? ????????????? ??????? ?????????? ????? ??????????? ??????? ?????? ?????????? ?????????? ? ???????? ? ?????????? ????? ? ????? ?????????? ? ???????.
SQL Server 2008 ?????????? ????????? ????? ????????? ??????????? ???????? ??? ?????????????? ??????? ? ????????????????? ?????????. ?????? ??????????? ???????? ????? ????????? ????? ???????? ? ??????? ??? ??, ??? ? ? ????????? ????????, ??????? ?????? ? ??????????????? ??????, ? ?? ? ?????????? ??????????????? ?? ?????? ??????.
? ?????????? ????????? ???? ??? ?????? ? ?????? ???????? ??? ?????? ??????????? ??????????? ??????????? ???? ??? ?????? ??????????? ???????????. ???????? ?????????, ???????????????? ????? ??? ?????????? ??????? ???????????, ??????????? ? SQL Server 2008. ?? ????????? ?? ???? ??????? ???????? ? SQL Server 2008, ????? ????, ????????? ????? ???????.
?????? SQL Server 2005 ???????? ????????? ??????????????? ???????????? ?????????? ??????????? ???? ?????? ??? ?????????? ??????? ???????????. SQL Server 2008 ????????????? ????????? ????????? ??????????? ??????????? ???? ??????. ????????, ????? ?????????? ??????????? ???? ?????? ?????? ????????? ? ????????? ??????? ??????????????????, ??????????? ? ???????? ?????? ??????? ?????????? ?? ???????? ??? ?????? ? ??????????. ? ?????? ????? SQL Server 2008 ?????? ????????? ????? ??????????, ???????????? ?? ???? ????? ????????? ?????????? ???????? ? ?????????? ??? ??????, ? ??????? ?????? ?????????? ?? ?? ???????? ? ?????? ?????????? ?????????? ???? ?????? ? ????? ???????? ??????.
?????? ??????? ??????????? ?????????????? ???????????? ??????? ?????? ?? ???????? ???????. ???? ? ???????? ???? ?????? ??????? ???????????? ???????? ??????, ????????????? ???????? 823 ? 824, ???????? ?????? ????? ????????? ??????? ????? ???? ??????? ?????? ? ?????????? ????????. ???? ?????? ??????? ??????? ?????? ? ?????????????????? ???????, ??????? ????? ??? ???? ?????????????, ???????????? ? ??? ????? ? ???????? ????? ??????.
?????? ????? ???????, ?? ? ?????????? ??????? ??????, ????????? ????????????? ?? ??????? ???? ?????? ?????????????? ??, ?? ????? ?? ??????????? ??? ??????, ??????????? ?? ???? ???????. ?????? ?????????? ?????, ??? ?? ? ?????????? ??????? ?????? ????? ????????? ???????????, ????????? ??????? ?????? ??? 64-????????? ???????? Windows Server? 2008 Enterprise Edition ? Datacenter Edition ??? ?????? ? ???????????? Itanium ? ??? ??? ????????? ?????? Enterprise Edition ??????? SQL Server 2008.
? SQL Server 2005 ????????? ???????????? ?????? ? ????? ?????????? ??????. ? SQL Server 2008 ?????????? ??????????? ???????? ????????? ???????? ???? ????? ???????: ??????????? ?????????? ??????? ? ?????????? ?????????? ??????.
??????????? ?????????? ??????? ???????????? ?????????? ????????? ??? ??????????? ?????????? ??????, ???????????? ? ?????????????? ?????????? ? ?? ?????? ? ????? ???? ??????, ?? ? ??? ?? ? ??????????? ??????? ????????? ????????????? ??? ? ?????????? ??????? ????????????.
?????????? ?????????? ?????? ???????????? ????? ??????? ???????? ?????????? ??????, ???????? ?????????? ???? ????????? ???? ??????, ? ?? ??????????? ??????? ? ?????? ????. ? ?????????? ??????????????? ?? ????????? ????????? ????????? ??????????? ????????? ????????? ???? ?????? ? ???? ?????????? ??? ?????????? ?????????? ?? ?????? ??????. ? ???? ?? ???. 4 ??????? ?????? ?????????? ???? ?????? ? ?????????? ??????????? ??????.
????4?Using Transparent Data Encryption
IF OBJECT_ID ( 'Demo_SpatialTable', 'Table' ) IS NOT NULL DROP TABLE Demo_SpatialTable GO --Create table to hold spatial data CREATE TABLE Demo_SpatialTable ( SpatialID int IDENTITY (1,1), SpatialInputCol geography, SpatialOutputCol AS SpatialInputCol.STAsText() ) GO --Insert data into table INSERT INTO Demo_SpatialTable (SpatialInputCol) VALUES (geography::STGeomFromText('LINESTRING(47.656 -122.360, 47.656 -122.343)', 4326)); INSERT INTO Demo_SpatialTable (SpatialInputCol) VALUES (geography::STGeomFromText('POLYGON((47.653 -122.358, 47.649 -122.348, 47.658 -122.348, 47.658 -122.358, 47.653 -122.358))', 4326)); GO --View data to see that data has been converted and stored in col2 SELECT * FROM Demo_SpatialTable
?????????????? ??? ?????? ? ?? ????????????, ???? ??????????????? ??????? ????????? SQL Server 2008. ???????? ??? ????? ???????, ??????????????? ??? ????????????? ??? ??????. ? ??? ????????? ????????? ????? ????????? T-SQL ??? ????? ???????????, ?????????? ????????????? ? ???????? ? ????????????? ???????? ??? ??????.
????????? ????????????? ??? ?????? ?????????? ????????? ????????, ??????????? ??? ???????? ??????, ??????? ?????????? ?? ???????????. ??, ????????, ??????? ?? ????????? LINQ (Language Integrated Query), ??????????? ????????????? ??? ?????? ????????? ??????? ? ????? ??????, ????????? ???? ???????????????? ?? ?????? Microsoft? .NET ?????? ??????? ?????????? T-SQL. SQL Server 2008 ???????? LINQ, ???????????? ?????? ?????????? LINQ to SQL, ??????? ????????? ????????????? ????????? ??????? LINQ ??????????????? ??? ???????? ? ?????? SQL Server. ??? ????????? ?????????? ???????, ???????????? ??? ???????? ????? ???????? ??????.
??? ?????????? ??? ??? ?????? ???????????? ?????????? ??????? ????? ???????? ??????, ?????????????? ? ?????????? ????????? ? ????????? ??? ??????. ??? ???????, ????? ?????????? ??????????, ???????????? ??????, ??????????? ??????????? ??? ??????, ??????? ???????????? ?? ????????? ????? ?????????????? ????????? ???????? ?????? ? ????? ???? ??????. ????? ????????? ADO.NET Entity Framework ????????? ????????????? ????????? ??????? ??? ?????? ? ??????? ???? ?????????. ??????????????? ??????? ????????? ???? ?????? ????????? ????????? ?????????????????? ?????????????.
SQL Server 2008 ???????? ????????? ????????? ????????? T-SQL, ??????????? ????????? ?????????????????? ?????????????. ? ???????? ??????? ????? ???????? ????? ?????????? MERGE, ??????? ????????? ????????????? ????????? ????????????? ?????? ?? ?? ???????. ??? ????????, ?????????????? ?? ?????????? ?????????? INSERT, ???????????? ??????????? ?????????? ??????. ?????? ?? ????????? ????????? ??????? ?????????? ??? ?????????? ???????????? ? ??????? ????? ?????? ? ????? ??????????.
????? ????, ????????? ?????? ???? ? ??????? ?? ?????????? ???? ?????? ????-??????? ??????????? ????????. ? SQL Server 2008 ???????????? ??? ????????? ???? ?????? ??? ????????? ?????? ???? ? ???????. ????????? ???? ?????? ???????? ? ????????? ?????????????????? ??? ????????? ????????, ??? ????????????? ?????? ? ??????? ?????? ?? ????????? ??????????????? ?????????? ???????? ? ???????.
??? ???????? ????? ???????? ??? ?????? ???????????? ????? ??????????? ????????? ??? ?????????? ?????????? ?????????????. SQL Server 2008 ???????? ????????? ??? ???????? ? ??????? ????? ???????????????? ????? ??????. ??? ???????????????? ???? ??????, GEOGRAPHY ? GEOMETRY, ????????? ????????????? ????????? ??????, ??????????? ? ??????????, ??????????????? ? ???? ?????? ??? ????????????? ???????? ???? ????????? ?????? ? ???????, ??????????????? ??????????? ????? ??????. ? ???? ?? ???. 5 ??????? ?????? ??????? ???????????????? ???????.
????5?A simple spatial table
IF OBJECT_ID ( 'Demo_SpatialTable', 'Table' ) IS NOT NULL DROP TABLE Demo_SpatialTable GO --Create table to hold spatial data CREATE TABLE Demo_SpatialTable ( SpatialID int IDENTITY (1,1), SpatialInputCol geography, SpatialOutputCol AS SpatialInputCol.STAsText() ) GO --Insert data into table INSERT INTO Demo_SpatialTable (SpatialInputCol) VALUES (geography::STGeomFromText('LINESTRING(47.656 -122.360, 47.656 -122.343)', 4326)); INSERT INTO Demo_SpatialTable (SpatialInputCol) VALUES (geography::STGeomFromText('POLYGON((47.653 -122.358, 47.649 -122.348, 47.658 -122.348, 47.658 -122.358, 47.653 -122.358))', 4326)); GO --View data to see that data has been converted and stored in col2 SELECT * FROM Demo_SpatialTable
>???????????????? ????????? ????????????? ??? ?????? ? ??????? ???????? ?????????? ? ????????????? ??????? ???????? ????????, ????? ??? ????????? ? ????? ???????????. ?????? ???????????????? ???????? ???? ?????????? ?????? ??? ???? ??????, ? ? ???? ?????? ?????????? ?????? ????????? ?? ??????? ????. ?????? ??? ????????????? ????? ??????? ??? ??????????? ????? ????? ?????????? ??????? ?? ?????????? ?????????.? SQL Server 2008 ??? ???????? ???????? ? ??????? ?????? ???? ?????? FILESTREAM. ??? ????????????? ????? ???? ?????? ????? ????? ??????????? ?? ? ???? ??????, ?? ?????? ????????? ?????? ???? ?????? ??? ??????????? ??????????????? ??????????. ??? ????????? ???????????? ????? ???????? ????????, ???????? ???????????? ?????????????????? ? ???????????? ???? ??????.
?????????? ????????????? SQL ?? ????????? ????????? ??? ? ???????????? ??????? ??????????? ?????????? ????????? ??????-?????????. ??????????? ??????-????????? ???????????? ? SQL Server ? ??????, ?? ? SQL Server 2008 ??????? ??? ????? ???????.
????????, ??? ?????????? ?????? ? ?????????? ?????? ???????????? ????? ???????? ?? ???????? NULL. ???????, ? ??????? ????????? ???????? NULL, ???????? ???????????? ??????????? ??????????? ??????? ??????, ????????????? ? ???????. ??? ????????, ??? ??????? ? ???????? ???????? NULL ????? ???????? ????? ?? ????????????, ? ???????????????? ?? ????? ??????? ??????.
? SQL Server 2008 ????????? ??????????? ???????, ??????????? ????????? ???????? NULL, ?? ??????? ??????????? ???????????? ?? ?????. ????????? ??????????? ??????? ?? ???????? ???????????? ????????????, ?????? ??????, ?????????? ??????????? ???????, ????? ????????? ??????????? 1 024.
? SQL Server 2008 ????? ???????? ????? ????????, ???????????? ????????? ? ??????, ??? ?????????? ??????????? ???????????, ??????? ?????? ???? ????????? ? ????????? ??????. ??????????? ???????????? ? ?????????? ?????????? ?????? ? ?????? ?????? ?????????. ???????????? ???????????, ????????? ? ??????????? ?????? ? ??????? ? ????????????? ????? ???????? ????????? ????????? ?????????? ???????? ???????? ?????? ?? ???? ?????? ? ? ??????? ?? ????????????? ???????? ???????????????? ?????????? INSERT, ?????????? ?????????? ????????? ???????????? ????? ??????, ??????????? ?? ???????? ????????? ??????.
??? ????? ???? ??????? ????? ????? ???????????? SQL Server 2008. ? ???? ?????? ??????? ??????? ????? ????? ??????? ? ?????????? ???????????? ???????, ???????????? ?? ????????? ?????? ??????????????? ? ????????????? ??? ??????. ? ???????? ?????, ?? ????????????? ??????????? ?????????? ?????????????????? ? ???????????????? ??? ??????????? ??? ?????? ? ????????? ????????????.
Tags: bind, SQL, SQL Server, transparent