Отправляет email-рассылки с помощью сервиса Sendsay

MS SQL Server

  Все выпуски  

MS SQL Server - дело тонкое...


Информационный Канал Subscribe.Ru

#244<<  #245

СОДЕРЖАНИЕ

1.СТАТЬИ
1.1.Контроль VAS в SQL Server 2005
1.2.Обзор SQL Server 2005 для разработчика баз данных (продолжение)
2.ССЫЛКИ НА СТАТЬИ
2.1.Статьи на русском языке
2.2.Англоязычные статьи
3.ФОРУМ SQL.RU
3.1.Самые популярные темы недели
3.2.Вопросы остались без ответа
4.КНИГИ
4.1.Введение в системы баз данных

[В начало]

Контроль VAS в SQL Server 2005

По материалам статьи Slava Oks: Tracking VAS in Yukon
Перевод Александра Гладченко

Когда разработчики приступили к работе над следующей версией SQL Server - Yukon, они осознавали, что развитые средства поддержки являются одним из ключевых моментов успешности проекта. Своей целью автор ставит охват тем, описывающих "нижние" уровни организации СУБД, которые многим из Вас, как он уверен, действительно интересны, то есть это управление памятью и планирование ресурсов. В этой статье представлен беглый обзор того, как можно контролировать и диагностировать виртуальное адресное пространство - Virtual Address Space (VAS), используемое SQL Server. Автор надеется, что Вы понимаете что такое VAS и как оно организовано в Windows. Надеясь на Ваше терпение, автор постарается побыстрее описать всю исходную информацию, что бы в ближайшем будущем мы могли подробно поговорить о менеджере памяти SQL Server.
Представленный ниже запрос можно выполнять на сервере периодически, чтобы отслеживать возможные отклонения, связанные с VAS. Постоянное отклонение VAS от нормы может указывать на потенциальную проблему. Не смотря на то, что Yukon умет восстанавливаться после вытеснения VAS намного лучше, чем SQL Server 2000, если в реальности существует утечка памяти, спровоцированная внешними компонентами загруженными в наше VAS, поделать с этим будет практически ничего нельзя...

Замечание автора: В зависимости от бета - версии Yukon, возможно, потребуется изменить имена полей. Кроме того, автор не причисляет себя к гуру в T-SQL и представленный ниже пример предназначен только для целей демонстрации, как это работает. Автор уверен, что Вы - парни можете придумать запросы и получше :-))

CREATE VIEW vasummary AS
select 
 Size = VaDump.Size,
 Reserved =  sum(case (convert (INT,VaDump.Base) ^ 0) when 0 then 0 else 1 end),
 Free = sum(case (convert (INT,VaDump.Base) ^ 0x0) when 0 then 1 else 0 end)
from
(
 --- combine all allocation according with allocation base, do not take into
 --- account allocations with zero allocation_base
 ---
 select CONVERT (varbinary,sum(region_size_bytes)) AS Size, 
   allocation_base AS Base
 from sys.dm_os_virtual_address_dump 
   where allocation_base <> 0x0
   group by allocation_base 
 UNION  
 (
 --- we shouldn't be grouping allocations with zero allocation base
 --- just get them as is
 ---
 select CONVERT (varbinary,region_size_bytes), allocation_base 
  from sys.dm_os_virtual_address_dump
   where allocation_base = 0x0) 
)
as VaDump
group by Size 

--- Get vasummary information: Number of regions of a given size in SQL Server Size
--- and their status
select * from vasummary

--- Retrieve max available block
---
select max(size) from vasummary where Free <> 0

--- Get sum of all free regions
---
select sum(size*Free) from vasummary where Free <> 0

Вот, что может получиться в итоге:

Size                                   Reserved    Free
-------------------------------------- ----------- -----------
0x0000000000044000                               1           0
0x0000000000048000                               1           0
0x000000000004A000                               1           0
0x000000000004F000                               0           1
0x0000000000050000                               0           1
0x0000000000052000                               1           0
0x0000000000058000                               2           0
0x000000000005A000                               2           0
0x0000000000061000                               1           0
0x0000000000070000                               0           1
0x0000000000078000                               1           0
0x0000000000079000                               1           0
0x0000000000080000                               325         1
0x0000000000082000                               1           0
0x0000000000084000                               1           1
0x000000000008B000                               0           1
0x000000000008C000                               1           0
0x0000000000090000                               1           1
0x0000000000092000                               2           0
0x0000000000093000                               1           0
0x0000000000094000                               1           0
0x0000000000097000                               1           0
0x000000000009B000                               1           0
0x000000000009E000                               1           0
0x00000000000A0000                               0           1
0x00000000000A7000                               0           1
0x00000000000A9000                               1           0
0x00000000000AC000                               2           1
0x00000000000BC000                               0           1
0x00000000000C0000                               1           0
0x00000000000C4000                               1           0
0x00000000000C6000                               1           0
0x00000000000C8000                               1           0
0x00000000000F0000                               0           1
0x0000000000100000                               16          0
0x0000000000102000                               2           0
0x0000000000103000                               1           0
0x000000000010A000                               1           0
0x0000000000110000                               8           0
0x0000000000134000                               1           0
0x000000000015B000                               1           0
0x000000000015E000                               1           0
0x0000000000160000                               4           0
0x00000000001B0000                               1           0
0x00000000001DC000                               1           0
0x0000000000220000                               0           1
0x0000000000250000                               0           1
0x0000000000260000                               1           0
0x000000000026F000                               0           1
0x0000000000270000                               0           1
0x0000000000280000                               1           0
0x00000000002C5000                               1           0
0x00000000002F0000                               0           1
0x0000000000340000                               0           1
0x0000000000356000                               1           0
0x0000000000360000                               0           1
0x0000000000400000                               338         0
0x0000000000800000                               1           0
0x0000000000802000                               1           0
0x0000000000900000                               0           1
0x0000000001D29000                               1           0
0x0000000004F56000                               1           0
0x000000000F317000                               0           1

(110 row(s) affected)

                                                               
-------------------------------------------------------------- 
0x000000000F317000

(1 row(s) affected)

            
----------- 
294117376

(1 row(s) affected)
Здесь интересно то что подобные скрипты можно использовать для отладки/диагностирования проблем VAS ежедневно, но таким образом мы также можем пытаться диагностировать и отлаживать проблемы SQL Server не прибегая к отладчику, а полагаясь только на представления dmvs и другие инструменты поддержки, которые будут присутствовать в окончательной версии и обязательно будут Вам доступны.

[В начало]

Обзор SQL Server 2005 для разработчика баз данных (продолжение)

По материалам статьи Matt Nunn, Microsoft Corporation: An Overview of SQL Server 2005 for the Database Developer
Перевод Виталия Степаненко

Содержание

Новая парадигма разработки баз данных
Интеграция с .NET Framework
Технологии XML
Новая среда разработки
Улучшения языка
Заключение

Новая среда разработки

SQL Server 2005 представляет новую среду приложений, Service Broker. Service Broker - это распределенная среда приложений, которая обеспечивает надежный асинхронный обмен сообщениями на уровне базы данных.

SQL Service Broker

За последние 10 лет увеличение числа приложений электронной коммерции создало потребность в улучшении управления потоками в приложениях баз данных. Когда клиент размещает заказ на книгу, то требуется выполнение транзакций в системах хранения, доставки и системе кредитных карт, а также отправка подтверждения о приеме заказа, используя другое Web-приложение. Ожидание выполнения каждого из этих процессов - не самая лучшая идея. SQL Server 2005 предоставляет новую масштабируемую архитектуру для асинхронного обмена сообщениями.

Технология Service Broker позволяет внутренним или внешним процессам отправлять и получать потоки надежных, асинхронных сообщений, используя расширения обычного языка управления данными Transact-SQL. Сообщения отправляются в очередь в ту же базу данных, где находится и отправитель, или в другую базу данных того же экземпляра SQL Server, или в другой экземпляр SQL Server на том же или на удаленном сервере.

Reporting Services

С выходом SQL Server 2005 Microsoft расширяет свой новый основной компонент интегрированной платформы бизнес-приложений (business intelligence, BI). SQL Server Reporting Services расширяет видение Microsoft бизнес-приложений, делая их более простыми для получения нужными людьми нужной информации в любой деловой среде.

Reporting Services - это цельная серверная платформа для создания, управления и доставки обычных и интерактивных отчетов. Она включает все, что необходимо для создания, распространения и управления отчетами. В то же время модульный дизайн и расширенные API Routing Services позволяют разработчикам программного обеспечения, поставщикам данных и предприятиям объединять систему отчетности с другими системами, в том числе сторонних производителей.

Reporting Services поставляется с SQL Server 2005 и включает:

- Полный набор инструментов для создания, управления и просмотра отчетов.

- Движок для хранения и выполнения отчетов.

- Расширяемую архитектуру и открытые интерфейсы для встроенных отчетов или интеграции решений в различные среды информационных технологий.

Службы уведомлений (Notification Services)

Microsoft SQL Server Notification Services является платформой для разработки и развертывания приложений, которые создают и отправляют уведомления пользователям. Уведомления - это персонифицированные сообщения, которые могут быть отправлены множеству устройств.

Уведомления отражают предпочтения подписчика. Подписчик создает подписку, чтобы показать интерес к некоторой информации. Например, "уведомьте меня, когда цена акции Adventure Works достигнет $70.00" или "уведомьте меня, когда обновится документ по стратегии, который составляет моя команда".

Уведомление может быть создано и отправлено пользователю, когда выполняется событие триггера, или может быть создано и отправлено по заранее определенному расписанию, которое определил пользователь. Подписка пользователя определяет, когда должно быть создано и отправлено уведомление.

Уведомления могут быть отправлены многим устройствам. Например, уведомление может быть отправлено на мобильный телефон пользователя, на карманный компьютер, Microsoft Windows Messenger, или на e-mail. Так как эти устройства пользователь часто носит с собой, то уведомления отлично подходят для отправки высокоприоритетной информации.

SQL Server Mobile Edition

SQL Server 2000 поставляется с SQL Server 2000 Windows CE Edition, который сейчас называется SQL Server Mobile Edition версии 3.0. В SQL Server Mobile Edition есть несколько ключевых особенностей, которые имеют отношение к разработчикам:

- Вы можете создать базу данных SQL Server Mobile Edition на компьютере или на устройстве напрямую из SQL Server Management Studio. Вы также можете управлять схемой базы данных SQL Server Mobile Edition напрямую из Management Studio, независимо от того, находится ли база данных на мобильном устройстве или на компьютере. Вы можете использовать SQL Server Management Studio для выполнения запросов, которые обращаются к базе данных SQL Server Mobile Edition, независимо от того, что она находится на мобильном устройстве или на компьютере. Вы также можете воспользоваться преимуществами новых особенностей SQL Server Mobile Edition, которые включают план исполнения XML, который выводится так же, как и план исполнения в SQL Server, а также возможностью использовать хинты запросов для настройки оптимизатора запросов в SQL Server Mobile Edition. Впервые Вы можете контролировать план оптимизации на мобильном устройстве.

- Теперь Вы можете программировать объекты Data Transformation Services (DTS) для обмена данными.

- Новый набор SqlCeResult наследуется из набора SQLResult, находящегося в SQL Server 2005. Это позволяет SQL Server Mobile Edition иметь настоящий обновляемый курсор. Также он позволяет подсоединяться к объектам данных, находящимся на мобильных устройствах.

- Вы можете программировать приложения для синхронизации данных при открытом главном приложении, и у Вас есть возможность организовать одновременный доступ двух отдельных приложений к одной и той же базе данных на мобильном устройстве.

- Вы можете получать уведомления, которые Вы можете вставлять в панели статуса для получения состояния синхронизации. Раньше нельзя было узнать о состоянии синхронизации и уведомить пользователя, что устройство не прекратило отвечать на запросы.

- Вы можете поддерживать небольшой размер базы данных через гораздо более агрессивную политику работы со страницами.

- Вы можете совместно использовать параметризированный код запроса с синтаксисом SQL Server.

ОКОНЧАНИЕ СЛЕДУЕТ

[В начало]

Ссылки на статьи

Статьи на русском языке


Общая система безопасности приложений на предприятии
Николай Денищенко и Сергей Гавриленко
MSSQLServer: Не так давно мы проводили собеседование кандидатов на должность программиста и не в последнюю очередь интересовались отношением претендента к вопросам защиты данных. Несмотря на то, что большинство кандидатов активно участвовало в разработке бизнес-приложений, практически никто из них не уделял должного внимания безопасности. Такое скорбное положение вещей нас несколько озадачило и послужило стимулом для написания статьи...

Вытеснение памяти - классификация
Slava Oks
MSSQLServer: До этой статьи автор затрагивал те темы, которые довольно широко обсуждались. Теперь он хотел бы поговорить об экзотической теме, это "вытеснение памяти". С виду эта тема выглядит простой, но в действительности дело обстоит совсем не так...

Утечка памяти - определение и классификация
Slava Oks
MSSQLServer: В своей предыдущей статье автор говорил о типах вытеснения памяти. Сейчас он хотел бы обратиться к близкой теме - "Утечка Памяти". Прежде, чем продолжить изложение материала, автор хочет предупредить Вас, что он рассчитывает на то, что читатель знаком с механизмами и принципами управления памятью в Windows...

Изменения dbcc memorystatus в Yukon
Slava Oks
MSSQLServer: Вероятно, Вам доводилось использовать в SQL Server 2000 команду dbcc, выдающую информацию о состоянии памяти. В Yukon разработчики изменили выводимую dbcc memorystatus информацию, чтобы учесть изменения в дизайне нового менеджера памяти, которые автор описал в предыдущих статьях...

Введение в базы данных
Алексей Федоров, Наталия Елманова
SQL: Располагая технологией доступа к данным, можно наконец подумать и о том, каким образом следует манипулировать самими данными и метаданными. Способы манипуляции могут быть специфичными для данной СУБД (например, использование объектов клиентской части этой СУБД для доступа к объектам баз данных) или для данного механизма доступа к данным. Тем не менее существует более или менее универсальный способ манипуляции данными, поддерживаемый почти всеми серверными реляционными СУБД и большинством универсальных механизмов доступа к данным (в том числе при использовании их совместно с настольными СУБД). Этот способ - применение языка SQL (Structured Query Language - язык структурированных запросов). Ниже мы рассмотрим назначение и особенности этого языка, а также изучим, как с его...

ТЕХНОЛОГИЯ НАГРУЗОЧНОГО ТЕСТИРОВАНИЯ ИНФОРМАЦИОННЫХ СИСТЕМ С БОЛЬШИМ ОБЪЕМОМ ДАННЫХ
Вячеслав Берзин
CASE: Для информационных систем, которым предстоит работа с большими объемами данных, задачи проведения нагрузочных испытаний приобретают высокий приоритет. Зачастую, система показывает хорошую производительность на данных небольшого объема, но с ростом загрузки возникают разного рода проблемы, которые могут быть связаны с неоптимальным построением запросов, технологическими конфликтами различных элементов системы, ограничениями системных ресурсов и т.д. Если подобные проблемы обнаруживаются уже в ходе эксплуатации, в условиях реальной пиковой нагрузки, результатом становится резкое снижение быстродействия или даже остановка системы. На поиск причин сбоя и их устранение может уйти несколько дней, что для "mission-critical" приложений обычно приводит к потерям, несопоставимым ...

Деньги надо тратить с умом!
Елена Некрасова
CASE: Если посмотреть на развитие отношений между бизнес-подразделениями и внутренними ИТ-службами компаний, то можно увидеть, что в недавнем прошлом бизнес и ИТ существовали практически в параллельных мирах. ИТ-подразделения в основном были озабочены построением инфраструктуры и достаточно далеки от решения бизнес-задач. Бизнес же искренне считал ИТ-структуры балластом, не способным положительным образом повлиять на решение проблем бизнеса, а потому балласт этот с завидным постоянством "сбрасывался" - при малейшем ухудшении рыночной погоды расходы на ИТ сокращались. В этих условиях заказчиком ИТ-решений у внешних поставщиков была, как правило, ИТ-служба, а не бизнес-подразделения. Перелом в отношениях бизнеса и ИТ пришелся на то время, когда стали создаваться комплексные ИТ-...

CASE-технологии: что, когда, как?
Александра Гнатуш
CASE: Для того чтобы успешно выполнить проект, объект проектирования должен быть прежде всего правильно и адекватно описан, то есть необходимо построить полноценные и функциональные информационные модели объекта проектирования. До недавнего времени проектирование информационных систем выполнялось главным образом на интуитивном уровне с применением не формализованных методов, которые основывались на практическом опыте, экспертных оценках и дорогостоящих экспериментальных проверках качества функционирования подобных систем. Но, естественно, во время разработки и функционирования информационных систем потребности пользователей могут изменяться или уточняться, что еще более усложняет разработку и сопровождение...

Эврика! Десять лучших вещей, которые можно сделать с вашими данными
Кимберли Рот
CASE: Когда ваше предприятие буквально наводняют данные, собирающиеся о каждой выполненной транзакции, вам остается одно из двух: либо молиться о том, чтобы Гете оказался прав (вспомните о Мефистофеле, которого неосторожно вызвал Фауст - прим. ред.), либо оказаться умнее и добиться, чтобы ваши данные работали на вас, а не против вас...

Экономии ради
Елена Шашенкова
CASE: Oracle разъясняет предприятиям преимущества методов <бережливого производства>...

UML 2: модель деятельности и модель действий
Конрад Бок
CASE: Данная публикация журнала Journal of Object Technology (www.jot.fm) открывает серию статей, посвященных модели деятельности (activity model) во второй версии унифицированного языка моделирования Unified Modeling Language, а также тому, как она сочетается с моделью действий (action model). Статью можно рассматривать как дополнение к стандарту; в ней представлены сведения общего характера, логические обоснования, примеры, а также концепции, выстроенные в логическом порядке. Речь также идет о причинах, побуждающих переходить на новые модели, об их архитектуре, об основных аспектах понятий деятельности и действий в UML 2 и об общей концепции поведения (behavior) в этом языке [1]....

XML: хорошего много не бывает?
Дэвид Бекер
XML: Несмотря на слухи, индустрия развлечений для взрослых не разрабатывает собственный диалект языка Extensible Markup Language под названием XXXML...

[В начало]

Англоязычные статьи

Know Your Data
Roy Carlson
Rcently, I was asked to pull some statistics from a SQL database. Only minimal information was available on the data itself, and the task required determining percentages and creating trends from the data. It was relatively easy to pull out the data and perform calculations, but the results looked funny when I had finished. So I dug further in

Multi-User Considerations in Data Synchronization for SQL Server 2005 Mobile Edition 3.0
Gil Lapid Shafriri, Debra Dove
Gain a better understanding of how to develop your SQL Server Mobile applications to handle multi-user access and data synchronization with Microsoft SQL Server 2005. (6 printed pages)

TCP/IP Fundamentals for Microsoft Windows
Microsoft
This online book is a structured, introductory approach to the basic concepts and principles of the Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite, how the most important protocols function, and their basic configuration in the Microsoft® Windows Server™ 2003 and Windows® XP operating systems. This book is primarily a discussion of concepts and principles to lay a conceptual foundation for the TCP/IP protocol suite. Unlike other introductory TCP/IP texts, this book provides an integrated discussion of both Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6)

Where Did xp_cmdshell Go?
Larry Chesnut
So here I was playing with the February CTP drop of SQL Server 2005 the other day, and when I went to use the "xp_cmdshell" extended stored procedure, I was not able to use it

Using the XQuery methods in CHECK constraints
Michael Rys
In a recent weblog posting, I outlined how you can use XQuery expressions inside CHECK constraints. Unfortunately, we identified a problem that requires us to mandate that any XQuery expressions used in a CHECK constraint are wrapped in T-SQL user-defined functions. This will be enforced starting with an upcoming CTP release (not the next one, but probably in the Beta3 timeframe), but you probably should start rewriting your queries already today

What is an Assembly?
Thom Robbins .NET Weblog
Every time you create any kind of application or service using Visual Basic.NET you are building an Assembly. That is because Assemblies serve as the basic building blocks of the .NET Framework. They help to define versioning, code reuse, scoping rules and security permissions for all .NET applications. Probably the simplest understanding is that an Assembly is just a collection of types that form a logical unit of functionality and that is built to efficiently work together. If you search your hard drive you will find Assemblies as either an executable (.exe) or a dynamic link library (.dll) that was compiled using the .NET Framework. In this article we will explore some of the basic concepts and architecture of Assemblies and how they can be used within the .NET Framework

Tableau Shows Better Way To Analyze Data
Mario Morejon
Anyone who has ever analyzed sales data from a spreadsheet knows it is difficult to identify key information needed to make effective business decisions. Raw data from OLAP servers is even worse, since it combines calculated fields in multiple dimensions. To find business trends, data relationships and anomalies or even to drill down to data in any dimension, analysts have to use business intelligence tools. However, these tools require constant tweaking and configuration changes. Every time new data sources are introduced or new business trends pop up, database experts must adjust data cubes and queries to ensure that the right information is being extracted. Most business intelligence tools require considerable training

Please Stay Out Of The Database!!!
FitzBlog
We had a fun internal debate this week on a new tool developed in France. If you can read French, it’s documented here; the download link for the executable (whose UI is in English) is here. The tool grabs deleted documents from the database and saves them to your local hard drive

SQL Server 2005: Figuring Out the Features
Brian Moran
The release of SQL Server 2005 has seemed so close but yet so far away for so many years that it's easy to lose sight of the fact that SQL Server 2005 is finally (I hope ) just around the corner. If you're not planning to move to SQL Server 2005 right away, don't worry--we realize that a large percentage of the SQL Server community will be on SQL Server 2000 for years to come. But because SQL Server 2005 is the first major upgrade in years, many readers are ready and eager for information about it. I'll begin to share SQL Server 2005 topics more regularly over the next few months. This week, I want to point you to the Microsoft article "Expanding the SQL Server Product Line" at http://lists.sqlmag.com/t?ctl=6904:7B3DB . This article provides a high-level overview of planned features for different SQL Server editions: SQL Server Express, SQL Server Workgroup Edition, SQL Server Standard Edition, and SQL Server Enterprise Edition. The feature list in the article isn't particularly detailed, perhaps because decisions for all the feature-edition mixes haven't been finalized. However, I've learned about a few interesting features

Business logic and data integration with SQL Server Integration Services
Donald Farmer
Loading fact tables and handling surrogate keys has been the subject of a great discussion between Marco Russo, Michael Barrett Johnson and Jamie Thomson. Their threads center around the handling of key values which cannot be found in the dimension when loading a fact table. This is an interesting and important discussion, and you'll see that they have got right into the details

SSIS: Regular Expressions & Fuzzy Matching
Jamie Thomson's Blog
A few days ago I posted a blog entry discussing some experiences of using fuzzy matching in SSIS. In it I talked of a problem I was having resolving 50 different records with the word "google" in them down to a single record "www.google.com"

Random sampling of MDX set using stored procedures with server ADOMD.NET
Mosha Pasumansky
Analysis Services 2005 comes with true server side stored procedures support. On top of that, Analysis Services 2005 also has server side ADOMD.NET object model. Server ADOMD.NET looks at first similar to client ADOMD.NET, but they serve very different purposes. Client ADOMD.NET is modeled after ADO.NET and ADOMD, and it allows sending MDX queries to the server and exposes nice object hierarchy over cube metadata. Server ADOMD.NET, on the other hand, is there to extend MDX object model itself. It operates in the same type space as MDX, for example itt has classes such as Set, Tuple, Member etc, which are very familiar to any MDX programmer. Today in the newsgroup I saw a question "How to implement random sampling from a set". This is exactly kind of task that server ADOMD.NET and stored procedures are designed for. In order to accomplish it, we will create assembly RandomSample, and implement function Sample(set, k) in it. This function has same signature as Head and Tail MDX functions, only instead of returning first or last k tuples from the set, it returns k random ones. The algorithm used here iterates over the set and probes each tuple with probability (k-j)/(n-i). I didn't prove that it produces unbiased uniform distribution, but it probably does. Anyway, the exact algorithm is not very important, what is more important is to demonstrate how to use server ADOMD.NET. After the code below is compiled into assembly, it needs to be registered in the server, and then the function Sample can be called from MDX

To quote or not to quote (in expressions of MDX calculations)
Mosha Pasumansky
When you write MDX statements to create calculated members, named sets or cell calculations - do you use quotes around the expression or not ? Let's compare the following two statements

Everybody's favorite topic - NULL
Andrew Conrad's WebLog
In V1 of .net, value types could not be null. Since, this was contradictory to relational databases use of null, the DataSet needed to have a concept of nullable value types – hence DBNull was invented

XML Attributes and XML Schema
daveremy's WebLog
Recently I was researching an issue submitted by Daniel Cazzulino to the XML team about a problem that he ran into using XInclude and XML Schema together. As you probably know you can use XInclude in XML instances to bring XML into a document from different locations. After a piece of XML is XIncluded an xml:base attribute is left on the element to allow for round tripping in edit scenarios. The problem arises when attempting to validate the resulting XML instance. XML Schema treats xml attributes (attributes defined in the http://www.w3.org/XML/1998/namespace) just like any other attribute, meaning that the xml:base that XInclude leaves behind must be defined in the content model of the element that was XIncluded. Thus an XML Schema author would need to anticipate any place in an instance that could be XIncluded and add an xml:base (or perhaps anyAttribute with namespace=http://www.w3.org/XML/1998/namespace). The result of this, at least from what I have learned so far, is that the interaction between XInclude and XML Schema is substantially hampered (is broken an overstatement?)

XML Indexing Part 1: XML IDs, XSLT Keys and IndexingXPathNavigator
Oleg Tkachenko
This two-part article discusses various aspects of indexing XML data. The first part examines indexing of standalone XML documents, a native XML concept of IDs, XSLT keys, and introduces the IndexingXPathNavigator class, which enables indexing for any IXPathNavigable in-memory XML store, such as XmlDocument, XpathDocument, or XmlDataDocument classes. The next part will be focused on new XML indexing features introduced in the Microsoft SQL Server 2005. (20 printed pages)

XInclude + XML Schema validation = Ooops!
Oleg Tkachenko's Blog
Norm Walsh writes about a very nasty problem waiting to happen when anybody naive enough is trying to validate an XML document after XInclude processing against XML Schema. Ooops, XInclude processor appends xml:base attributes at top-level included elements, which you gotta allow in the schema, most likely on every element! And XML Schema of course doesn't support declaring of such globally allowed attributes, so you have to add its definition to every single element declaration. And that's not all! Norm forgot about xml:lang attribute, which XInclude processor can and should append too. I mentioned that issue in the "Combining XML Documents with XInclude" article

What's the contract?
Clemens Vasters
Tim Ewald responds (along with a few others) to my previous post about WSDL and states: ”Remember that WSDL/XSD/Policy is the contract, period. Any other view of your contract is just an illusion.”

Gurus vs. the Street
Clemens Vasters
Aaron Skonnard says I am clearly wrong with my demand that one shouldn’t have to look at WSDL/XSD/Policy. Well, at this point in time the tooling makes it indeed difficult to ignore angle brackets. But that’s not a reason to give up. I also find the “it all has to start at the angle bracket” stance overly idealistic

ACID's "D"
Clemens Vasters
Jim Johnson, who works on transaction technology at Microsoft’s Distributed Systems Group (aka „Indigo team“), shares an important insight on ACID’s “D” and that “Durable” doesn’t always mean “to disk”, but is rather relative to the resource lifetime. A transaction outcome can be “durably” stored in memory, if that’s what the characteristic of the resource underlying the resource manager (=transaction participant) is. That’s a very important perspective to have. Once you get away from the “transactions are heavy duty” thinking (because “D” seems to imply “disk” to many people), transactions, especially with “lightweight transaction managers” such as the one found in the .NET Framework 2.0’s System.Transactions.Ltm namespace (or the one I published a while back), suddenly become very attractive to coordinate and resolve fault conditions between components within a process

Tracking VAS in Yukon
Slava Oks's WebLog
When we started working on the next release of SQL Server, Yukon, we realized that supportability features are keys to our success. Eventually I am planning on covering ones that are related to low level "stuff", something that many of you, I know, really interested in, i.e. memory management and scheduling. Here is the quick look at how you can monitor and diagnose Virtual Address Space, VAS, usage inside of SQL Server. In this example I assume your understanding of VAS and how it is handled by Windows. If you don't soon I will cover it so that we can talk about SQL Server's memory manager in full

A look at Virtual Address Space - VAS
Slava Oks's WebLog
Memory is a set of common resources shared by applications, their components and operating system. One needs to be very specific when referring to a given memory resource. Mistakenly, in many cases, developers, users, DBAs refer to different memory resources using one generic term memory. This perfectly worked in DOS times when things were simple, when there was no virtual memory and when application didn’t have to share the computer box with others. Since then things have changed a lot

MDX Essentials: Enhancing CROSSJOIN() with Calculated Members
William Pearson
In an earlier article, The CROSSJOIN() Function: Breaking Bottlenecks, we examined the use of CROSSJOIN(), and factors that can render this otherwise powerful function suboptimal within our queries. We discussed a business need as defined by a hypothetical group of information consumers, in which we were asked to tune an MDX query for more optimal performance. Our focus centered upon enhancing query performance when using CROSSJOIN() in medium- to large-sized data sets. After discussing how CROSSJOIN() works in general, and pointing out the way in which its operations can result in crippling performance overhead, we exposed approaches to mitigating that overhead within practice exercises designed to reinforce the concepts

Data Driven Security
Peter DeBetta's SQLBlog
I have worked on a number of systems where security setting were defined in the data itself. Bit flags were used to determine if a Role did or did not have a certain type of access, namely Select, Insert, Update, or Delete security. The fun part of the design was not the table, which as you can see here, is pretty straightforward

Fun with Dates
Peter DeBetta's SQLBlog
How many times have you been told that a user group meeting (or any regularly scheduled meeting, for that matter) would take place on the Nth weekday of each month - for example, perhaps the meeting was always on the second Thursday of the month

More Fun with Dates
Peter DeBetta's SQLBlog
I couldn’t wait, and so I am continuing this topic a might sooner than expected (the original entry can be found here). In that first entry, I had spoken about using T-SQL to find the Nth weekday of a month given a date in that month

Things You Don't Learn in School
Peter DeBetta's SQLBlog
I was speaking to my friend Byer today, discussing the use of the OpenQuery function to get to some data from Oracle (in a linked server) - a requirement of the system on which he was working. More specifically, he needed to lookup a single value based in Oracle and return it to SQL Server to use in a query. Since OpenQuery does not allow a variable to be used for the SQL statement, and since this particular query needed a variable, dynamic execution was going to have to be used to create the correct SELECT statement sing the OpenQuery function. So, after sorting out these little details, we were finally at a point where we could use the value coming back from the dynamically executed SQL statement

Delimited List to Table
Peter DeBetta's SQLBlog
After writing this function, I discovered several months later on the internet a handful of other people had done essentially the same thing, with only slightly varying methodologies. I thought I was being rather novel when I did this not only because of what it did, but also how I used it after the fact

Delimited List to Table - Part II
Peter DeBetta's SQLBlog
In this entry, we will explore a little oddity related to how we join two sets of data together. As you may already know, you can join two tables together in a variety of ways, three of which are shown here

Delimited List to Table - Follow Up
Peter DeBetta's SQLBlog
Enigma (http://sqljunkies.com/weblog/enigma) posted a comment on the first entry in this topic regarding another method for converting a delimited list to a table. I will show an example of it here (formatted for ease of reading)

Delimited List to Table - More Follow Up
Peter DeBetta's SQLBlog
One solution to the set-based delimited list to table could be done as follows

Fun with Dates - SQL Server "Yukon" style
Peter DeBetta's SQLBlog
So, to kind of give you all a quick introduction to SQL Server “Yukon”, I though I would revisit a previous post that calculated the Nth day of the month following a specified Date. No, this is not a typo - Date is a new data type that stores only the date and can represent any date from 1 January 0001 to 31 December 9999. Date is special in that it is really CLR-based and thus has methods and properties that can be addressed, even in T-SQL. Using this date type, the fnNthDayOfNextMonth function could be rewritten as follows

Still More Fun with Dates in SQL Server "Yukon"
Peter DeBetta's SQLBlog
In keeping with my previous post, I wanted to show you how you could create the NthOfNextMonth function in .NET and then use it in SQL Server. The function, shown here, look amazingly similar to the T-SQL function

Joy of Overloading
Peter DeBetta's SQLBlog
This blog is not just about coding in SQL Server. It's also about the data access client. This post is for all you VB.NET and C# developers who are former VB programmers. Having worked with VB since its early days, there were many times when I had wished I could do overload functions and make for a nicer, more respectable interface

Identifying Identities
Peter DeBetta's SQLBlog
So I saw this article the other day that talked about using identities in the database. One snippet of code in the article was supposed to find tables with identity columns. I saw two key issues with this code

T-SQL is here to stay
Peter DeBetta's SQLBlog
I just read a blog post by Adam Machanic and feel compelled to thank Adam on telling it like it is

Flexible DTS Packages with Perl
Jeremy Brown
Moving data from one SQL Server to another sounds like a fairly easy process. Microsoft is kind enough to supply things like DTS to make these tasks simple. On the surface, DTS provides a nice interface through Enterprise Manager called DTS Designer to allow someone to construct powerful data Extraction, Transformation and Loading (ETL) processes. As always, there-s a little more "under the hood" than what is exposed through DTS Designer. By coding with the DTS object model, you can create extremely powerful and portable ETL processes that can be executed fairly simply. With scripting, you can build the packages dynamically from a shell script, and execute them by passing any number of command line flags

Client side scrollable dataset
Tvoglou
How to achieve a scrolling effect for you dataset from JavaScript

SQL Server 2005 Virtual Labs Now Online
John Bristowe
Microsoft has announced the public availability of the SQL Server 2005 Virtual Hands-On Labs. These labs let participants experience many of the new features in SQL Server 2005 including CLR integration, XML support, and deep business intelligence integration

Generating Surrogate Keys
Jamie Thomson
Surrogate keys are generally considered fundamental building blocks of a data warehouse. They are used as identifiers for dimensional members and enable us to manage slowly changing dimensions

Find Stored procedure called within all procedures for a database
Brijesh Pandya (Brip)
Sometimes its tidious to find all calls made to different Stored procedures within a stored procedure and generating reports in case we have large databases, this tool is aimed to script all Sp's and extracts SP call made with additional information such as author name and description

The Business Rule Clue
Steve Kass
In November 2001, a SQL Server developer posted a seemingly simple problem to the public newsgroup microsoft.public.sqlserver.programming. Like other SQL Server Most Valuable Professionals (MVPs), I read this newsgroup almost daily, and this post caught my attention. The developer had written a GROUP BY query, but it wasn't working. The problem was a mystery—the query was simple, and the syntax was correct. All the evidence showed that the query should work. But as I and a few other newsgroup participants looked into the problem, we discovered that the database contained redundant information because the design failed to enforce a business rule. This real-world problem turned out to be a textbook example of the importance of understanding normalization, functional dependencies, and anomalies. Theory met practice, and the developer who originally posted the question got a by-the-book solution. The result was a working query that also provided some insight into database design. Let's look at the clues we discovered and see how they helped solve the mystery. If you want to work through the original scenario or understand the newsgroup participants' thought processes, you can read the original newsgroup thread, "GROUP BY Problem," at http://groups.google.com/groups?q=hancox+kass+query

The Datagrid Revisited: Editing a Live Database in Template Columns
Peter van Ooijen
In one of my previous contributions I demonstrated a way to edit database data in the asp.net datagrid component. Before and after that many more (good) stories have appeared on this matter. The most of these stories work with an ad-hoc list of data and not on a live database. As the latter introduces some pitfalls and the datagrid component is really popular I will take another look at the matter, again through the eyes of a developer used to tools like Delphi or VS rather then ASP. I will be tackling the problem using as many RAD options of Visual Studio .NET as possible and will be working with strong typed object oriented code. This time I will take a slightly different approach and will dig deeper into working with template columns. Some sidesteps will take a look at a client side scriptlet as well at reducing network- or database- traffic

User-defined functions to generate and apply a table of sequence numbers
Brian Walker
A table of sequence numbers consists of N rows with each row containing a unique integer value from 1 through N. In some cases it may be more convenient to have the values X through Y where Y-X equals N-1. A table of sequence numbers can be very useful for a variety of purposes. See Listing 1 for a short user-defined function that returns such a table. Of course, similar code can be included within a stored procedure for SQL Server 7 which does not have user-defined functions

Data vaulting SQL Server databases
Barrie Sosinsky
SQL Server administrators pay a lot of attention to backups. When data gets corrupted or when hardware fails, at least there are those backups to fall back on. But if your entire data center burns down, your backups are gone. If you are in a large organization, perhaps you have the benefit of failing over to another site locally, over fiber optic cable across a Metropolitan Wide Area Network (MWAN) or, less effectively, over longer distances. Another, more affordable solution is called data vaulting

Handling Data Integrity Issues in Analysis Services 2005
T.K. Anand
Learn about common data integrity issues, and see how Analysis Services 2005 gives you the tools to handle them. (10 printed pages)

Using Microsoft SQL Server on Handheld Devices
Buck Woody
I recently saw a sticker that I really like: "I haven't lost my mind. It's backed up on disk somewhere." I agree with that. I used to carry a calendar book with everything in it – appointments, addresses, notes, and the like. When I began using various Personal Information Manager (PIM) programs (remember Lotus Organizer 2.0?) it replaced the book, but it wasn't very portable. So I jumped on the cell-phone and the Palm Pilot bandwagons

Programming SQL Server 2005 with .Net
Novick Software
SQL Server 2005 (code name Yukon) opens up the opportunity to run .Net code right inside SQL Server Engine on a par with T-SQL. This gives the programmer an expanded choice of programming language. This presentation shows you how to write C# or VB.Net routines and execute them in SQL Server as one of the supported SQL object types

API Changes between CTP [Pablo Castro]
DataWorks WebLog
We’ve been seeing several comments on email and blogs lately about changes in the APIs between CTP (Community Tech Preview) releases. I understand the frustration that these changes could cause, so I wanted to jump in and comment on the topic

Declaring Named Sets Inline
Chris Webb's BI Blog
I mentioned in my last entry on the 'expensive topcount' that I'd originally tried to solve the problem by declaring a set inside the axis definition, and after a chat about this with my colleague Jon I thought it might be worth going into more detail on what I was trying to do and why it failed. What I was talking about was the fact that MDX allows you to declare a named set anywhere a set definition appears, not just in a WITH SET or CREATE SET statement, and this ability is very important when it comes to optimising queries which use complex set operations

XML schema binding in a temp table *may* not work in the Febuary CTP
Enjoy Every Sandwich
Consider the following example

If you swap a table partition in/out, does that cause all the statistics to be recalculated?
Larry Chesnut
The other day, I got an interesting email. The jest of the question was, “When you partition a table, and the associated index, where are the statistics stored? If you swap a partition in/out, does that cause all the statistics to be recalculated?”

Interview Question: Halloween Problem
Randy Dyess
Trying to find information to blog about on a regular basis is going to be one of those issues that will face more and more people as blogs keep growing in popularity. I have always tried to keep this blog on a technical level, but sometimes that policy leaves me without anything to write about. I tried to do a daily Transact-SQL blog but that got boring really fast. This leads me to try something different

Where can I learn about the research behind the algorithms?
DMTeam
This tip provides links to research papers outlining various parts of the algorithms in SQL Server Data Mining

Data Visualization: Quantitative vs. Categorical Data: A Difference Worth Knowing
Stephen Few
When you create a graph, you step through a series of choices, including which type of graph you should use and several aspects of its appearance. Most people walk through these choices as if they were sleepwalking, with only a vague sense at best of what works, of why one choice is better than another. Without guiding principles rooted in a clear understanding of graph design, choices are arbitrary and the resulting communication fails in a way that can be costly to the business. To communicate effectively using graphs, you must understand the nature of the data, graphing conventions and a bit about visual perception - not only what works and what doesn't, but why.

Volume Analytics: Don't Design for a Mob - Design for Personas
Guy Creese
When building an application, it is often difficult to make prudent design decisions amidst wildly conflicting demands. Some clients want the software to do everything for everybody, so that it does nothing well; others want their idiosyncratic views to crowd out others' requirements. As an IT manager, it's sometimes difficult to find the happy medium between "everything and the kitchen sink" and a narrow set of features for a single user type. The use of personas can be a pragmatic solution to this very real problem.

Part 2: Mapping XML from SQL Server to a Single Cell in Excel 2003
Sergei Gundorov, Clark Hamilton
In the second of this three-part series, learn how to map well-formed XML from a standard SQL Server query to a single cell in a worksheet. The resulting output is an XML tree with non-repeating elements. (20 printed pages)

Best Practices for Database Design
J.D. Gonzalez
We've all had it happen before. Your manager or co-worker comes into your office and asks you to put together a database to manage some project they're working on. ... oh and by the way, they want it tomorrow! We create tables and name them something that only we as the developer can understand, but when it comes to developing reporting for the tool, our table, column and view names become difficult to read and debug

Deploy sql databases easy with Installer class
Stefan Prodan
Deploy MS SQL databases using System.Configuration.Install and VS.NET Setup Project

Single Sign-On, Impersonation, and SqlConnections
Bryant Likes's Blog
This morning I came across this article: Impersonation, Single Sign-on, and SPS. It is a very interesting article that lays out how to use Single Sign-on with impersonation. So the first thing I did was to get Single Sign-On setup using this MSDN article which was linked in the article. Wow! That was pretty easy. I actually have SSO working for the first time and now it seems pretty simple

My feelings on the CLR in SQL Server 2005
The SQL Doctor is In
Perhaps I am not a widely acknowledged SQL expert (Adam Machanic's words about Kim Tripp, which I am not even going to dispute because it is as true as is possible,) but the CLR has always worried me. Kim's blog, SQLCLR: A DBA's friend or foe?, pretty much says what I have felt all along. I remember sitting in a session in Seattle a few years back at the Yukon introduction conference (which, as it turns out, was a few years early :) thinking, "yikes!" I hope that this doesn't end my career as a T-SQL "expert!" (note the quotes, as I don't feel that on a real scale that I am an expert, but comparatively I suppose I am close enough, though I am no Kim Tripp!)

How to Avoid Several SQL Server Express Installation Problems
tfosorciM.org
I have been answering many SQL Server Express questions on beta newsgroups such as microsoft.private.sqlserver2005.express and microsoft.private.sqlserver2005.setup for some time now. Today I spent some time exploring choices that a new user of SQL Express might make. This post is an attempt to help new users avoid some installation and configuration problems that are, essentially, entirely avoidable

Roman's Weekly SQL Server Tip - How to set up SSL with Reporting Services, Part 1
Roman Rehak
If your Reporting Services is available over the Internet, you shouldn't even consider putting it out without requiring SSL, otherwise your username and password will be exposed without encryption. That's often easier said than done, especially because a certificate authenticated by a trusted authority is expensive and most companies don't want to purchase a certificate for every development/staging/QA server in their environment. While you can generate your own certificates with a server that has the Certificate Authority services installed, such certificates are not considered fully trusted because they haven't being issued by a trust authority going all the way to “the root”. You might recall that if a browser detects a certificate that's not totally kosher (it could be expired, issued to a different computer or issued by a non-trusted authority), it pops up a dialog and gives you the option to use or not use the certificate

Roman's Weekly SQL Server Tip - How to set up SSL with Reporting Services, Part 2
Roman Rehak
Last week I talked about setting up your own certificates on RS servers. Today I'll cover a few issues around using SSL with the Report Server web service and the Report Manager application

Roman's Weekly SQL Server Tip - Great resource for connection strings
Roman Rehak
This is actually an ADO/ADO.NET tip and it applies to other database systems as well

[В начало]

Форум SQL.RU

Самые популярные темы недели

Ваше мнение об упражнениях SELECT на http://sql.ipps.ru
Кто на чем пишет клиентов под SQL Server?
Больше книг хороших и разных!
Непонятности с использованием XLOCK хинта в select
Задай вопрос разработчику MsSQL!
Импорт данных из MS Excel
MD5,SHA1 на T-SQL
Приколы с CONVERT
База упала, а бэкапа нетути
Можно ли MSDE использовать как
Администраторы баз данных, защищайте свои сервера!
Access+SQL тормозит поиск
Странный глюк с insert
Можно ли определить зимнее сейчас время или летнее?
Временная таблица и серверный курсор
Как бы с помощью броадкаста получить список серверов в сети ?
Index Page -> Data Page ??
Мониторинг SQL серверов - DiagnosticManager for SQL Server
Select и вычисляемые столбцы
T_SQL: Ограниечение на число членов в IN есть ли?

[В начало]

Вопросы остались без ответа

Microsoft Windows Server 2003 Service Pack 1 (32-bit)
как добавить прилинкованный сервер Ib/Firebird
Что значит ошибка с кодом -999 в sp_getapplock
Странности с установкой
Есть мемберы SQL PASS?
DTS
Параметризованные запросы к ораклу в DTS
Тормозит сохранение DTS
Где приобрести книги

[В начало]

КНИГИ

Введение в системы баз данных

К. Дж. Дейт

8-е издание, страниц 1328, с ил.; формат 70x100/16; 2005, 2 кв.; ISBN 5-8459-0788-8; Вильямс.

Новое издание фундаментального труда Криса Дейта представляет собой исчерпывающее введение в очень обширную в настоящее время теорию систем баз данных. С помощью этой книги читатель сможет приобрести фундаментальные знания в области технологии баз данных, а также ознакомиться с направлениями, по которым рассматриваемая сфера деятельности, вероятно, будет развиваться в будущем. Книга предназначена для использования в основном в качестве учебника, а не справочника, поэтому, несомненно, вызовет интерес у программистов-профессионалов, научных работников и студентов, изучающих соответствующие курсы в высших учебных заведениях. В ней сделан акцент на усвоении сути и глубоком понимании излагаемого материала, а не просто на его формальном изложении. Книга, безусловно, будет полезна всем, кому приходится работать с базами данных или просто пользоваться ими.

[В начало]


Вопросы, предложения, коментарии, замечания, критику и т.п. оставляйте Виталию Степаненко и Александру Гладченко в форуме: Обсуждение рассылки

СЕМИНАРЫ  КОНФЕРЕНЦИИ

МИНИФОРМА
ПОДПИСКИ



ПУБЛИКАЦИИ  АРХИВ


http://subscribe.ru/
http://subscribe.ru/feedback/
Подписан адрес:
Код этой рассылки: comp.soft.winsoft.sqlhelpyouself
Отписаться

В избранное