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

MS SQL Server

  Все выпуски  

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


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


#171<<  #172

СОДЕРЖАНИЕ

1.СОВЕТЫ
1.1.Использование динамических фильтров совместно с динамическими снимками
2.ССЫЛКИ НА СТАТЬИ
2.1.Статьи на русском языке
2.2.Новые и обновлённые технические статьи Microsoft
2.3.Англоязычные статьи
3.ФОРУМ SQL.RU
3.1.Самые популярные темы недели
3.2.Вопросы остались без ответа

СОВЕТЫ

Использование динамических фильтров совместно с динамическими снимками
Автор: Александр Гладченко

Динамические фильтры в репликации позволяют использовать возвращаемые системными функциями SUSER_SNAME() и HOST_NAME() значения для выделения своих разделов данных каждому подписчику. Кроме этих функций, динамическую фильтрацию можно построить на определяемых пользователем функциях - UDF.
Динамическая фильтрация данных позволяет существенно снизить трафик сеансов репликации и предоставить подписчику доступ только к своей информации. Каждый фильтр является свойством входящей в публикацию статьи и может быть применён как для одной статьи публикации, так и для любого числа входящих в публикацию статей.
Поскольку динамический фильтр подразумевает наличие разных наборов данных, которые передаются подписчикам, создаваемый для первоначальной синхронизации моментальный снимок отличается от стандартного снимка. В таком снимке отсутствует файл BCP, который содержит данные. Данные передаются после применения схемы и указанного в свойствах статей публикации набора реплицируемых объектов. Стандартный моментальный снимок в компрессованном виде доставляется подписчику, распаковывается, после чего данные из BCP файла с помощью BULK INSERT загружаются в таблицы подписчика. Создаваемый же для содержащей динамический фильтр публикации снимок будет очень маленьким, т.к. не содержит данных, но применяться будет существенно дольше стандартного снимка. Данные будут загружаться таким же образом, как реплицируется вставка, и вставляться будут все значения из таблиц издателя, на основании которых построена публикация. Для больших и даже для средних баз данных такая первоначальная синхронизация или реинициализация подписчика может занять очень много времени.
Именно для решения проблемы очень долгой инициализации используются динамические моментальные снимки, которые можно создавать для использующих динамические фильтры публикаций.
В этой статье мы рассмотрим пример, на основании которого будет не сложно разобраться во всех нюансах использования динамических фильтров совместно с динамическими снимками. Ниже представлена последовательность шагов, которая позволит нам создать необходимые объекты, заполнить таблицы тестовыми данными, развернуть репликацию и посмотреть, как работает динамическая фильтрация и что представляет из себя динамический моментальный снимок.

1. Подготовительные действия

Для демонстрации совместного использования динамических фильтров и снимков создадим две базы данных: filtertest и subscriber1, которые содержат таблицу _test, а также двух пользователей, для которых мы будем фильтровать данные в публикации. Кроме того, таблицу на издателе заполним тестовыми данными.


/***** Начало скрипта *****/
-- Для правильного исполнения, запустите с правами sysadmin
use master
GO
CREATE DATABASE [filtertest]-- База для издателя
GO
CREATE DATABASE [subscriber1]-- База для первого подписчика
GO
-- Создание пользователей и таблиц
USE subscriber1
GO
EXEC sp_addlogin @loginame = 'u1' 
GO
EXEC sp_adduser 'u1'
GO
EXEC sp_change_users_login 'Update_One', 'u1', 'u1'
GO
EXEC sp_addsrvrolemember 'u1', 'sysadmin'
GO
USE filtertest
GO
EXEC sp_addlogin @loginame = 'u0' 
GO
EXEC sp_adduser 'u0'
GO
EXEC sp_adduser 'u1'
GO
EXEC sp_change_users_login 'Update_One', 'u0', 'u0'
GO
EXEC sp_change_users_login 'Update_One', 'u1', 'u1'
GO
EXEC sp_addsrvrolemember 'u0', 'sysadmin'
GO
CREATE TABLE _test 
 (row_id int IDENTITY (1, 1) NOT FOR REPLICATION,
 name_bd char (21),
 name_host char (21),
 name_user char (21) 
 )
GO
ALTER TABLE _test ADD 
 CONSTRAINT DF_name_host DEFAULT (host_name()) FOR name_host,
 CONSTRAINT DF_name_user DEFAULT (suser_sname()) FOR name_user
GO
CREATE  UNIQUE  INDEX IX_test ON _test(row_id, name_host, name_user)
GO
SETUSER 'u0'
declare @count_insert int
SET @count_insert = 0
WHILE @count_insert < 5
BEGIN
  SET @count_insert = (@count_insert + 1)
  PRINT 'Вставляется ' + CONVERT(varchar(4), @count_insert) + '-я строка'
  insert _test (name_bd) VALUES (db_name())
END
GO
SETUSER
SETUSER 'u1'
declare @count_insert int
SET @count_insert = 0
WHILE @count_insert < 5
BEGIN
  SET @count_insert = (@count_insert + 1)
  PRINT 'Вставляется ' + CONVERT(varchar(4), @count_insert) + '-я строка'
  insert _test (name_bd) VALUES (db_name())
END
GO
SETUSER
-------
USE subscriber1
GO
CREATE TABLE _test 
 (row_id int IDENTITY (1, 1) NOT FOR REPLICATION,
 name_bd char (21),
 name_host char (21),
 name_user char (21) 
 )
GO
ALTER TABLE _test ADD 
 CONSTRAINT DF_name_host DEFAULT (host_name()) FOR name_host,
 CONSTRAINT DF_name_user DEFAULT (suser_sname()) FOR name_user
GO
CREATE  UNIQUE  INDEX IX_test ON _test(row_id, name_host, name_user)
GO
/***** Конец скрипта *****/

2. Создаём публикацию filtertest для репликации слиянием таблицы _test

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

3. Во-первых, нужно указать, что мы будем использовать динамические фильтры.

4. В этом примере мы используем только горизонтальный фильтр.

5. Наш фильтр будет динамическим.

6. Выбираем фильтруемую таблицу и указываем условие в предложении WHERE.

7. Указываем функцию для выверки реплицируемых данных.

8. Указываем, необходимо ли минимизировать трафик реплицируемых данных.

9. После создания публикации, изменить фильтр можно в её свойствах.

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

11. Признак динамического фильтра и определяющих его функций хранится в системной таблице sysmergepublications.

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

12. Условие фильтрации хранится в системной таблице sysmergearticles.

13. Добавляем динамический снапшот.

Поскольку стандартный моментальный снимок (снапшот) не удобен из-за слишком продолжительного применения, существует возможность воспользоваться мастером создания динамических моментальных снимков.

14. Указываем значение для фильтра динамического снапшота.

Для каждого подписчика должен быть создан свой динамический моментальный снимок. Для этого, каждому подписчику необходимо оказать то значение используемых в фильтре системных функций, на основании которого будут фильтроваться данные. Поскольку в нашем примере данные фильтруются функцией SUSER_SNAME(), которая возвращает имя оперирующего реплицируемыми данными пользователя на подписчике, нам необходимо указать в качестве значения для фильтра динамического снапшота имя пользователя u1. От имени этого пользователя будут осуществляться операции с данными и запускаться агент репликации слиянием. Целью нашей динамической фильтрации является выделение подписчику такого горизонтального раздела данных, который содержал бы записи таблицы _test со значением поля name_user равным u1.
Напомню, что для этого поля нами было введено значение по умолчанию, которое мы определили как:

CONSTRAINT DF_name_user DEFAULT (suser_sname()) FOR name_user

Поэтому, в визарде создания динамического снимка для значения функции SUSER_SNAME() мы указываем имя пользователя, который будет вставлять данные на подписчике.

15. Указываем расположение динамического снапшота для нашего условия фильтрации.

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

16. Создаём подписку и указываем для неё место расположения динамического снапшота.

Именно эту папку, которую мы определили в предыдущем шаге в качестве динамического снимка подписчиков, у которых значение поля name_user равно u1, мы укажем и в визарде создания подписки, а также пометим эту папку, как содержащую динамический моментальный снимок.
Обращаю Ваше внимание на то, что все предшествующие окна мастера создания подписки были пропущены, т.к. не представляют интереса в рамках этой статьи и используют предлагаемые визардом по умолчанию значения.

17. Редактируем свойства подписки.

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

18. Изменяем логин для подключения подписчика к издателю.

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

19. Расположение динамического снапшота подписки можно изменить.

Если Вы забыли указать папку расположения динамического моментального снимка или необходимо изменить её расположение, всё это можно сделать в соответствующей закладке окна свойств подписки.

20. Изменяем владельца задания, запускающего агента репликации на подписчике.

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

21. Запускаем сеанс создания динамического снимка, а потом сеанс репликации.

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

22. Внесём записи под пользователем u1 на подписчике:


USE subscriber1
GO
SETUSER 'u1'
declare @count_insert int
SET @count_insert = 0
WHILE @count_insert < 5
BEGIN
  SET @count_insert = (@count_insert + 1)
  PRINT 'Вставляется ' + CONVERT(varchar(4), @count_insert) + '-я строка'
  insert _test (name_bd) VALUES (db_name())
END
GO
SETUSER

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

23. Особенности формирования динамического снимка.

Если открыть находящийся в указанной нами для моментального снимка папке BCP файл, мы увидим, что в нём также присутствуют только отфильтрованные данные.

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

[В начало]

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

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

Моделирование квазиструктурированных данных
Дмитрий Палей
Задачи обработки информации с нечетко определенной структурой возникают сегодня практически повсеместно. От того, как будет организована работа с такими данными, зависит эффективность хранения и извлечения информации в электронных библиотеках и корпоративных хранилищах...
Третий манифест Дейта и Дарвена: немного формализма
Сергей Кузнецов
Мы продолжаем знакомить читателей с книгой Криса Дейта и Хью Дарвена "Foundation for Object/Relational Databases: The Third Manifesto" (начальные главы книги обсуждались в предыдущем выпуске журнала - прим. ред.). В этот раз мы рассмотрим третью и четвертую главы книги - "Третий манифест" и "Новая реляционная алгебра". Третья глава читается не очень легко; она написана в очень формальном стиле и не содержит пояснений. Но без этого материала трудно понять следующие, неформальные и дискуссионные главы. Мне самому очень нравится четвертая глава, где вводится новая, минимизированная версия реляционной алгебры. По-моему, создание этой алгебры относится к главным достижениям авторов книги...

[В начало]

Новые и обновлённые технические статьи Microsoft

Analysis Services Crashes If You Incrementally Update a Non-Changing Dimension
BUG: DOC: DB_OWNER Roles Cannot Administer All Jobs
BUG: Statistics Are Printed Twice with Statistics Time On BUG: Stored Procedure Remains After Deleting Web Wizard File
BUG: The DBCC PSS Command May Cause Access Violations and 17805 Errors
BUG: Using the Auto_Fix Option with sp_change_users_login Can Leave Security Vulnerabilities
FIX: "Catastrophic Failure" Error Message When You Use adPromptAlways to Connect to SQL Server 2000
FIX: "Login Failed for User 'SYSTEM'" Error When You Use OPENROWSET Function Without UserName
FIX: A Memory Leak Occurs When You Incrementally Update Dimensions That Contain Member Properties
FIX: Cursor Overhead Higher on SQL Server 7.0 for Small Result Sets
FIX: Database Dumps May Be Overwritable Despite Options
FIX: Delayed Domain Authentication May Cause SQL Server to Stop Responding
FIX: Distributed Queries May Incorrectly Use SQL Server Startup Account Permissions When SQL Server is Running in Fiber Mode
FIX: Incorrect Results Are Returned If a Slice Occurs on a Virtual Dimension in a Cube That Has Multiple Partitions
FIX: Key Names Read from an .Ini File for a Dynamic Properties Task May Be Truncated
FIX: Queries Return Empty Result Sets If a Calculated Member Is Defined by Using the NonEmptyCrossjoin Function
FIX: SQL Query Analyzer May Stop Responding When You Close a Query Window or Open a File
FIX: Striped Dumps May Cause Error 18001
FIX: The Merge Agent Takes a Long Time to Download New Data When It Runs on a New Anonymous Subscription
FIX: The OpenSchema Method Returns Null for the Custom Member Property of a Parent-Child Dimension Level
FIX: Unconditional Update May Not Hold Key Locks on New Key Values
How to Access SQL Server in Active Server Pages
How to Include Other MMCs in SQL Enterprise Manager MMC
HOW TO: Handle Data Transformation Services Package Events in Visual C# .NET
HOW TO: Remove a SQL Server Service Pack
HOW TO: Send E-Mail Without Using SQL Mail in SQL Server
How To: Traverse an ADO MD Cellset Object by Using Visual C# .NET
INF: @@TRANCOUNT Global Variable Detects Rollback
INF: How to Monitor SQL Server 2000 Blocking
INF: How to Monitor SQL Server 7.0 Blocking
INF: How to Troubleshoot Communication Error 17824
INF: Installing a DBCS Code Page for SQL Server
INF: Optimizing Comparisons with Numeric, Integer, and Others
INF: Optimizing Distributed Query with Numeric Predicates
INF: Processing Procedures and Batches with Multiple SELECTS
INF: Readme.txt for SQL Server 7.0 Service Pack 3
INF: Understanding Bufwait and Writelog Timeout Messages
INF: UPDATE Statements May be Replicated as DELETE/INSERT Pairs
INF Using Version 3.6 Microsoft SQL Server ODBC Driver
INFO: How to Use Sqldumper.exe to Generate Dump Files for Windows Applications
MBS: Billing Filter Does Not Function Correctly with Internet Explorer Version 3.02
MBS: Client DPA Setup Error "Cannot Modify Registry Error - 1"
New Connection Events Are Not Recorded in SQL Server Traces
PRB: Cannot Register Server if Password Exceeds 60 Characters
PRB: E_FAIL Message When Accessing OLAP BobsVid.cub File
PRB: Error 17832 Caused by Blocking Timeout in 16-Bit Sockets
PRB: Error Message "Unspecified Error" When Executing a DTS Package Modified Dynamically
PRB: How to Recover SQL Server After a Tempdb Database is Marked Suspect
PRB: Job Status is Not Refreshed When You Connect Using Incorrect Case for the Login Name
PRB: MSMQ ERR "MQIS Database Initialization Error" in Windows NT Event Log
PRB: ODBC Error When Updating an Edited Record
PRB: ODBC Prepared Statement Errors with Temporary Tables
PRB: OLAP Cubes in an Analysis Services Database Are Not Accessible After You Apply Analysis Services SP3
PRB: OPTIMIZER LOCK HINTS Error with OpenQuery
PRB: Problems When DBCS Code Page Is Missing in Windows NT
PRB: Slow Query Performance Occurs When You Run an MDX Query That References Dimension Member Properties
PRB: SQL Enterprise Manager Requires Uppercase for Linked Server Name
PRB: Windows Server 2003 Support for SQL Server 2000
SQL Server 2000 Is Not Supported on Windows Server 2003 Terminal Server Application Server
Virtual SQL Server 7.0-Based Server Only Supports the Use of One TCP/IP Address
You Cannot Install MSDE 2000 if the Server Service Is Not Running

[В начало]

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

Is a Temporary Table Really Necessary?
Randy Dyess
You will find articles on this site as well as others advising you to avoid the use of temporary tables to maximize the performance of your queries. I agree with the articles, but would like to add that sometimes you cannot avoid the use of a temporary table. For those of you who have not read my Bio, I work with some very large SQL Server databases (the biggest being over 2.2 terabytes) and have found that I can avoid the use of temporary tables in most cases but sometimes they come in handy. This article will discuss the use and the alternatives to temporary tables from a query performance and maintenance standpoint
Bypassing Triggers
Andy Warren
Recently at work we had a need to bypass a trigger on a key table. That got me thinking that it was worth discussing as there are quite a few alternatives. Most triggers are conditional based on the data itself. If the where statement matches, something happens. Not quite as common is to do (or not do) something based on external information - who the user is or what computer issued the statement or maybe something even more complicated
MDX in Analysis Services: Calculated Members: Leveraging Member Properties
William Pearson
In our last tutorial, Calculated Members: Further Considerations and Perspectives, we continued the exploration of calculated members that we began in the previous lesson, Calculated Members: Introduction. We discussed ways of handling the creation of calculated members with MDX, and practiced the addition of multiple calculated members in a single MDX query. We explored additional perspectives of calculated members along the way, including format considerations. Finally, we exposed a means for controlling the order in which calculated members are solved, discussing why precedence of calculation might be critical in generating the results we expect, and examining an instance where the SOLVE_ORDER keyword made it possible to bring about the desired results in a returned dataset
T-SQL Programming Part 3 - Processing Sequentially Through a Set of Records
Gregory A. Larsen
At some point you will have some business logic that will require you to process sequentially through a set of records one record at a time. For example you may have a list of databases, and for each database you may want to build a command that will perform some process against each database. Or you might have a set of records where you want to process through each record one at a time, so you can select additional information from another table based on the information contained in each record. This article will discuss two different ways to process through a set of records one record at a time
SQL Web Bench v1.0
Microsoft Team
SQL WebBench is a stand alone browser based application that demonstrates Native SQL Web Services in Microsoft® SQL Server™ "Yukon" Beta 1. SQL Web Bench allows for HTTP SOAP endpoint manipulation and the ability to invoke remote SQL web services right from your browser via a WSDL XSL transform. SQL Web Bench demonstrates and exposes the raw SOAP that is sent and received from the server
WinForms Gain Ground in Whidbey
Kathleen Dollard
VS.NET's upcoming version improves smart client programming with new controls, better data binding, and enhancements to existing controls. The alpha bits available now for the Whidbey version of VS.NET offer an opportunity to dive into upcoming WinForms changes. Developing smart client applications with Whidbey will be easier and more efficient, thanks to new design-time widgets, improved data binding, enhancements to existing controls, better deployment, and new grid, toolbar, splitter, and sound controls. The alpha bits are a technology preview—not a beta—so the feature list isn't closed; some features might disappear, and new ones might appear. I'll focus on enhancements and new features, but bear in mind that Whidbey is one step in a long series of WinForms improvements, and it's not realistic to expect it to solve all the platform's issues. For example, GDI+ is still difficult to use for simple drawings, and many controls have hardly evolved since Windows 3.1. The entire Windows interface experience is due for a major update in 2005 (see the sidebar, "Avalon Emerges From Longhorn's Mists")
Navigate the Road to Whidbey
Don Kiely
The next version of VS.NET includes a plethora of enterprise and RAD features, but the tool remains geared more toward higher-end than occupational programmers. Microsoft's claims for Whidbey—the next version of VS.NET—are impressive: It represents the maturation of all the .NET tools and technologies with support ranging from the smallest devices to the largest servers. Microsoft also asserts that the tool is friendly to all developers, from hobbyists to seasoned professionals. As usual, the reality falls somewhere between this description and the notion that Whidbey is a nice upgrade to familiar tools. Some of Whidbey's more ambitious features won't make the cut before it ships, and many will evolve into more usable forms of real tools. Will it make a substantial difference to Windows development?
Climbing the Road to Whidbey
Interview Exclusive: Ari Bixhorn, by Patrick Meader
Ari Bixhorn talked to VSM's editor in chief, Patrick Meader, about upcoming features in the next version of VS.NET, as well as how the tool fits into the long-term vision Microsoft has for how it will complement the Windows platform. This is an expanded version of the interview that appeared in the December 2003 Guest Opinion column
ProClarity Launches ProClarity Analytics Platform Release 5.3 at Gartner Symposium/ITxpo 2003
Press Releases
GARTNER SYMPOSIUM/ITxpo, ORLANDO, FL., October 20, 2003 - ProClarity Corporation, a leading provider of analytic application technology for the enterprise, today announced Release 5.3 of the ProClarity® Analytics Platform product family from the Gartner Symposium/ITxpo 2003 event. The ProClarity Analytics Platform Release 5.3 delivers unprecedented capabilities to monitor and analyze performance against objectives and to create, share and centrally manage business process knowledge and best analytic practices. Unlike legacy business intelligence (BI) products, ProClarity's platform is the system for developing custom analytic applications that speed the transformation of complex information into individual understanding
Microsoft SQL Server 2000 Best Practices Analyzer 1.0 Beta
Microsoft SQL Server Best Practices Analyzer is a database management tool that lets you verify the implementation of common Best Practices on your servers
Custom Log Shipping
Chris Kempster
The following article discusses the custom log shipping routines used for the "MYDB" production database. The destination server is used for corporate reporting functions whilst in standby mode
Coordinate Your DTS Tasks, Part I: "After the Fact" Data Updates
Drew Georgopulos
SQL Server 2000's DTS offers a copious—even bewildering—bundle of pre-packaged tasks. This 10-Minute Solution, the first of a two-part series exploring DTS tasks, illustrates how to chain different types of tasks together to collect the information you'll need to process data contained in a file location table. This technique is particularly useful in environments that require after the fact data updates
Output Parameters
Robert Marda
Output parameters allow you to retrieve values from a stored procedure after the stored procedure finishes executing. These values can be set and/or manipulated by the stored procedure. Output parameters can be any data type. This makes them more useful than the return value which only returns an int data type. You can have multiple output parameters
Whidbey Details Exposed
Kathleen Dollard
VSLive! Orlando revealed details about the upcoming Whidbey release, including a myriad of features that will combine to make development more productive. VSLive! Orlando 2003 offered another chance to peek at what's coming in future versions of Visual Studio. The .NET Focus Day at VSLive! exposed more details of the Whidbey release and, more importantly, started to uncover the trajectory of the Microsoft languages
Managing SQL Server Proliferation
Mark Shainman
About This Article: This article is adapted from META Delta SIS 1004 "Managing SQL Server Proliferation." Copyright July 2002, by META Group. Reproduced by permission. All rights reserved. Control costs and improve support with a centralized SQL Server management strategy
Tracking the Business Intelligence Market
Lynne Harvey Zawada and Peter O'Kelly
Learn how Microsoft's changes to its Business Intelligence (BI) platform have poised the company to dominate the BI market. For more than 30 years, industry watchers have viewed the Business Intelligence (BI) segment as an area of opportunity for both established enterprise software vendors and software startups. Year after year, the BI segment experiences steady and continuous growth, while the market for most enterprise software goes through boom and bust cycles (and recently, it declined significantly). Surprisingly, the BI market is also diverse: Today's BI market leaders range in size from small startups to some of the largest software companies in the industry
Synchronize Collection and HashTable Objects
Enrico Sabbadin
The .NET Framework's Base Class Library (BCL) exposes a series of neat and clean thread-related APIs, making the interaction with multithreading related entities (such as AutoResetEvents and Locks) much easier than the past. Writing multithreaded apps is still a hard task, though, and should be considered only as a last resort to solve a specific application requirement
Grouping Time Intervals
Itzik Ben-Gan
Try this set-based trick to solve a common problem. Some T-SQL problems seem to require cursor-based solutions but in fact have quite a few set-based solutions, as I've shown in recent columns. This month, let's look at a more complex example that programmers usually try to solve with cursors. You might have even had to handle this problem in one variation or another because it represents a common need: grouping time intervals. I'd like to thank Isaac Blank for sharing a beautiful solution, which I present in this article along with some other solutions
SQL Server Startup Parameters
Randy Dyess
Every now and then we all have to reread something we may already know because frankly if you are like me, you can't keep everything in your head. I tend to go back over tips and tricks and even database concepts when I have time so I will maybe remember enough about it so when a problem arises I at least know where to go look and find the answer. It is with, that I want to write about my latest re-education attempt
Introduction to ADO Part 2 - Recordsets
Andy Warren
Last week I posted an article that covered the basics of the main object in ADO, the connection object. This week I'm going to continue by discussing how to use the second most used object in ADO, the recordset
A Script to Find SQL Server Stored Procedure Dependencies
Robbe Morris
You've searched through MSDN, Google Groups, and all along the yellow brick road of developer web sites looking for a way to generate a sql script for your stored procedures in order of dependency, but to no avail. Why? You, like myself, prefer not to see a bunch of error messages in Query Analyzer when we deploy our stored procedures to either the QA or Production environment. I don't like having to scroll through all the messages looking for valid errors just in case I missed something else in the deployment. Well, you haven't managed to reach the great and powerful Oz, but perhaps I can help just the same
MDX in Analysis Services: Intermediate Concepts - Part 2
William Pearson
In our last tutorial, we took MDX beyond the retrieval of member names and properties, and began to focus on leveraging the capabilities of the language to return values from a multidimensional cube. We created calculated measures whose values were based upon a constant, then upon current members, and explored additional uses of calculated members and measures. We practiced returning values, based upon the specification of dimensions within MDX expressions, to extend the expressions' utility within the context of reporting from an OLAP data source. Moreover, we examined various aspects of the MDX notation system along the way
Generate Scripts for SQL Server Objects
Shailesh Khanal
We all like the Generate Script feature of Enterprise Manager and like to use it programmatically. One of the most important uses would be backing up scripts periodically using SQL Server Scheduler

[В начало]

ФОРУМ SQL.RU

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

Ваше мнение об упражнениях SELECT на http://sql.ipps.ru
Кто на чем пишет клиентов под SQL Server?
Жуткие тормоза
Новые упражнения на http://sql.ipps.ru
О Data Controls в Delphi
оптимизация запроса
Параллельное выполнение ХП...
Вопрос о foreign keys
в чем причина?
CHECKSUM
как: Узнать поля primary key
Ко всем ADO дельфистам - нужен совет
удаление вручную из sys таблиц
Профи, разминка! Сортировка по веткам дерева
Чем больше оптимизирую - тем хуже....
Глюк сервера - пустое имя Database
SET NOCOUNT ON
Помогите написать триггер, please!!!!
@@identity and transaction trouble
Linked_server на удалённую DB

[В начало]

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

Порт в MSSQL 7
SQL Mail Agent
Выдается сообщение о ошибке с непонятной кодировкой
SQL Collations
Конструктор Workflow Designer для SQL Server
SQL + Access
У кого есть фикс на проблему: "Cannot Connect to Port '1433' Using Sockets After You Apply SQL Server 7.0 Service Pack 4"
Массив иконок
Ликбез.
сбой подключения
Ключи ConnectionString-a ?
Упражнения на http://sql.ipps.ru
как бы оптимизировать выполнение этих 2 запросов?
Не открывается Books Online.
Windows 2003 Advanced, SQL 2000 Enterprise и память
Своя инсталяция для MSDE
Где можно найти ?????
MSSQL200+Delphi7+dbexpress+query: Передача параметров в запрос !
Как настроить SQL Mail в MSQL 2000?
Нужна книга Мамаева или Майкла Оутея

[В начало]


Вопросы, предложения, коментарии, замечания, критику и т.п. присылайте Александру Гладченко на адрес: mssqlhelp@pisem.net

sql.ru Описание рассылки

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




http://subscribe.ru/
E-mail: ask@subscribe.ru
Отписаться
Убрать рекламу

В избранное