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

MS SQL Server

  Все выпуски  

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


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

#262<<  #263

СОДЕРЖАНИЕ

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

Первая встреча UserGroup летом 2005 года!

В рамках работы Speakers Bureau приезжают докладчики из Новосибирска: Дмитрий Полюдов (_MarlboroMan_) и Антон Злыгостев (Sinclair). Это будет последняя встреча RSDN & MDNA UGs в старом офисе Microsoft. Правда еще 23-го будет встреча Российской группы разработчиков Windows Embedded, а 27-го - встреча группы VBStreets. На встрече будет много подарков в виде книг, журналов, дисков.

Начало встречи: 19:00
Окончание встречи: 21:30

Встреча состоится по адресу: г. Москва, м. Сокол, Чапаевский переулок д.14. офис компании Microsoft

Содержание встречи:

  1. 19:00 - 20:00. Использование InfoPath. Докладчик: Антон Злыгостев

  2. 20:00 - 20:10. Перерыв (чай, кофе)

  3. 20:10 - 21:30. SQL Server Reporting Services. Докладчик: Дмитрий Полюдов

Зарегистрироваться на встречу


СТАТЬИ

Методика, которая гарантирует в SQL Server 2000 выбор определенного плана исполнения запроса

По материалам статьи Ken Henderson: A technique for ensuring plan stability in SQL Server 2000
Перевод Ирины Наумовой

Одной из важнейших особенностей SQL Server является процессор оптимизации запросов. В Sybase версии SQL Server была реализована передовая технология оптимизации запросов "на лету", и, даже по настоящее время, встроенная оптимизация запроса - одна из самых полезных особенностей этого продукта. Таким образом, автоматически оптимизируя запросы конечных пользователей, SQL Server продолжает эту традицию отделения логической обработки запросов от физических операций, чем обеспечивает повторное использование планов запросов и лучшую гибкости их обработки в большинстве практических применений.
Однако, имеют место случаи когда некоторые из особенностей оптимизатора могут вызвать проблемы. Иногда он просто чересчур сильно вмешивается. Один из таких случаев - когда оптимизатор запросов автоматически использует значения параметра, переданного в хранимую процедуру для определения плана исполнения запроса. Т.н. прослушивание параметров полезно в большинстве случаев и такой подход позволяет оптимизатору принимать во внимание реальные значения параметров хранимой процедуры, поскольку планы выполнения запросов формируется в пределах процедуры, которая их использует. Другими словами, если Вы передаете значение "bar" для параметра, названного @foo, а затем используете foo в предложении WHERE запроса внутри процедуры, оптимизатор достаточно эффективно оценит сколько строк в возвращаемом наборе будет соответствовать значению "bar" в фильтре WHERE, поскольку он создает план выполнения на основании самого запроса.
В то время как прослушивание параметров конечно достаточно мощная особенность SQL Server, но как раз он и может стать проблемой, в случае если план процедуры был удален из кэша процедур (или никогда не был помещен в кэш) до запуска процедуры с нетипичными значениями параметра. Это может привести к тому, что будет построен план, адаптированный к нетипичному использованию, является неоптимальным (или даже медленным) при выполнении процедуры с типичными значениями параметра. Единожды кэшируемый, план запроса может многократно использоваться для значений параметра, которые изменяются в достаточно большом диапазоне, идеальная ситуация - это когда имеется план в кэше, который охватывает использование процедуры с типичными значениями параметра в максимально возможной степени. Если план попал в кэш, который ориентирован на использование нетипичных значений параметра, это может привести к потере производительности.
Думаю, на примере это будет понятней. Предположим, что у нас есть хранимая процедура, которая возвращает данные о продажах по каждой стране. В нашем примере, три четверти всех продаж происходят в США. Процедура берет единственный параметр, @country, указывая страну, чтобы возвратить информацию о продажах. Этот параметр используется для того, чтобы отфильтровать данные, полученные с помощью простого SELECT, который возвращает информацию обо всех продажах.
Как правило, оптимизатор выбрал бы метод сканирования кластерного индекса при выполнении этого запроса, потому что (принимая то, что чаще всего для @country будет передаваться значение: "США") так или иначе, будет просмотрено много строк таблицы и сканирование кластерного индекса будет требовать меньшего количества операций ввода - вывода, и будет выполняться быстрее чем повторное сканирование не кластерного индекса. Однако, что случится, если план будет удален из кэша (скажем, из-за автоматического обновления статистики) до того как пользователь вызывал процедуру с параметром, скажем, "BEL" (Бельгия), где почти нет никаких продаж? Если предположить, что подходящий индекс существует, оптимизатор может решить использовать не кластерный индекс при создании нового плана исполнения запроса. Последующее выполнение процедуры будет многократно использовать этот план, даже если в качестве значения параметра @country будет передано "США". В результате это может привести к более медленному исполнению запроса, чем при использовании плана на основе сканирования таблицы.
Есть множество причин, по которым план выполнения запроса может быть удален из кэша, и эти причины не имеют ничего общего с деятельностью конечных пользователей. Это, вместе упомянутым выше прослушиванием параметров, может привести к непредсказуемой производительности выполнения хранимых процедур, параметры которых при вызове могут варьироваться в достаточно широком диапазоне.
В SQL Server 2005 уже имеются средства борьбы с этим, но в предыдущих версиях нет таких встроенных возможностей. Однако, есть довольно простая уловка, которую Вы можете использовать, чтобы управлять тем, какое значение параметра будет оценивать оптимизатор при создании плана выполнения запроса. Эта уловка работает на любой версии SQL Server, начиная с версии 7.0. Определение значений непосредственно в процедуре вводит в заблуждение оптимизатор и фактически отключает прослушивание параметров. Давайте рассмотрим следующий код:

CREATE PROC prSalesByCountry @country char(3), @template_country char(3)="USA" AS SET @template_country = @country SELECT *
FROM
sales
WHERE
country = @template_country GO

Эта методика действительно очень проста. Мы отфильтровываем результаты запроса по параметру @template_country, который мы в действительности никогда не передаем в процедуру. Мы всегда передаем в качестве значения фильтра @country, и в качестве значения по умолчанию для фильтра используем @template_country. Оптимизатор обращает внимание, что мы фильтруем запрос по таблице продаж, используя @template_country, и осуществляет оценку по значению этого параметра (которое всегда будет "США" во время компиляции, потому что мы его не меняем и "США" - его значение по умолчанию) при создании плана запроса.
Обратите внимание на повторное присваивание значения параметра @country, значению template_country. Поскольку эта инструкция не выполняется, пока план не создан, оптимизатор не принимает это во внимание во время компиляции плана. Это - ключевой момент для понимания. Эта методика работает, потому что оптимизатор не может учесть повторное присваивание @country значения @template_country в процессе компиляции. Для оптимизатора, во время планирования инструкции SELECT, @template_country будет всегда иметь значение "США".
Таким образом, этот метод можно эффективно использовать для предотвращения прослушивания параметров и гарантии лучшей стабильности, по сравнению с причудами метода подбора параметра независимо от того, случается ли что-либо с кэшируемым планом через какой-то промежуток времени.
Конечно, этот метод хорош подходит для случаев с предсказуемыми значениями параметров, но что, если Вы хотите каждый раз получать разные планы при исполнении процедур с использованием нетипичных параметров? Для этого у Вас в распоряжении имеется несколько вариантов. Если компиляция Вашей процедуры не слишком дорогостоящая операция, Вы могли бы создать или выполнять процедуру, используя опцию WITH RECOMPILE. Также можно разбить типичные и нетипичные случаи на две различных процедуры так, чтобы они гарантированно получили свои собственные планы исполнения. Для реализации этого возможны несколько вариантов. Методика, приведенная выше, действительно предназначается для случаев, когда в чаще всего используется наиболее типичный параметр, где слишком часто происходит прослушивание параметров с повторным использованием плана, в комбинации с тем, что нельзя предсказать исполнение процедуры.
Этот подход был описан в моей последней книге The Guru's Guide to SQL Server Architecture and Internals . Для получения более подробной информации обратитесь к разделу " Parameter Sniffing" главы Query Processor этой книги.

[В начало]

Размер стека IA64

По материалам статьи Slava Oks: Be Aware: IA64 Stack Size
Перевод Александра Гладченко

Тема стека в операционной системе Windows всегда вызывает интерес. С ней связано много интересных технических проблем. В какие-то моменты Вы думаете, что полностью понимаете всё о стеке, но потом внезапно обнаруживаете ещё одну тайну.
В течение последних нескольких недель ко мне обращались наши тестеры и служба поддержки с вопросом о том, сколько потоков они должны указать в конфигурации SQL Server на платформе IA64 с 4 Гб оперативной памяти. Например, они спрашивали, будет ли приемлемо установить число потоков равным 1024?
Вероятно, Вы знаете, что SQL Server ограничивает верхний предел размеров своих стеков. Причиной, почему мы так сделали, является то, что это позволяет избежать неожиданных сбоев сервера при недостатке физической памяти, и если при этом компьютер ещё и задействовал весь возможный объём файла подкачки, после чего процесс может деактивироваться без какой либо регистрации этого факта в системе. Причиной такого нештатного поведения могла бы стать попытка процесса увеличить размер своего стека. Как любой серьёзный серверный продукт, SQL Server не может себе позволить такое поведение.
Конфигурация SQL Server на платформе IA64 предполагает использование стека размером в 2 Мб. Вы можете проверить это, анализируя заголовок образа SQL Server. Действительно ли он закрепляет за потоком такую большую часть памяти? Ответ - нет. На платформе IA64 существует две части стека - регулярный стек и стек поддержки хранилища. Поддержка хранилища - размещение движком СУБД потока для регистров процессора. Оно используется процессором для регистраторов потока к памяти, когда возникает ситуация, что больше нет доступных регистров.
Когда процесс устанавливает размер закреплённого за ним стека в 2 Мб, Windows закрепляет 2 Мб для регулярного стека и столько же для поддержки хранилища. Следовательно, каждый поток закрепляет 4 Мб оперативной памяти (если только Вы указали резервированию в Windows резервировать так много, но без закрепления). На рисунке 1 показано как в действительности выглядит стек потока на платформе IA64.

----------------------0x00000000000200000 | | 2 Мб | Стек | . | / \ | | | | | | ----------------------0x00000000000400000 | 2 Мб | Поддержка хранилища | | | | | | | | \ / | . ----------------------0x00000000000600000 Рис. 1.

Я хотел бы подчеркнуть несколько интересных моментов. Первый и них, это то, что Windows резервирует непрерывный участок VAS размером 4 Мб и для стека и для поддержки хранилища. Второй момент, это то, что разделение участка на две области осуществляется таким образом, чтобы стек и поддержка хранилища могли расти независимо.
Теперь мы дошли до того места, когда можно ответить на заданный в начале вопрос о том, сколько физической памяти будут потреблять 1024 потока. Ответ: 4 Мб * 1024 = 4 Гб. Полагая, что max server memory в SQL Server отражает только размер Буферного пула и обычно его настраивают так, чтобы бы он был близок к объёму физической памяти компьютера, в такой конфигурации SQL Server может работать очень плохо. Это может реально удивить многих. Максимальное количество потоков, которое стоит задать SQL Server, зависит от типа используемого приложения, и в данном случае оно определенно должно быть меньше 1024. Даже число потоков равное 512 может оказаться слишком большим.
Эта статься была бы неполной, если бы я так или иначе не упомянул переполнение стека. Поддержка хранилища работает со стеков IA64 не так, как на других платформах и переполнение стека не исключение. Операционная система должна реагировать на переполнение стека, как регулярного, так и поддержки хранилища. Удивлены! Для Вас это означает, что Вы должны быть осторожны при восстановлении от последствий переполнения стека, особенно если Вы на свой страх и риск восстанавливаете защиту страниц вручную. Но это уже другая, большая история.
Я надеюсь, что Вы узнали из этой статьи что-то новое и жду комментариев.

[В начало]

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

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

Справка по языку манипуляции данными SQL (DML SQL)
sql-ex.ru
SQL: При написании справки использованы те синтаксические конструкции стандарта SQL-92, которые поддерживаются в MS SQL Server. Мы надеемся, что этой справки окажется достаточно, чтобы освоить широкие и разнообразные возможности формулировки запросов произвольной сложности к реляционным базам данных. Хотя эта справка ориентирована, в первую очередь, на помощь при решении предлагаемых упражнений, она, тем не менее, охватывает практически все синтаксические конструкции операторов манипуляции данными. Соответствие используемого синтаксиса стандарту языка SQL сделает приобретенные знания универсальным средством взаимодействия с базами данных различных производителей. Приведены некоторые специфические конструкции, используемые в MS SQL Server...

Row-Level Security в РСУБД
Антон Злыгостев
MSSQLServer: Разграничение прав доступа является необходимой функциональностью любой корпоративной СУБД. Практические все современные СУБД предоставляют набор базовых средств по управлению правами доступа. Как правило, поддерживаются такие концепции, как пользователи и группы, а также так называемая декларативная безопасность - возможность предоставить этим пользователям и группам права доступа к определенным объектам базы данных. Немаловажным вопросом является гранулярность этой безопасности, т.е. насколько детально можно назначить права...

MS SQL Server 9 "Yukon". Интеграция с .NET
Антон Злыгостев
MSSQLServer: Не так давно в руки некоторых представителей RSDN Team попал предварительный релиз следующей версии MS SQL Server. Это даже не бета-версия, (что неудивительно - ведь до ожидаемого поступления финального варианта в продажу остался целый год), но мы не могли устоять перед искушением заглянуть в будущее...

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

Recovery to a Point in Time 2
v Grant Fritchey
Another look at recovering your SQL Server 2000 database to a point in time from Grant Fritchey. This is one of the very useful features in SQL Server 2000 and if you ever have the need to perform this actiom, you will appreciate the knowledge in this article

Global Temp Tables in SQL Server
The SQL Doctor is In
Ok, so Junior DBA strikes again and I learn more T-SQL tidbits. I did not realize that the scope of a global temporary table was the connection even if it was built in a stored procedure. But it doesn't. It is scoped to the connection

Cluster That Index! Part 2
Christoffer Hedgate
A while back I wrote an article about clustered indexes (Cluster that index!), where I stated that in my opinion all tables should have a clustered index defined for them. Since I wanted to keep the focus specifically on the advantages and disadvantages of clustered indexes I intentionally left some information and discussion regarding indexes out of the article. In this article I would like to elaborate on these matters as well as respond to some comments by readers to the previous article. If you haven't read that article I recommend you to do that prior to reading this one as much of this information relates to that of the other article

OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005
Matt Hall's Blog
I have been running through some backup and restore scenarios using BizTalk 2004 and SQL Server 2000 today, which have been quite time consuming. We were testing a scenario whereby an orchestration had a number of dehydrated instances and we would then destroy the database, restore it and then attempt to resume the orchestration instances

SSL security error
Kirk Haselden
In the CTP releases before June, you may have run into an issue with connecting to MSDB when attempting to enumerate packages there. You probably received an error message something like this

An introduction to static typing
Typed XML in SQL Server 2005
XQuery in SQL Server 2005 is a statically typed language. This means type errors may be raised during query compilation when an expression returns a value that has a type or cardinality that is not accepted by a particular function or operator. In short, your query will be checked for possible type inconsistencies before it is even run

xp_servicecontrol & platform system function
AG Blog
Interesting supervision to me today was sent by Irina Naumova. Investigating means of Profiler searches of a configuration of Multi Server Administration, she has found out not documentary procedure

Collation Conflicts
Julian Kuiters
If you've ever worked with databases from different sources, or with different collation settings, you've probably encountered an error like this

COLLATE
Julian-Kuiters
COLLATE - Keyword used to define string collation used for a database, column or server. Can also be used to cast the collation of a column or variable when used in a t-sql expression

Go home early with WAITFOR
Julian-Kuiters
It's late at night, you're still at work, waiting for long running task to complete so you can go home. Well why not make SQL Server 2005 wait for you?

Setting your default database to tempdb
Julian-Kuiters
Personally I like to set the default database for all logins to tempdb. It helps people remember to select the correct database before they start doing things. If someone forgets to change their database, i'd rather them attempting to do crazy things in tempdb instead of master

DDL Trigger - Prevent and Notify DDL Changes
Julian-Kuiters
SQL Server 2005 allows you to create DDL Triggers in a database, that fire whenever someone attempts to change the structure of your database

Troubleshooting Multiserver Jobs
doc.ddart.net
When using multiserver jobs, you may experience one or more of these problems

Multiserver Task Administration
Michael D. Reilly
One of the many features introduced with SQL Server 7.0 is the multiserver task capability. With it, you can set up a task, such as a backup or database maintenance, on one server and have that task copied to, and run on, multiple servers. Not only is this feature a big time-saver but it conveniently puts all reports in one place. Let's look at multiserver tasks, how to set them up, and when they can help a DBA. (Note that this information applies equally to SQL Server 2000 and 7.0.)

It's the Code, Stupid!
Joe Celko
Let me blurt out the punch line of this article in one sentence. The main performance problem in the huge majority of database applications is bad SQL code. It is not lack of hardware. It is not network traffic. It is not slow front ends. All of those problems have been solved by technologies that made them commodities instead of major purchases and custom-built items

How to Implement SQL Server Log Shipping Using Visual Basic
Dean Thompson
Log Shipping is a Disaster Recovery (DR) tool that provides you the ability to have a readily available "warm backup." Essentially, should your existing system fail, you have a backup SQL Server and database available to take over with relatively up-to-date information. If your database is critical to your business, such as in a call center, log shipping provides an incredible opportunity to make sure that business does not stop for long

How to Implement SQL Server Log Shipping Using Visual Basic
Dean Thompson
Log Shipping is a Disaster Recovery (DR) tool that provides you the ability to have a readily available "warm backup." Essentially, should your existing system fail, you have a backup SQL Server and database available to take over with relatively up-to-date information. If your database is critical to your business, such as in a call center, log shipping provides an incredible opportunity to make sure that business does not stop for long

What it means to be case insensitive
Sorting It All Out
Brad Eck asked (in the microsoft.public.dotnet.internationalization newsgroup):

Using full locales rather than the neutral ones?
Sorting It All Out
Late last year, I asked and answered two 'neutral' questions: What is a neutral culture? What is a neutral locale?

Paging with the ASP.NET DataGrid using J#
Lars-Inge Tonnessen
How to make paging with a ASP.NET 1.1 GridControl using J#.NET.

SSIS: How to do Upserts
Ashvini Sharma
This one came up earlier today. How would one do Upsert in the pipeline?

Roman's Weekly SQL Server Tip - How to protect tables from being deleted, Part 2
Roman Rehak
A few months ago I wrote a tip showing you how you can make sure that a table doesn't get dropped by accident. At the time it generated a lot of feedback and comments in other blogs. The solution involved creating a dummy view using the "WITH SCHEMABINDING" clause. That solution is workable but it is somewhat kludgy, even though you can automate it if you wish so..

Random number on a per row basis
SimonS' SQL Blog
So you've tried to get a random number on a per row basis however RAND isn't evaluated on a per row basis but on a row by row basis

SQL Server 2005 Grid results
SimonS' SQL Blog
It is nice to raise a bug and see it fixed. In Feb raised the issue that results in work bench were fixed to a certain height irrespective of the number of rows being displayed. this meant if you could only have 3 grids (on my laptop) of results. Where as in QA the space between the grids is reduced if the grid has less than 6 rows

Spid blocking itself post SP4
SimonS' SQL Blog
If you have noticed a SPID blocking itself i.e. the blocked column of sp_who2 is the same as the spid for the same row, this is due to an enhancement put into SQL in SP4 that allows for the monitoring of blocked latch requests

New 2005 Feature: WITH EXECUTE AS
The SQL Doctor is In
Thankfully Junior DBA didn't teach me anything earth shattering today, so I can keep going with stuff I have learned. The code is an excerpt from the book I am working on. I am currently in the final pages of the (now obligitory) Security chapter and working through the WITH EXECUTE AS clause in my section on security using stored procedures

[BrokerChallenge 0] SEND me a message
Write Ahead Blog
Over the past week I have been planning to launch the first open to public Service Broker. At the same time, my dev team was having a discussion regarding how we can do something cool and interesting to get the community involved in our product. So I decided to setup simple services on my public Service Broker to let people tinker around with it. This is the zeroth in a series of BrokerChalleges; zero since it requires hardly any skill, just the motivation to play with cool technology

Shared Source CLI Provides Source Code for a FreeBSD Implementation of .NET
Jason Whittington
With over 9,000 files, and including some 1300 public classes to pore through, the Shared Source CLI can teach you quite a bit about the internal workings of the CLR. But the sheer amount of source code included can make just starting your exploration a monumental task. This article discusses some of the things you can learn from the source code facsimile of the CLR, like how JIT compilation works. It will also help you understand how to control execution along with debugging and loading classes. A walk through the steps involved in setting up the runtime will let you become familiar with the process

Locales in SQL Server
SQL Server 2005: CLR Integration
Writing locale-safe external code in SQL Server has always been important due to the global nature of many businesses running on SQL Server. Doing it correctly requires a good knowledge of the different mechanisms used to store that locale information, and understanding which is the relevant locale in each context

SSIS: How to do Upserts
Ashvini Sharma
This one came up earlier today. How would one do Upsert in the pipeline?

SSIS: Getting a value out of a file to use it in our package
Jamie Thomson's Blog
v Someone recently asked on a newsgroup how they could grab hold of a value from a given field in the last row of a file. For example, in the file depicted below we would like to grab the value "Posh"

Shredding a Recordset
Allan Mitchell
Shredding a recordset in this instance means that we are going to show you how to take a recordset produced in your SSIS package, loop over the rows in that recordset, break apart the columns and do something with them. This is really useful when you want to preform an action on a row of data for every row of data just like we are going to do here. Sure we could use an ExecuteSQL task to get the recordset as well but that does limit our choices of source data whereas doing it in the pipeline does not. Something useful we hope

INF: Understanding Merge Replication Article Processing Order
Microsoft
The Merge Agent follows a specific set of rules that govern the order in which the merge process applies changes to articles during the synchronization process

Quiz: SQL Server 2005 XML 'exist' method
John Gallardo's Weblog
Among the features introduced in SQL Server 2005 is the new XML Datatype. You can use this guy to store both untyped and typed XML information and maintain the infoset fidelity of the document. We support a subset of the XQuery language which can be used to retrieve values from XML instances and reshape documents, amongst other things. One particularly useful, although sometimes confusing, piece of functionality is the "exist" method. The semantics are that if the XQuery statement evaluates to a node, then it returns true, if it evaluates to the empty set, then it returns false. It is invoked like this

Answer: SQL Server 2005 'exist' method
John Gallardo's Weblog
Last week I threw out a quick quiz about the XML datatypes 'exist' method. The reason it was at the top of my mind was that it was a mistake that I had made only a couple of days before. Not only that, but even a couple of my peers didn't recognize the mistake when I showed it to them. We all knew the rule, however we all managed to look at the same piece of code (albeit a bit more complicated than what I presented) and never notice the problem

Some more static typing info...
v John Gallardo's Weblog
Denis talks about static typing again over in his blog. Today he is focusing on path expressions which evaluate to singletons. I recommend you check the entry on his site for the details. The only thing that I wanted to add is that usually it is better from a performance perspective to wrap the entire path expression with a predicate (if possible), rather than applying postitional predicates across the entire path expression. I am going to use the sample XSD that Denis provided

More on locales in SQL Server
Sorting It All Out
Fascinating post about Locales in SQL Server, one that went into much more detail than I did at TechEd last week. It is from the from the new SQLCLR Integration blog and is definitely worth a read or three...

How to aggregate across a specific time range?
OLAP Monkey
In this posting we discuss how to aggregate data across a specific time range. In the query below, we define a calculated member ([Time].[MyTime]) that uses the Aggregate function to aggregate data across the specific time range that is specified by the set "[Time].[1997].[Q1].[1]:[Time].[1997].[Q2].[6]". This set uses the ":" operator to specify a contiguous range of values in our time dimension. We then use this newly created calculated member in our where close to force our values to be aggregated across this time period

Move records to new tables without creating a counter
Kevin Kline
I have a table with 10 million records in it and want to break it out into 10 tables with 1 million records each. Can I do this without creating a counter field? For example, is it possible to take the first 1 million records updated to temp1 table, then the next 1 million records update to temp2 table etc.?

The DBA Whoops
Steve Jones
Ever do something to your SQL Server 2000 server and then realize you've just broken something major? Ever have a moment when you want to go "whoops", but really feel like crying ot running away? Steve Jones just had one of those and gives you a few things to think about when you deal with a situation like that

Peer to peer demo code
Mat Stephen's SQL Server WebLog
Here's the code I used for the Peer to Peer replication demo I did during the SQL Server 2005 TechNet evening on the 14th June at our Reading office. The code sets up peer to peer replication between two tables, Orders and OrderDetails, in two databases East and West (on the same SQL instance)

Microsoft SQL Server Performance Top Tip: Multi Processor (SMP) Box Doesn’t Use All It’s Processors
v Mat Stephen's SQL Server WebLog
Seen this? You’ve got a nice new sparkling multi processor box, packed with ‘go-faster’ chips but the performance isn’t much better than your old one or two processor box. You take a look at the processor usage, either through task manager or Performance (System) Monitor, and notice only one processor seems to be hard at work, the others are just idling

Microsoft SQL Server 2000 RDBMS Performance Tuning Guide for Data Warehousing
John H. Miller and Henry Lau
Provides database administrators and developers with valuable information on Microsoft® SQL Server™ 2000 performance and tuning concepts, with specific information for the business intelligence developer. (92 printed pages)

More follow up from my TechNet SQL 2005 presentation (14/6/05) - SMP boxes and database files
Mat Stephen's SQL Server WebLog
During my TechNet presentation on Tuesday evening (14/6/05 in Reading), I got a little side tracked and, while talking about partitioning in SQL 2005, found myself drawing my audiences’ attention to the fact that only one thread can access a database file at any one time. This fact being the foundation to my post http://blogs.technet.com/mat_stephen/archive/2005/02/02/365325.aspx

SQL Server Monitoring in 8 Steps: Lessons From the Field
Geert Vanhove
SQL Server database systems are more than ever before being chosen as the preferred backend database solution for large business’s critical systems. And SQL Server richly deserves this status. As a result of this, more users than ever before are blocked in their daily activity when the database is not available, or in a bad shape. It’s your responsibility as a DBA to know the health of your SQL Server so you can take proactive action to minimize chances anything bad happens to your system. But don’t panic. If you have the right tools in place, your system will tell you how it feels and will warn you well before it reaches the alarm phase. Through its performance behavior, you can spot potential problems not yet visible to the end-user. If, for example, for no reason response times of a certain query slow down from 100 to 500 ms, the end-user will not be alarmed, but you should

SSIS: Using InfoPath XML Files in SSIS XMLSource Adapter
Ashvini Sharma
InfoPath forms can be saved to XML, these XML Files can later be used in SSIS XMLSource adapter to pull out the data in tables and columns. However, there are some common problems you may meet in these scenarios. This article describes how to work around these potential problems. The issues mentioned in this article is not only specific to InfoPath files, it can also be referenced in other similar situations as well

Security Class Design Proceeding and Suspect Pages
Randy Dyess
Still here in Redmond designing the new security class and while it is very tiring, I think it will be worth it in the long run. I have had a chance to look over a few of the other classes and they do look like something that I would want to attend. These classes are different and I believe that they will be well received by the DBA community

Effects of the type substitution mechanism on static typing (part I)
Typed XML in SQL Server 2005
The XML schema specs define a mechanism that allows for the use of derived types in instance documents. In short, if a schema contains an element ‘E’ of type ‘T’, and if there is a type ‘T1’ derived from ‘T’ then we can set the type of any instance of ‘E’ to ‘T1’ like this

[В начало]

ФОРУМ SQL.RU

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

Новые упражнения на http://sql.ipps.ru
В блокировочнике никогда нельзя быть уверенным за правильность отчета?!
Больше книг хороших и разных!
Identity vs generated ID
Прошу голосовать за SQL.RU в конкурсе Интернить 2005
Безопасность данных. STOLEN DATABASE
две таблицы из одной
Отладчик (debugger) не работает после установки Windows XP Service Pack 2
И снова round
Как решить проблемку наиболее простым способом?
Как сохранить бакап БД на диск на другом компьютере?
Не получается создать тригер, подскажите, что я делаю не так :(
Как контролировать процесс? Долгая хранимка.
Как вызвать WINDOWS API из TRANSACT SQL?
триггер для предстваления к внешнему dbf (clipper)
Задачка по програмированию
Использование в дельфи SQLserver-овских таблиц, через Access. Ругается на dbSeeChanges
интересный запрос
BULK INSERT. Существует ли обратная процедура?
Бага-или фича?

[В начало]

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

определение имени инстанса в ESP без использования DMO
Подключение внешнего ресурса под SQL....
svrnetcn.exe пишет ошибку "не найден указанный модуль"?
Народ , помогите ...
Использование в дельфи SQLserver-овских таблиц, через Access. Ругается на dbSeeChanges
FTS помогите
процессоры и СУБД
Реализация проверки правильности e-mail на SQL (может быть кому-то пригодится)
SQL аналог Running Total - помогите !!!

[В начало]

КНИГИ

Знакомство с Microsoft SQL Server 2005

Дибетта П.

Книга состоит из 13 глав и приложения. Издательство "Русская Редакция", 2005 г., 288 стр. ISBN: 5-7502-0084-1

В этой концептуальной и одновременно практичной книге описываются возможности СУБД нового поколения SQL Server 2005: компоненты и средства взаимодействия с Visual Studio и общеязыковой исполняющей средой (CLR). Книга содержит многочисленные примеры, написанные на С# и новом улучшенном языке T-SQL Прочитав эту книгу, профессиональные разработчики будут готовы к применению SQL Server 2005 сразу при появлении его окончательной версии.

[В начало]


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

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

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



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


Subscribe.Ru
Поддержка подписчиков
Другие рассылки этой тематики
Другие рассылки этого автора
Подписан адрес:
Код этой рассылки: comp.soft.winsoft.sqlhelpyouself
Отписаться
Вспомнить пароль

В избранное