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

MS SQL Server

  Все выпуски  

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


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

#227<<  #228

СОДЕРЖАНИЕ

1.СЕМИНАРЫ
1.1.Data Mining & Особенности реализации учетных задач
2.СОВЕТЫ
2.1.Поддержка XML в Microsoft SQL Server 2005 (продолжение)
3.ССЫЛКИ НА СТАТЬИ
3.1.Статьи на русском языке
3.2.Англоязычные статьи
4.ФОРУМ SQL.RU
4.1.Самые популярные темы недели
4.2.Вопросы остались без ответа
5.ПОЛЕЗНОСТИ
5.1.MS SQL Server 2000: управление и программирование

СЕМИНАРЫ

SQL Server 2005: Data Mining & Репликация транзакций

Дата: 27.12.2004г. 18:30
Место: г. Москва. Чапаевский пер., 14. Представительство Microsoft в России и СНГ.
Доклады:

1. Data Mining. Обзор новых возможностей. Заур Нуралиев

2. Репликация транзакций. SQL Server 2000/2005. Сердюк Владимир

Для регистрации на семинар, необходимо заполнить РЕГИСТРАЦИОННУЮ ФОРМУ, с указанием Вашей фамилии, имени, отчества и адреса электронной почты.
В случае возникновения проблем с регистрацией, Вы можете прислать заявку в свободной форме на адрес mssqlhelp@rambler.ru или написать об этом в форуме.

Количество мест в аудитории семинара ограничено, поэтому прошу Вас не откладывать регистрацию.

За день до даты проведения семинара, всем кто был успешно зарегистрирован, по электронной почте придёт письмо с подтверждением регистрации.

Для того, что бы пройти в помещение проведения семинара, при себе необходимо иметь паспорт или другое удостоверение личности.

Карта проезда в представительство Microsoft

[В начало]

СОВЕТЫ

Поддержка XML в Microsoft SQL Server 2005 (продолжение)

По материалам статьи XML Support in Microsoft SQL Server 2005
Перевод Виталия Степаненко

Shankar Pal, Mark Fussell, and Irwin Dolobowsky
Microsoft Corporation

Компиляция и выполнение запроса

Команда SQL обрабатывается анализатором SQL. Когда он обнаруживает выражение XQuery, управление передается компилятору XQuery, который затем компилирует выражение XQuery. Это порождает дерево запросов.

Общее дерево запросов выполняет оптимизацию запросов и строит физический план запросов, основанный на оценке затрат. Просмотр плана показывает большинство реляционных операторов и несколько новых операторов, таких, как UDX для обработки XML.

Выполнение запросов ориентировано на строки, как и в реляционной модели. Выражение WHERE применяется к каждой строке таблицы docs; это включает анализ XML данных во время выполнения, чтобы применять методы типа XML. Если условие выполняется, то строка блокируется и выражение SELECT применяется к строке. Результат выводится в виде данных XML для метода query() и конвертируется в соответствующий тип для метода value().

Если, напротив, строка не удовлетворяет условию выражения WHERE, то она пропускается и выполнение переходит на следующую строку.

Изменение данных XML

SQL Server 2005 имеет конструкции для изменения данных в виде расширения XQuery. Поддеревья могут вставляться перед или после определенного узла, или как самые левые или самые правые потомки. Более того, поддерево может быть вставлено в родительский узел, в этом случае оно становится самым правым потомком родителя. Поддерживаются вставки атрибутов, элементов и текстовых узлов.

Также поддерживается удаление поддеревьев. В этом случае целые поддеревья удаляются из экземпляра XML.

Скалярные значения могут заменяться новыми скалярными значениями.

Пример: вставка поддеревьев в экземпляры XML

Этот пример показывает использование метода modify() для вставки нового элемента <section> справа от элемента <section>, чей номер равен 1.


UPDATE docs SET xCol.modify('
  insert 
    <section num="2">
      <heading>Background</heading>
    </section>                
  after (/doc/section[@num=1])[1]')

Пример: обновление цены книги на значение $49.99

Следующая команда обновления заменяет цену книги <price> с ISBN 1-8610-0311-0 на новое значение $49.99. Экземпляр XML типизирован схемой XML http://myBooks, поэтому в команде изменения данных XML объявляется пространство имен.


UPDATE XmlCatalog
SET Document.modify ('
  default namespace = "http://myBooks" 
  replace value of (/bookstore/book[@ISBN=
    "1-8610-0311-0"]/price)[1] with 49.99')

Проверка типа и статические ошибки

XQuery выполняет проверку типа. В фазе компиляции проверяется правильность статического типа выражений XQuery и команд изменения данных и используются схемы XML для ссылок на тип в случае типизированного XML. В случае нарушения типа во время выполнения генерируются ошибки статического типа. Примерами статических ошибок являются: добавление строки к числу, получение последовательности значений, если ожидается единственное значение, запрос к несуществующему узлу для типизированных данных. Явное преобразование типа используется, чтобы избежать статических ошибок несовпадения типа. Ошибки времени выполнения XQuery конвертируются в пустые последовательности.

Параметры функций и операторы (например, eq), требующие единственного значения, возвращают ошибку, если компилятор не может определить, гарантировано ли единственное значение во время выполнения. Часто появляется проблема с нетипизированными данными. Например, поиск атрибута требует единственного родительского элемента.

Пример: проверки типа в методе value()

Следующий запрос по столбцу с нетипизированным XML требует спецификации //author/last-name, т.к. метод value() ожидает единственный узел в качестве первого аргумента. Без него компилятор не сможет определить, один ли узел <last-name> будет найден во время выполнения:


SELECT xCol.value('(//author/last-name)[1]', 'nvarchar(50)') LastName
FROM docs

Применение комбинации node()-value() для получения значений атрибутов может не требовать спецификации, как показано в следующем примере:

Пример: известное единственное значение

Показанный ниже метод nodes() генерирует отдельную строку для каждого элемента <book>. Метод value(), применяемый на узле <book>, получает значение genre, которое, будучи атрибутом, является единственным.


SELECT nref.value('@genre', 'varchar(max)') LastName
FROM docs CROSS APPLY xCol.nodes('//book') AS R(nref)

Междоменные запросы

Когда Ваши данные располагаются в комбинации реляционных столбцов и столбцов XML, Вы можете захотеть написать запросы, которые сочетают обработку реляционных и XML данных. Вы можете конвертировать данные в реляционных столбцах и столбцах XML в экземпляр XML, используя FOR XML с директивой TYPE и выполнить запрос, используя XQuery. И наоборот, Вы можете генерировать набор строк из значений XML и выполнить запрос, используя T-SQL, как показано в главе "Генерация набора строк из данных XML" ниже.

Более удобным и эффективным путем написания междоменных запросов является использование значения переменной SQL или столбца внутри выражения XQuery или внутри выражения изменения данных XML:

* Вставьте значение переменной SQL в Ваше выражение XQuery или выражение XML DML, используя sql:variable().

* Используйте значения из реляционного столбца в XQuery или контексте XML DML с помощью sql:column().

Этот подход позволяет приложениям параметризовать запросы, как показано в следующем примере. Sql:column() используется таким же образом и обеспечивает дополнительные преимущества. Для повышения эффективности могут быть задействованы индексы столбца, если это будет выбрано оптимизатором запросов. Кроме того, можно использовать вычислимые столбцы.

Тип XML и пользовательские типы не разрешены для использования с sql:variable() и sql:column().

Пример: междоменный запрос с использованием sql:variable()

В этом запросе передается ISBN элемента <book> при помощи переменной SQL @isbn. Вместо константы, переменная sql:variable() содержит значение ISBN, и запрос может использоваться для поиска любого ISBN, а не только того, чье значение равно 0-7356-1588-2.


DECLARE @isbn varchar(20)
SET @isbn = '0-7356-1588-2'
SELECT xCol
FROM docs
WHERE xCol.exist ('/book[@ISBN = sql:variable("@isbn")]') = 1

Генерация набора строк из данных XML

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

Для этой цели в SQL Server 2000 есть OpenXml(). Это средство для создания набора строк из экземпляра XML через определение реляционной схемы для набора строк и способа конвертации значений экземпляра XML в столбцы набора строк.

И наоборот, метод nodes() может быть использован для генерации контекста узла внутри экземпляра XML; и контекст узла может использоваться в методах value(), query(), exist() и nodes() для создания желаемого набора строк. Метод nodes() получает выражение XQuery, применяет его к каждому экземпляру XML в столбце XML, и эффективно использует индексы XML. Следующий пример показывает использование метода nodes() для создания набора строк.

Пример: получение свойств из экземпляра XML

Предположим, Вам нужно получить имена и фамилии авторов, чье имя не "David", в наборе строк с двумя столбцами, FirstName и LastName. Вы можете сделать это, используя методы nodes() и value():


SELECT nref.value('first-name[1]', 'nvarchar(50)') FirstName,
  nref.value('last-name[1]', 'nvarchar(50)') LastName
FROM docs CROSS APPLY xCol.nodes('//author') AS R(nref)
WHERE nref.exist('.[first-name != "David"]') = 1

В этом примере nodes('//author') порождает набор ссылок на элементы <author> для каждого экземпляра XML. Имена и фамилии авторов получаются с помощью методов value(), относящихся к этим ссылкам. Для хорошей производительности столбец XML должен быть проиндексирован, что и является темой следующей главы.

Индексирование данных XML

Данные XML хранятся во внутренней двоичной форме, и могут достигать объема в 2 гигабайта. Каждый запрос анализирует данные XML в каждой строке таблицы один или несколько раз во время работы. Это приводит к замедлению обработки запроса. Если запрос часто повторяется, то лучше проиндексировать столбец XML, хотя и нужно принять во внимание возрастающие при этом затраты на изменение данных.

Индексы XML создаются при помощи новой команды DDL на типизированных и нетипизированных столбцах XML. Индекс создает сбалансированное дерево по всем экземплярам XML в столбце. Первым создаваемым индексом на столбце XML является "первичный ключ XML". С его помощью поддерживаются три типа вторичных индексов XML на столбце XML для ускорения часто используемых классов запросов, как показано в следующей главе.

Первичный индекс XML

Первичный индекс XML требует наличия кластерного индекса на первичном ключе базовой таблицы (т.е. таблицы, в которой создан столбец XML). Первичный индекс XML создает сбалансированное дерево на поднаборе элементов Infoset узлов XML. Столбцы сбалансированного дерева представляют тэги, такие, как названия элементов и атрибутов, значения и типы узлов. Другие столбцы указывают порядок и структуру документов в данных XML и путь из корня экземпляра XML до каждого узла для эффективной оценки выражений пути. Первичный ключ базовой таблицы дублирован в первичном индексе XML для соответствия строк индекса со строками базовой таблицы.

Тэги и названия типов из схем XML конвертируются в значения типа integer, и конвертированные значения хранятся в сбалансированном дереве для оптимизации хранения. Столбец пути в индексе хранит последовательность конвертированных значений в обратном порядке, т.е. от узла до корня экземпляра XML. Обратное представление позволяет сравнивать значения пути, если известен суффикс пути (в выражении пути, таком, как //author/last-name).

Если основная таблица секционирована, то первичный индекс XML секционируется таким же образом, т.е. с использованием той же функции и схемы секционирования.

Полные экземпляры XML получаются из столбцов XML (SELECT * FROM docs или SELECT xCol FROM docs). Запросы, включающие методы XML, используют первичный индекс XML и возвращают скалярные значения или поддеревья XML из самого индекса.

Пример: создание первичного индекса XML

Следующая команда создает индекс XML idx_xCol на столбце XML xCol таблицы docs:


CREATE PRIMARY XML INDEX idx_xCol on docs (xCol)

ПРОДОЛЖЕНИЕ СЛЕДУЕТ

[В начало]

ССЫЛКИ НА СТАТЬИ

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

Создание OLAP-отчетов с помощью Crystal Reports 9: OLAP и аналитика
Зайцев С.Л.
OLAP: Многие компании отдают предпочтение хорошо зарекомендовавшему себя инструменту генерации отчетов Crystal Reports от компании Business Objects/Crystal Decisions, обеспечивающему высококачественное форматированное представление информации на базе накапливаемых в организации данных...
Критерии выбора СУБД при создании информационных систем
А. Аносов
SQL: Выбор системы управления баз данных (СУБД) представляет собой сложную многопараметрическую задачу и является одним из важных этапов при разработке приложений баз данных. Выбранный программный продукт должен удовлетворять как текущим, так и будущим потребностям предприятия, при этом следует учитывать финансовые затраты на приобретение необходимого оборудования, самой системы, разработку необходимого программного обеспечения на ее основе, а также обучение персонала. Кроме того, необходимо убедиться, что новая СУБД способна принести предприятию реальные выгоды...
Microsoft продолжает тестировать Yukon
ZDNet.ru
MSSQLServer: Microsoft выпустила еще одну опытную версию своей будущей СУБД SQL Server 2005 и предложила бесплатный инструмент управления...
Реализация полнотекстового поиска в SQL Server
GrushaM
MSSQLServer: Если Вы хотите организовать полнотекстовый поиск у себя на сайте, то эта статья для Вас. Прочитав ее Вы узнаете с чего начать и какие есть "подводные камни" при реализации этого сервиса, также приводится простенький пример на C#. Вообщем, постараюсь изложить основное кратко и последовательно...
Основы XML
gotdotnet.ru
XML: На сегодняшний день уже всем специалистам в области веб-технологий стало очевидно, что существующих стандартов передачи данных по интернету недостаточно. Формат HTML, став в свое время прорывом в области отображения содержимого узлов интернета, уже не удовлетворяет всем необходимым на данный момент требованиям. Он позволяет описать то, каким образом должны быть отображены данные на экране конечного пользователя, но не предоставляет никаких средств для эффективного описания передаваемых данных и управления ими...
Управление транзакциями. Разработка распределенных приложений в .NET
gotdotnet.ru
MSSQLServer: В этой статье описывается, как выполнять локальные и распределенные транзакции в приложениях Microsoft .NET...
Операции над данными с иерархической структурой. Разработка распределенных приложений в .NET
gotdotnet.ru
ADO: В этой статье рассматриваются операции над иерархическими наборами строк с помощью ADO.NET....
Руководство по архитектуре доступа к данным на платформе .NET
gotdotnet.ru
ADO: В этом документе излагаются принципы разработки на основе ADO.NET уровня доступа к данным многоуровневого приложения .NET. Основное внимание уделяется ряду наиболее распространенных задач и ситуаций, связанных с доступом к данным. Даются рекомендации по выбору наиболее подходящих методов и приемов...
Инструменты управления SQL Server 2005: Никаких тайн
Euan Garden
MSSQLServer: При проектировании новых и доработке существующих инструментов управления SQL Server 2005 (кодовое имя Yukon), группа разработчиков инструментария SQL Server старалась соблюдать два основных принципа: "никаких тайн" и Интеграция. Euan Garden является менеджером команды, разрабатывающей инструментарий SQL Server 2005. В интервью журналу SQL Server Magazine он рассказывает, как его команда внедряла эти принципы в функции управления базой данных, что должно сделать их более прозрачными, устойчивыми и легкими в применении...
Проектирование XML-словарей с помощью UML, часть I
Дэвид Карлсон
XML: Сообщество разработчиков программ, системных интеграторов, XML-аналитиков, авторов и разработчиков B2B-словарей сразу же отреагировало на публикацию Спецификации W3C XML Schema. Некоторые радовались более богатой структуре и семантике, которая может быть выражена при помощи новых схем по сравнению с DTD, другие же наоборот говорили о чрезмерной их сложности. И многие сошлись на том, что результирующие схемы сложны для широкой аудитории пользователей и бизнес-партнеров. Из всех различных подходов к XML Schema, мне удобнее рассматривать ее просто как синтаксис для реализации моделей бизнес-словарей. Зачастую при создании новых словарей или совместном использовании с пользователями уже определенных другие формы представления моделей более эффективны, чем W3C XML Schema. В...

[В начало]

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

Four of a Kind - Backup Software Shootout Part 2
Wesley Brown
Welcome back, in part one we took a look at four different software packages that have many, many features, but all had one thing in common, the ability to compress backups. If you haven’t read part one please review it here. The four solutions we chose for this article were SQL LiteSpeed by Imceda, SQL Safe from Idera, UltraBac from UltraBac Software, and MiniSQLBackup from yohz Software
Data validation 1: Control user choices with lists in Excel
Colin Wilcox
Have you ever needed to create drop-down lists on a worksheet? This column explains how, and it introduces a larger feature called Data Validation. This is part one of two articles. The next column explains other Excel data validation tools
Understanding SQL Server Version Meanings
Kevin Kline
As SQL Server users, many of us are familiar with the major version numbers used by SQL Server over the years. For example, SQL Server versions 6.0, 6.5, and 7.0 all begin with their respective version numbers, while SQL Server 2000 starts with version number 8.00.xxx. If you’re a veteran of SQL Server, as I am, you might even remember version numbers like 4.21 and 4.21a
64-Bit Vs. 32-Bit Memory Management
Prakash Sundaresan
When you see Kalen Delaney, Kevin Kline, Trey Johnson, Itzik Ben-Gan, and other SQL Server experts at conferences or read their articles, do you ever wonder what it might be like if your name were on that list of industry leaders? Do you wish you could share your knowledge and experience and achieve recognition among your peers? Although it takes work, making a name for yourself isn't terribly difficult. From personal experience and interviews with industry publishing and user group representatives, I've put together a collection of tips and tricks that will get you started writing, speaking, and volunteering in the SQL Server community
Performance Analysis of View Maintenance Techniques for Data Warehouses
Xing Wang, Le Gruenwald and Guangtao Zhu
Data warehouse stores integrated information as materialized views over data from one or more remote sources. These materialized views must be maintained in response to actual relation updates in the remote sources
Coding Standards - Part 1
Steve Jones
Everyone needs standards. They promote cleaner code, better programming, and make it easier for teams of people to work together. Standards are one of the foundations upon which computer science is built. Coding standards (as I define them) are the standards which specify how the object source code is written. This includes the format, documentation, structure of the object code, etc. Having good coding standards ensures that all object source code looks similar and allows different members of a team to more quickly understand the object
SQL Server 7.0, 2000, 2005 Clustering Resources
Brad M. McGehee
As important as SQL Server clustering is to those companies that implement it, trying to find good information on how to implement and administer it is another story. And this is why I put this article together. If you are seriously considering implementing SQL Server 7.0, 2000, or 2005 (beta) under Windows 2000 Advanced Server or Datacenter editions; or Windows 2003 Enterprise or Datacenter editions; then I highly recommend that you review these web links before you begin. SQL Server clustering has many gochas, and the best way to breeze past them is to know about them before you begin
Managed code in SQL Server Yukon: A big deal?
Nick Wienholt
This article attempts to answer the question of when managed code makes sense inside the database
Data-Modeling Tools Aren't Physically Fit
Brian Moran
In March, I pointed you to a Microsoft survey about a new data-modeling tool that Microsoft hasn't yet announced but is presumably planning. In my commentary "Data Modelers, Arise, and Take Microsoft's New Survey", I asked you what design features are most important for Microsoft to include in a data-modeling tool. I also promised to share my thoughts about what we need in a data-modeling solution
SQL Server DO's and DON'Ts
Daniel Turini
So, you are now the leader of a SQL Server based project and this is your first one, perhaps migrating from Access. Or maybe you have performance problems with your SQL Server and don't know what to do next. Or maybe you simply want to know of some design guidelines for solutions using SQL Server and designing Database Access Layers (DAL): this article is for you
What are the main differences between Access and SQL Server?
aspfaq
This article will try to explain some of the differences between Access and SQL Server. It is not an exhaustive list, and in no means should be considered an ultimate authority. If you have anything to add or correct, please let us know
How do I handle REPLACE() within a TEXT column in SQL Server?
aspfaq
I recently was confronted with a problem where a piece of text that was included in many TEXT column values in a table needed to be replaced with another piece of text. You can't issue normal REPLACE statements against TEXT columns, so this seemed to be a bit of a challenge — issuing a REPLACE() against a TEXT or NTEXT column in SQL Server yields
How do I monitor SQL Server performance?
aspfaq
There are some Microsoft tools that can help monitor your database performance
How do I get the result of dynamic SQL into a variable?
aspfaq
Often, people want to use dynamic SQL. While usually this indicates a lack of forethought in the data model, there is an occasional valid use. In either case, it is not very intuitive to get the result of a dynamic SQL statement into a variable. Consider the following
Implementing a FIFO and a LIFO stack
Arthur Fuller
You've probably used both of these constructs in a front-end language before, but they can be used in SQL Server as well
Introduction to MSSQL Server 2000 Analysis Services: Semi-Additive Measures and Periodic Balances
William Pearson
Most of the measures with which we work in our daily Analysis Services environments are additive, and include various options for easy aggregation, comprised of the ever-familiar SUM, MAX, MIN and COUNT. Most base measures involving transactions, such as sales or direct expenses, are inherently additive. We typically find additive measures simple and useful in our work within analysis and reporting systems, because there are no inherent restrictions on how they are used in our cubes. Such measures can be sliced and diced in any "direction," for example. Using the four aggregation types to derive aggregates from previously aggregated results is only one example of how we can easily leverage the power of OLAP as implemented in MSAS. With additive measures, aggregation is applied consistently to all dimensions: the measures roll up equally well, within the same aggregation type, across all
SQL Server 2005 Part 3 - High Availability and Scalability Enhancements - Failover Clustering
Marcin Policht
In the previous article of this series, we started reviewing high availability and scalability enhancements in SQL Server 2005 (based on its recent Beta 2 release) by discussing database mirroring. In this article, we will continue exploring the same area of functionality, shifting our attention to failover clustering. We will also provide comparison of both features, which should help in recognizing the types of scenarios for which each of them is better suited
Script Language and Platform: SQLServer 7.0, 2000
Sushant Saha
The following script is to find out which tables in MSSQL Server have Identity fields. In addition, the script displays the Seed & Increment value for each user table in a database
Using Performance Monitor To Identify SQL Server Hardware Bottlenecks
Brad M. McGehee
The best place to start your SQL Server performance audit is to begin with the Performance Monitor (System Monitor). By monitoring a few key counters over a 24 hour period, you should get a pretty good feel for any major hardware bottlenecks your SQL Server is experiencing
How To Identify And Delete Duplicate SQL Server Records
Randy Dyess
Recently, I was asked to help someone clean up their database after they had double loaded an import file
Set Disruptors ON FULL
Neil Raden
Rationalizing data across an enterprise is a problem so hard that it's only been attacked piecemeal. Andy Hayler of Kalido, in an essay published at Intelligent Enterprise's Web site ("EII: Dead on Arrival"), argued that enterprise information integration (EII) was a half-baked idea that ran roughshod over the essential disciplines of data warehousing. Hayler felt that benefits claimed by EII solutions, which advocate a federated rather than centralized approach to data warehousing, were ill-founded and poorly conceived (my words, not his). Specifically, he argued, EII does not address historical data, data quality, and the performance of queries against systems not optimized for decision support
Insert specific values into an identity column
Arthur Fuller
In SQL Server, it's possible to insert missing rows in a sequentially keyed tables, providing you take some care
Reader Contributed String Parsing UDF InString
Andrew Novick
UDFs make the job of parsing strings in T-SQL easier to handle because they can encapsulate key parts of the required functionality. The InString function is a good example of how to get a leg up on this unwieldily task
Using Parent Package Variables in Package Configurations. Version 2005
Allan Mitchell
Package configurations are now the prescribed way of being able to set values within your package from an outside source. One of the options for the source is Parent Package Variable. The name is perhaps a little misleading so this article is meant to guide you through this slight confusion and into using them. It also helps to explain a key concept in SQL Server Integration Services
The ReverseString Component Explained. Version 2005
Allan Mitchell
This article is meant as a very gentle introduction into creating your own custom transformation component in SQL Server 2005 Integration Services. In the article we will be touching upon a few of the essential methods available to us in the new object model and showing you how to set a few of the new properties. A single article such as this cannot do justice to the wealth of methods and properties available so in upcoming articles we will be building components that use different pieces of the object model or functionality
When to use ProcessInput or PrimeOutput in your Component. Version 2005
Allan Mitchell
When building our own custom pipeline components two methods in particular are very important and it may become a little confusing as to which one is used in which situation
File Watcher Task. Version 2005
Darren Green
The File Watcher Task does what it says really, it watches a folder waiting for files. When a file is found the task completes, returning the name of the file found in the task's ExecValueVariable. The created and changed events are both monitored, so new files and changes to existing files are detected. In addition a file is not considered for the task result until it is freely available and no longer used by any other process. This is of particular importance for slowly writing processes, such as a FTP transfer or other WAN speed transfer
How to add an icon to your component. Version 2005
Darren Green
When developing your own custom components for that more professional, and also practical, finish you may want to use your own icon rather than relying on the default system icon. You set this through the IconResource property of the appropriate component attribute; DtsTask for a control flow component or task, DtsPipelineComponent for a data flow component, and DtsConnection for your own connection manager. The DtsConnection IconResource functionality is not fully implemented for the beta 2 release, and you will always get the default icon
Checksum Transformation. Version 2005
Darren Green
The Checksum Transformation computes a hash value, the checksum, across one or more columns, returning the result in the Checksum output column. The transformation provides functionality similar to the T-SQL CHECKSUM function, but is encapsulated within SQL Server Integration Services, for use within the pipeline without code or a SQL Server connection
Get all from Table A that isn't in Table B. Version 2005
Jamie Thomson
A common requirement when building a data warehouse is to be able to get all rows from a staging table where the business key is not in the dimension table. For example, I may want to get all rows from my STG_DATE table where the DateID is not in DIM_DATE.DateID
For Loop Container Samples. Version 2005
Darren Green
One of the new tasks in SQL Server 2005 is the For Loop Container. In this article we will demonstrate a few simple examples of how this works. Firstly it is worth mentioning that the For Loop Container follows the same logic as most other loop mechanism you may have come across, in that it will continue to iterate whilst the loop test (EvalExpression) is true. There is a known issue with the EvalExpression description in the task UI being wrong at present. (SQL Server 2005 Beta 2).
File Inserter Transformation. Version 2005
Allan Mitchell
SQL Server 2005 has made it a lot easier for us to loop over a collection and with each iteration do something with the item retrieved. In this article we are going to show you how to iterate over a folder looking at the files within and doing something with those files. In this instance we will be entering the filename into a SQL Server table and we will then load the actual files we have just found into another SQL Server table. You will note here that there is still the need to load the file names into a table as an intermediate step just as we need to do in SQL Server 2000
Exploring Table and Index Partitioning in SQL Server 2005
Rob Garrison
Table partitioning is a powerful new feature in SQL Server 2005. It is primarily a manageability feature, but my interest here is in the performance and scalability of table and index partitioning for use with very large tables
Tuning Association Rules
DMTeam
This tip describes how parameters of the association rules algorithm affects the models it generates. Sometimes it’s tricky to set the right parameters for the Association Rules mining algorithm. Depending on your data, you may find nothing very quickly, or more than you can handle after quite some time. The nature of the Association Rules algorithm is such that the size and quality of the resultant model is highly sensitive to the modeling parameters. The Association Rules algorithm counts items that happen together, called frequent item sets. The potential number of itemsets is equal to the number of possible combinations of attribute/value pairs in your data – a huge number. Therefore, the Association Rules algorithm uses its parameters to limit the number of combinations it will consider. Once itemsets are determined, the Association Rules uses those itemsets to determine rules. Additional parameters are provided for determining what conditions have to be met to create a valid rule
Moving and Sharing Mining Models
DMTeam
This tip describes how to export individual models to share or deploy to other servers
Optimizing Microsoft SQL Server Analysis Services: MDX Optimization Techniques: Segregating DISTINCT COUNT
William E. Pearson, III
In this article, we will continue the examination of distinct counts we began in our previous article, Considering DISTINCT COUNT. Having discussed why distinct counts are useful, and often required, within the design of robust analysis and reporting applications, we described some of the challenges that are inherent in distinct counts. We then undertook practice exercises to illustrate general solutions to meet example business requirements, providing an approach afforded us by the MSAS user interface, and then an alternative approach we enacted using MDX. Our purpose, as we stated, was to lay the framework for this and subsequent articles, where we will focus upon specific scenarios that occur commonly in the business environment, where optimization of distinct counts can become a very real consideration
Computing the Trimmed Mean in SQL
Bob Newstadt
This article by Bob Newstadt presents code to compute a trimmed mean in SQL. The trimmed mean is a more robust version of the simple mean (SQL AVG() aggregate function). It is a useful tool for summarizing ill-behaved real world data
More SQL Server 2005 Bits
Brian Moran
Last week, Microsoft released the second SQL Server 2005 Community Technical Preview (CTP). I wrote about the CTP program a few weeks ago (see "Technology Previews Deliver Pre-Beta 3 Peeks at SQL Server 2005" at http://www.windowsitpro.com/article/articleid/44291/44291.html ). Microsoft will release SQL Server 2005 CTP builds more frequently than it does for typical beta cycles, primarily to speed up the feedback cycle so that the company can incorporate as much user input as possible into SQL Server 2005's final release. SQL Server 2005 CTP 2 is now available to all Microsoft Developer Network (MSDN) subscribers. Non-MSDN subscribers can't directly download or acquire the CTP builds, but your local Microsoft field office will probably be open to distributing the bits to customers who are interested in exploring SQL Server 2005—just use your usual channels for communicating with your local Microsoft sales representatives
INF: Analyzing and Avoiding Deadlocks in SQL Server
This article was previously published under Q169960. Microsoft SQL Server maintains transactional integrity and database consistency by using locks. SQL Server version 6.5 optionally uses row- level locking for insert operations and uses page-level locking for other operations. As with any relational database system, locking may lead to deadlocks between users
Upload multiple files to SQL Server Image column
Muthusamy Anantha Kumar
This article examines how to upload multiple files to a SQL Server table. There are many ways to do this. The method I would like to introduce takes advantage of the OSQL.exe utility and the TEXTCOPY.exe utility
What is the difference between the drop and truncate table commands?
Mich Talebzadeh
Drop <table> drops the table, including the table definition and the associated objects (rules, indexes, constraints, triggers, primary key and so on). Obviously once a table is dropped; all the data rows contained in the table are also removed
Finding Objects Owned by non-DBO Users
Santveer Singh
In this article I will show how can we get the list of all the objects (table, Procedure, view or user defined function) owned by non DBO users. I believe this occurred most on Development server where developers doesn’t have DBO rights in Database. To get the list of object we need to create below table and procedure
Diagnosing and Troubleshooting Slow Partitioned Merge Processes
Dean Kalanquin
Learn how to achieve scalable, high-performance merge replication applications. (29 printed pages)
Jump-Start Development With SQL Server 2005
Hal Hayes
After many years, Microsoft is finally going to release a new version of SQL Server. SQL Server 2005 encompasses an explosion of capabilities, choices, and technologies that will engage and task the application developer throughout this decade like never before. Of course, incorporating these new technologies will require a well-informed and grounded understanding of the features and architecture. Fortunately, Bob Beauchemin, Niels Berglund, and Dan Sullivan, have written A First Look at SQL Server 2005 for Developers to help
Validate Credit Card Numbers with the Luhn Function
Andrew Novick
Credit card numbers are among the most common numbers in commercial use today. Most credit card numbers and many other numbers used in financial services use the Luhn (a.k.a Mod 10) formula for check digits. It's been formalized as part of the ANSI X4.13 specification
Using TOP and ORDER BY in DMX
DMTeam
This tip demonstrates syntax for PREDICTION JOIN statements to return only the most likely respondants
Automating Reindexing In SQL Server 2000
Tom Pullen
In all OLTP environments, virtually all indexes will become fragmented over time. Nearly all UPDATE, INSERT or DELETE activity will cause your indexes to become less well organized than they were when they were first created. There will be more page splits, there will be a greater number of pages with less data on them, and consequently, there will be more I/O required to satisfy each SELECT. And the more fragmented your data and indexes become, the slower your application will be, and the more space your data will take up. What can you do to address this? You can reindex them on a regular basis
Troubleshooting SQL Server Extended Stored Procedures
FAQ
Using Tranasaction on Distributes servers and querying them - Linked Servers
R. Senthil Kumaran
Using Tranasaction on Distributed servers and querying them - Linked Servers in Sql Server. Say for example you are having your Stock database and Sales database both are in different locations (geographic locations) then you need to use your Action qry on both the servers. For this criterion let’s see how can u Implement a Transactions
Welcome to the Microsoft .NET Framework SDK QuickStart Tutorials
Microsoft
The QuickStart Tutorials are the fastest way to understand what the .NET Framework technology offers leading-edge developers. Inside you'll find information about the most compelling features of the .NET Framework technology, including how to put them immediately to work for you or your company. To get started, follow the links below
Scrollable DataGrid with Sorting
ExtremeExperts.com
This article is continuation to my previous article in msdn India on "Creating Scrollable DataGrid Web Server Control". In that article i have explained about how to create scrollable datagrid with fixed header. After reading this article, one of the frequent question from reader on that article was "how to enable default sorting in this type of datagrid". So in this article, i am going to explain how to enable sorting in scrollable Datagrid with fixed header
Overview of ADO.NET 2.0(Whidbey) New Features
ExtremeExperts.com
In this article, i am going to talk about some of the new features of ADO.NET 2.0. I just started working on ADO.NET 2.0. So this is just an starting, I will keep updating this article as when i find anything interesting in ADO.NET 2.0
Save Query Output in SQL Server
ExtremeExperts.com
There are requirements in various forums that you would like to save the output of the query. There are a number of solutions given. In this code snippet I will give you a method to use this from a script point of view. For the given task I create a generic proc that will facilitate in extracting this data into a file. The procedure looks like
DDL Triggers for SQL Server 2005
ExtremeExperts.com
There are loads of features we can explore in SQL Server 2005. Here is one such feature that I personally would call it as the DBA's requirement. Here in this article we will take a snapshot to what DDL triggers are and how it can be extended to our needs. DDL Triggers are new in SQL Server 2005. Fundamentally SQL Server 2005 allows us to existing set of available triggers to the next level. In these trigger we can execute a trigger for all available DDL statements in the system. Let's take a quick snapshot of using the same
Embedded Databases
Parveen Aggarwal
An Embedded database is a specific database genus that does not run as a separate process, instead, it is directly linked ("embedded") into the application. Herein, the database is integrated into the application and the end-user has little or no knowledge that the database exists. Embedded databases are sometimes referred to as "fire and forget" or "implement and forget" databases, since they require no or minimal database administration
SQL Server 2005 DBCC Command Quick Reference
Jon Reade
New, undocumented and retired DBCC Commands in SQL Server 2005
SQL Server Video How To Library
sqlservercentral.com
Welcome to the SQLServerCentral.com video how-to library
Mapping user and login security
Baya Pavliashvili
If you use SQL Server authenticated logins to connect to databases, the following scenario should sound familiar: you backup the database on the production server, restore it on the development/test server and the application doesn't work. What's wrong? You immediately check the users' node in the Enterprise Manager and notice that database users aren't mapped to respective logins. You next look at the list of logins on your development server and it's identical to that on your production server. How is it then that database users aren't mapped to logins?
Managing OLAP and Relational Data with SQL Queries
Hyperion
This Hyperion white paper describes methods for accessing and incorporating relational data into your Hyperion Analyzer reports. Step-by-step procedures describe configuring relational database access, composing a SQL query and coordinating relational data with OLAP data. Sample relational data and Hyperion Analyzer report groups are provided to support the examples included in this white paper
Detecting and Reporting Errors in Stored Procedures - Part 1: SQL Server 2000
Rob Garrison
Detailed error reporting from stored procedures can be extremely valuable when debugging problems in your application. I will share different levels of detail that you can build into your stored procedures. You can choose the level of detail appropriate for your situation
Working with DataGrid in VC++.NET
Arul Nayagam C A
This is my small contribution from what I learnt in my walk towards VC++ .NET. It's a really simple and very often used scenario: working with DataGrid. Here, I developed a small application which creates database and stores the data (image), and also retrieves data from the database and displays it in the DataGrid

[В начало]

ФОРУМ SQL.RU

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

Восстановление данных
SQL Server Health and History Tool (SQLH2) Reports
Raw partition
SQL Server 2000 Personal Edition
Бэкап базы не отходя от кассы, т.е. во время работы (подскажите вариант)
UPDATE на несколько полей сразу ???
Репликация по FTP
Книга по Reporting Service
Отладчик (debugger) не работает после установки Windows XP Service Pack 2
Высокоскоростной доступ к данным?
Индексированные View и синтаксический разбор SELECT-запросов
процент выполнения запроса
И снова ADSI & LDAP. Помогите...
Закачка данных из dbf таблиц. Название таблицы - переменная.
Выполнить процедуру для набора записей
Информация о журнале транзакций
Вопрос про unicode
Больше книг хороших и разных!
Помогите пожалуйста с запросом

[В начало]

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

Как отследить что пользователь открыл большую транзакцию?
Полнотекстовый поиск в MS SQL 2000
MS SQL Server в качестве сервера БГД
Reporting Services. An internal error occurred on the report server.
Почему DESCRIPTION полей пустой, когда я получаю их список методом OpenSchema?
Transaction Log - backup file size
Call Oracle SP, не баян, важно

[В начало]

ПОЛЕЗНОСТИ

MS SQL Server 2000: управление и программирование

Гамильтон Б.

"BHV-Санкт-Петербург" ∙ 2004 г. ∙ 608 стр

Рассмотрены проектирование реляционных баз данных,возможности SQL Server 2000, основы языка SQL, архитектура баз данных сервера SQL, средства управления Microsoft SQL Server и доступ к данным.Изложены вопросы,связанные с программированием на стороне сервера: язык Transact-SQL, транзакции, система безопасности. Даны практические рекомендации по доступу к данным из клиентских приложений с помощью ODBC и OLE DB с использованием Visual C++.NET и Visual FoxPro 8.0. Рассмотрена поддержка WEB-приложений в SQL Server 2000.

[В начало]

#227<<  #228

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

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

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



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


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

В избранное