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

MS SQL Server

  Все выпуски  

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


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


#179<<  #180

СОДЕРЖАНИЕ

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

СОВЕТЫ

SQL Server 2000 DTS. Часть 5. Задачи DTS Designer и Global Variables

По материалам статьи Marcin Policht: SQL Server 2000 DTS Part 5 - DTS Designer Tasks and Global Variables

В предыдущей статье мы познакомились с простыми типами задач DTS Designer. Мы продолжим здесь их обсуждение, сосредоточившись на более сложных моментах. Однако, прежде чем мы продолжим, давайте более детально изучим понятие DTS Global Variables, которое поможет нам понимать некоторые нюансы настройки задач.
Глобальная переменная - это компонент пакета, состоящий из имени и значения заданного типа (строка, целое число и т.д.) которое ассоциируется с именем. Глобальные переменные обеспечивают временное хранение значений, используемых в рамках DTS пакетов. Если Вы знакомы с написанием скриптов или с программированием, Вы легко поймёте их назначение, так как эти переменные имеют ту же самую цель, которую они имеют в исполняемом коде. Стоит отметить, что имена глобальных переменных зависимы от регистра, так что это может породить проблемы при указании ссылок на одну переменную из двух пакетов (мы рассмотрим такие примеры при обсуждении задачи Execute Package). Глобальные переменные доступны через графический интерфейс на закладке Global Variables свойств пакета. Там Вы можете создавать, изменять и удалять переменные (к этому интерфейсу Вы также можете обратиться из диалогового окна Parameter Mapping в Execute SQL Task или из диалогового окна Add/Edit Assignment в Dynamic Properties Task). То же самое можно сделать при создании ActiveX скрипта, которые мы рассмотрим в следующих статьях (и объясним значение переключателя Explicit Global Variables в свойствах пакета). Главное различие между переменными, созданными графическим интерфейсом, и объявленным в скрипте - продолжительность их жизни. В первом случае, глобальные переменные могут быть сохранены как часть пакета, к ним можно обратиться из любого компонента пакета в течение его исполнения, и они могут считываться после того, как работа пакета будет закончена, если пакет был сохранен. Во втором случае, их жизнь ограничена временем исполнения скрипта (они ни видимы на закладке Global Variables и не доступны после того, как работа пакета завершится).
Давайте рассмотрим пример, демонстрирующий использование глобальных переменных в комбинации с Execute SQL Task (который мы кратко изучили в предыдущей статье). Представим, что мы должны определить самый последний заказ клиента в заданный интервал времени, который хранится в таблице Orders базы данных Northwind. Несмотря на простоту этой задачи (в сущности, это - простой T-SQL запрос), её нам будет вполне достаточно для освоения глобальных переменных (более сложные примеры появятся в следующих статьях). Например, можно реализовать аналогичный подход, если необходимо передавать (и преобразовать) извлеченную информацию о заказе в базу данных Oracle (хотя, это может потребовать некоторых изменений нашего примера):

Создадим в Enterprise Manager средствами Data Transformation Services новый пакет (выбрав New Package в контекстном меню Local Packages). Настроим новое подключение к базе Northwind, используя Microsoft OLE DB provider for SQL Server (указав параметры аутентификации, выбрав Northwind в списке баз данных и назвав подключение Northwind DB). Далее, в меню Task выберите Execute SQL Task (или перетащите его из раздела Task на инструментальной панели с левой стороны окна). Вы увидите диалоговое окно Execute SQL Task Properties. В поле Description напечатайте Select MAX OrderID (или другое описание, расшифровывающее цель этой задачи). Убедитесь, что база Northwind выбрана в списке Existing connection, значение Command time-out = 0 (этим снимается ограничение времени исполнения задачи) а в текстовом боксе SQL Statement введите следующее:


SELECT MAX(OrderID)
FROM Orders
WHERE RequiredDate BETWEEN ? AND ?
AND CustomerID = ?

Как Вы помните из предыдущей статьи, вопросительные знаки в контексте Execute SQL Task определяют входные параметры. В нашем простом запросе мы имеем три параметра (Parameter 1, Parameter 2 и Parameter 3, которые соответствуют первому, второму и третьему вопросительному знаку). Теперь, мы должны связать эти параметры с глобальными переменными, для которых мы должны будем указать какие-нибудь значения. Это можно сделать, нажав на кнопку Parameter, расположенную на закладке General диалогового окна Execute SQL Task Properties. Вы попадёте в диалоговое окно Parameter Mapping. После щелчка по кнопке Create Global Variables, нужно ввести четыре переменные (три для входных параметров и одну для выходного параметра) и определить типы и значения для каждого из них. Обратите внимание, что если Вы создадите не строковую переменную, требуется обязательно ввести её значение, иначе, Вы получите сообщение об ошибке: "could not convert variable XXXX from type BSTR to type YYYY", где XXXX и YYYY - имена созданных Вами переменных. Введите следующие данные:


gVarDateFrom   String  1998-06-02
gVarDateTo     String  1998-06-03
gVarCustomerID String  BONAP
gVarMaxOrderID Integer 0

Как только Вы нажмёте OK, Вы снова вернётесь в окно Parameter Mapping. Здесь нужно мапировать Input Global Variables на параметры, как это показано ниже, используя выпадающий список для каждого из них:


gVarDateFrom   Parameter 1
gVarDateTo     Parameter 2
gVarCustomerID Parameter 3

Далее, на закладке Output Parameters, устанавливаем переключатель Output Parameter Type на Row Value и устанавливаем значение поля Output Global Variables равным gVarMaxOrderID. После этого, закройте активные окна, сохраните и выполните пакет. Откройте свойства DTS Package и перейдите на закладку Global Variables. Вы должны видеть все переменные, которые мы определили, и их значения. Если все действия были сделаны правильно, gVarMaxOrderID должно равняться 11076, а все другие значения должны быть такими, как мы их задали. Как Вы можете видеть, глобальные переменные сохраняют свои значения и после исполнения пакета. Также, очень удобно изменить их в одном месте, если нужно повторно запускать этот пакет для разных gVarCustomerID или для других диапазонов дат. Очевидно, что Вы можете изменять значения глобальных переменных вручную; однако, Вы можете получить то же самое посредством создания соответствующего скрипта. Это позволит Вам упростить или даже полностью автоматизировать модификацию пакета.
Альтернативным подходом к скриптованию, когда мы имеем дело с автоматизированными изменениями параметров пакета, является использование задачи Dynamic Properties Task. Эта задача позволяет выполнять такие модификации во время исполнения, но возможность перестраивать конфигурацию доступна только через графический интерфейс. Вы можете управлять фактически любым компонентом DTS, например, подключения, задачи, шаги (шаги мы подробно рассмотрим, когда начнём изучать компоненты технологического процесса DTS пакетов) и глобальные переменные. Значения свойств каждого из этих компонент могут быть получены из следующих источников:

  • INI File - текстовый файл стандартного формата, разбитый на разделы (с заголовками, включенными в квадратные скобки) и имеющий ключи для каждого из разделов, состоящие из пар ключ/значение, размещённых на отдельных строках. При использовании этой опции, Вы должны указать полный путь к файлу, раздел и ключ, значение которого будет использоваться в задаче.
  • SQL Query - синтаксически правильная инструкция SQL SELECT, использующая существующее подключение. Должны возвращаться скалярные значения, иначе можно будет использовать только первое поле первой записи возвращаемого рекордсета.
  • Global Variable - позволяет изменять любой из параметров, просто указывая название глобальной переменной. Например, для обеспечения мобильности пакета, Вы можете создать глобальную переменную (задав соответствующее значение этой переменной) для свойства DataSource (определяющего имя SQL сервера - источника данных). Когда пакет будет перемещён на другой сервер, Вы можете просто изменить эту глобальную переменную на вкладке Global Variables в свойствах пакета, не прибегая к изменению свойств подключения.
  • Environment Variable - системные и пользовательские переменные Windows (то же самые, что Вы увидите, нажав в диалоговом окне System Properties кнопку Environment Variables).
  • Constant - отдельное значение, полученное и сохраненное в рамках задачи.
  • Data file - файл контента (в отличие от INI File, в него включается всё).

С помощью внешних файлов или переменных среды, Вы можете изменять параметры пакета без его редактирования, что повышает и упрощает его мобильность. Обратите внимание, что задача Dynamic Properties должна исполняться среди первых в пакете (это мы обсудим в следующих статьях, и как этим можно управлять, используя компоненты технологического процесса пакета). Используя такой подход, Вы можете гарантировать, что любое из свойств, которое используется в пакете, будет иметь перед использованием правильное значение.
Глобальные переменные могут предавать данные не только между элементами одного пакета, но и между разными пакетами. Эти функциональные возможности используются в Execute Package Task, где один пакет вызывается из другого. В следующей статье мы обсудим её свойства и рассмотрим примеры её использования.

[В начало]

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

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

Элементы управления .NET. Работа с TreeView
Гайдар Магдануров
VB: Эта статья начинает цикл коротких статей по работе с элементами управления .NET. Это достаточно странно, но именно работа со стандартными элементами отпугивает начинающих программистов. Я понимаю, насколько это сложно начинать свой путь к вершинам "программерского" искусства с такой системы, на первый взгляд сложной, как Visual Basic .NET. Поэтому-то я и начал этот цикл. К каждой статье прилагается пример, который сам по себе демонстрирует описываемые возможности и он должен служить основным источником информации - учится на примере всегда легче, чем читая что-то отвлеченное, пусть даже изобилующее кусками кода...
Спецификация С# версии 2.0: Введение в C# 2.0
Microsoft
C-sharp: C# 2.0 представляет несколько расширений языка, самые важные из которых - Шаблоны (Generics), Анонимные методы (Anonymous Methods), Итераторы (Iterators) и Неполные типы (Partial Types)...
Предотвращение бедствий: быть готовым ко всему, в том числе - к худшему
Кэлен Дилани
MSSQLServer: Многие ИТ-специалисты делят проблему высокой отказоустойчивости на две части: предотвращение сбоев и восстановление после сбоев. Они обсуждают эту тему так, будто каждый шаг в достижении высокой отказоустойчивости соответствует одной или другой части. Пока я готовил материал для этой статьи и пытался определить, какие действия предотвращают происшествие и какие обеспечивают восстановление после него, я обнаружил, что граница между этими двумя областями - неочевидная. Я также понял, что для того чтобы понять разницу между предотвращением сбоя и восстановлением после него, нужно четко определить, что именно является "стихийным бедствием" для конкретного предприятия...
Методы достижения высокой отказоустойчивости
Майкл Хотек
MSSQLServer: Термин "высокая отказоустойчивость" сейчас в ходу в IT-индустрии, но знаете ли вы, что он означает и как добиться высокой отказоустойчивости? IT-специалисты, не вникая в суть проблемы, ежедневно пытаются добиться высокой отказоустойчивости, покупая все новое дорогостоящее аппаратное и программное обеспечение. Многие из них полагают, что для достижения высокой отказоустойчивости существует некое готовое технологическое решение, которое можно применить, а потом раз и навсегда забыть о проблеме. Однако технология - лишь малая часть мер обеспечения высокой отказоустойчивости...
Как пережить разделение
Ицик Бен Ган
MSSQLServer: Относительное разделение - полезное средство для программиста на T-SQL, позволяющее решать проблемы пользователей, когда те пробуют извлечь данные из таблиц базы данных. В своих предыдущих обзорах я рассматривал различные методы обработки относительного деления, которое включает в себя сопоставление наборов данных, доступных некоторым или всем пользователям. В одной из статей я представил решения, основанные на взаимосвязанных подзапросах. На этот раз я хочу рассмотреть задачу на тему относительного деления. Предлагаю читателям решить ее, применяя те, более ранние, методы. Затем я покажу дополнительное решение и несколько его вариантов...
Технологии и средства доступа к реляционным базам данных. ADO.NET
Alf
ADO: MSDN определяет аббревиатуру ADO.NET как <ActiveX Data Objects for the .NET Framework>. Внимательный читатель сразу же заметит подвох. Что, собственно, делает в среде .NET, которая, как известно, объявила о своей автономии от COM, технология, базирующаяся на ActiveX?...
Методика анализа данных
Некипелов Николай, Арустамов Алексей
OLAP: При анализе информации вы часто будете сталкиваться с тем, что теоретическое великолепие методов анализа разбивается о действительность. Ведь вроде все давно решено - известно множество методов решения задач анализа. Почему же довольно часто они не работают?...

[В начало]

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

BUG: A call to a RAISERROR statement in a Transact-SQL batch can cause a SQLAgent job to fail and to lose output in SQL Server
BUG: DTS Package Execution Is Canceled Unexpectedly in a Visual Basic Application
BUG: Impersonation May Not Work When You Use ASP.NET SQL Server Session State with Integrated Security
Fix: Corrupted Data When You Enable Asynchronous Fetching in SQL Server ODBC Driver
FIX: SQL Server Full-Text Population by Using a Single-Threaded Filter DLL or a PDF Filter DLL May Not Succeed
FIX: The TextData column of the SP:StmtStarting event and the SP:StmtCompleted event displays the dynamic Transact-SQL statement even when the stored procedure is encrypted
How to transfer a database from one collation to another collation in SQL Server
HOW TO: Administer Different Versions of SQL Server by Using SQL Server Enterprise Manager
HOW TO: Enable SSL Encryption for SQL Server 2000 with Certificate Server
HOW TO: Grant Access to SQL Logins on a Standby Database When "guest" User Is Disabled
HOW TO: Implement Bidirectional Transactional Replication
HOW TO: Implement Forms-Based Authentication in Your ASP.NET Application by Using Visual Basic .NET
HOW TO: Install SQL Server 2000 - Basic Local Installation
HOW TO: Replicate Between Computers Running SQL Server in Non-Trusted Domains or Across the Internet
HOW TO: Set Up and Troubleshoot a Linked Server to Oracle in SQL Server
HOW TO: Synchronize Mobile Databases by Using SQL Server CE Relay
HOW TO: Troubleshoot a SQL Server Desktop Engine 2000 Installation and Upgrade
HOW TO: Troubleshoot Slow-Running Queries on SQL Server 7.0 or Later
HOW TO: Use KEEPFIXED PLAN to Disable Stored Procedure Recompilations
HOW TO: Use sp_OA Stored Procedures and SQL Distributed Management Objects (SQL-DMO) to Script Out Jobs in SQL Server
INF: Clustered SQL Server Do's, Don'ts, and Basic Warnings
INF: New Concurrency and Scheduling Diagnostics Added to SQL Server
INFO: Microsoft Guide to Application Architecture for .NET: Designing Applications and Services
PRB: "Cannot Start More Transactions on This Session" Error Message When You Use OLE DB Provider for SQL Server in ADO.NET
PRB: Cannot Connect to MSDE 2000 by Using ADO.NET with SQL Authentication

[В начало]

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

Introduction to MSSQL Server 2000 Analysis Services: Reporting Options for Analysis Services Cubes: ProClarity Professional, Part I
William Pearson
While the majority of the articles of our series to date have focused upon the design, creation and manipulation of cubes within MSAS, I began in Article Ten to discuss analysis and reporting options for cubes. I undertook this because, as most of us are aware, until the release of MSSQL 2000 Reporting Services (stay tuned for a series of articles on this amazing new paradigm in enterprise reporting!), Microsoft does not provide a graphical tool within MSAS to analyze or report upon the data in an OLAP cube. In addition, I offered tutorials on using a couple of external options in response to the expressed need of several readers for alternatives in this regard - alternatives beyond the mere browse capabilities within Analysis Services
Monitor Disk Space on Multiple SQL Servers
Muthusamy Anantha Kumar
In the typical IT department, an un-avoidable task is to monitor the disk space on all drives on certain servers. In addition, the methods presented here will help in monitoring the growth of files. In this article, I am going to discuss three different ways to monitor disk space on a list of servers and store the output either in a .CSV file or on a database table
SQL Server 2000 DTS Part 7 - DTS Designer Tasks: the ActiveX Script task
Marcin Policht
If you have been following our series of articles discussing SQL Server DTS technology, you probably have noticed frequent references to ActiveX-based scripting. While scripting is not very popular among database administrators, its potentials are worth exploring, especially since familiarity with its concepts is required to fully understand the remaining types of tasks we will be covering. We will start this coverage with the ActiveX Script task, which, as you might expect, utilizes scripting functionality most extensively
SQL Reporting Services: A radically new approach
Nitin Paranjape
We have been used to traditional report writers for many years now. In this era of thin client, multi-tier, object oriented, service based architecture, the good old report writers have remained more or less similar. For example, most of these provide header, footer, detail, and group based bands where you insert database or calculated fields to manage things
Microsoft Getting a Bigger Slice of Database Pie
Brian Fonseca
January 12, 2004. As the absolute size of corporate and government databases continues to swell, more users are turning to technology they previously didn't consider for very large databases: Microsoft Corp. and its DBMS and Windows
Managed UDTs Let You Extend the SQL Server Type System
Peter W. DeBetta
The next version of SQL Server, code-named "Yukon," will offer enhanced support for user-defined types (UDTs). Because UDTs can be managed by the CLR, you can represent a wide variety of data structures to create types not possible with previous versions of SQL Server. With UDTs you can more precisely control the kind of data your type accepts, resulting in better data management. This article explores UDTs in "Yukon" and covers their design and implementation
Generate an html-excel file with any table
Alejandro Claver
Does not need Excel to generate , because does not use Excel automation
Use Dynamic Properties to Control Resources
Keyur Shah
Posted November 20, 2003. Learn how to map properties to a key in the configuration file using dynamic properties. Microsoft has introduced a feature called dynamic properties in its Visual Studio .NET integrated and rapid application development environment. You can use this feature to control the location of resources (such as Web services and databases) that your application uses
Upgrading Database Improves Performance
John Zipperer
Posted November 6, 2003. Careful planning helped ensure a manufacturing site's smooth transfer from an aging system to Windows Advanced Server and SQL Server. In some projects, time is the central factor; it is involved in the problem, the solution, and the challenge along the way. For computer hard drive manufacturer Western Digital, several months of work would go into a server switchover that could take no longer than 48 hours (see Executive Summary). That was the total amount of time the company was willing to spare in the manufacturing process. But the main reason for making the switch in the first place was that the company's existing server setup was introducing a time lag that was about five times longer than the acceptable speed. With production in its overseas plants expected to increase further, that time lag would be a real and increasing problem
Lifecycle Management
Welcome to another in our series of special FTP reports. Check out these case studies, tips, and market trends on this important topic
Wrapping xp_sendmail
Dallas Monday
If you spend a lot of time developing and distributing extracts or reports, here's a technique for automating the process. In this article, Dallas Monday describes how to distribute text files, Excel spreadsheets, and even Access databases via e-mail using xp_sendmail. Sounds straightforward, right? Think again
Grappling With the Gorilla
Drew Robb
October 8, 2003: Oracle unquestionably is the 800-pound gorilla of database companies. But Microsoft's SQL Server is mounting a serious challenge to the market leader
Asynchrous Execution with C#
Keith Henry
Ever had an application where the Stored Procedure just takes too long? You've done all the optimization you can but still takes a few minutes to run. Maybe a search on a VLDB or building a complex report. Maybe you have a lot of little processes that you run one after another. In this article we are going to build a web application that executes an asynchronous process. This will allow us to return a web page so that the user is not left there waiting with a blank screen, while our database is still working in the background
Using Exotic Joins in SQL Part 1
Chris Cubley
When most developers think of joins, they think of “a.SomethingID = b.SomethingID”. This type of join, the equijoin, is vitally important to SQL programming; however, it only scratches the surface of the power of the SQL join
Drop user databases without using normal syntax
Rudy Setiadi
When you restore a SQL Server database to another server or PC, sometimes the sysusers table is not consistent and users can't be dropped from the database. Here's how to drop user databases if they can't be dropped using normal syntax like sp_dropuser. This method has been tested on Sybase 11 and Microsoft SQL Server 7 and 2000
SQL Server 2000 size maintenance
Baya Pavliashvili
Database size maintenance is among the "boring" tasks that DBAs have to perform. Even though storage space is becoming cheaper each day, disk drives still have limits. If you allow your databases to grow without ever managing their size you're very likely to get in trouble. Regardless of how large your disk drives are, once your database and log files grow large enough, not managing them closely will cause your pager to go off frequently
Why OLAP deserves more attention
Alexey Reznichenko
The first commercial multidimensional (OLAP) products appeared approximately 30 years ago (Express). When Edgar Codd introduced the OLAP definition in his 1993 white paper, there were already dozens of OLAP products for client/server and desktop/file server environments. Usually those products were expensive, proprietary, standalone systems afforded only by large corporations, and performed only OLAP functions
Alternate way to find database size
Robert Oliver
I like the concept of Madhusudan Naidu Gundapaneni's tip, Find the size of every database. This is a simple variation on his theme that slits out the log and data file sizes
SQL injection: When firewalls offer no protection
David Litchfield
This excerpt is from SQL Server Security, written by David Litchfield and published by McGraw-Hill/Osborne Media. Read the entire chapter here. Most companies that have an online presence these days will have a firewall of some kind. The purpose of a firewall is to filter network traffic that passes into and out of an organization's network, limiting use of the network to permitted, "legitimate" users
JDBC: An introduction
Maydene Fisher, Jon Ellis, & Jonathan Bruce
The JDBC API is a Java API for accessing virtually any kind of tabular data. (As a point of interest, JDBC is a trademarked name and is not an acronym; nevertheless, JDBC is often thought of as standing for "Java Database Connectivity." Originally, JDBC was the only trademarked name for the data source access API, but more recently, Java DataBase Connectivity has been added as a second trademarked name.) The JDBC API consists of a set of classes and interfaces written in the Java programming language that provide a standard API for tool/database developers and makes it possible to write industrial-strength database applications entirely in the Java programming language
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
How to search for date and time values using Microsoft SQL Server 2000
Bryan Syverson
Suppose you’re writing a query to find all the invoices that were written on January 6, 2003. You know from the control totals that 122 invoices were written that day. But when you run this query
Disaster Recovery Reporting scripts
Joseph Sack
Have you ever been asked a seemingly simple question about a SQL Server configuration, and realize that you do not remember (or do not know) the answer?
Move, Copy, Delete, and Rename files in DTS using an ActiveX task and VBScript
Joseph Sack
If you develop DTS packages that import or export data, you may find yourself needing to do more than just import data into SQL Server. Data movement often involves several steps in addition to the export or import process. For example: copying a file from one directory to another, moving a file, deleting a file, and/or renaming a file
MS Type 4 JDBC driver - Performance differences between Compatibility levels - Unicode vs. Non-Unicode
Joseph Sack
Dave Bellis, a DBA friend of mine, shared some information that I thought should be passed on. This article is written those of you using JAVA, Microsoft's free JDBC Type 4 driver, and SQL Server 2000
A Simple Method for Measuring SQL Server Backup Throughput - MBs/sec
Joseph Sack
Over the years, I've often performed "reality checks" on the performance of my SQL Server backups. I've wanted to see how fast my databases get backed up to disk (although this query works for network and tape database backups too)
ActiveX Script for Emailing SQL Server Reports - Using CDO
Joseph Sack
Microsoft wrote a few interesting knowledge base articles on how to email reports using CDO. CDO is an object model which allows you to send mail via SMTP servers - all without having to install mail clients and profiles on your Windows 2000 machine
A SQL Server Equivalent to ROWNUM
Joseph Sack
Oracle includes a function called ROWNUM which allows you to generate a list of sequential numbers based on ordinal row (similar to the IDENTITY property of a SQL Server table)
Trapping DTS errors with Transact-SQL
Joseph Sack
I've often been asked what the "best" method is for trapping DTS errors. This is a very broad question. What errors you care about capturing can differ from project to project, and package to package
Seven Monitoring Scripts
Joseph Sack
In this article, I will share with you seven Transact-SQL queries that I like to run daily for the SQL Server instances I support. These queries can be integrated into your own stored procedures, web pages, email reports, or monitoring routines
Troubleshooting SQL Server with the Sysperfinfo Table
Joseph Sack
When given a choice between using GUI tools and using Transact-SQL, I choose the latter whenever possible or practical. This isn’t from a sense of technical superiority, but rather a need to counteract my lazy nature. This article will briefly describe a few queries that I use to troubleshoot memory bottleneck issues that are normally identified using System Monitor (Performance Monitor). System Monitor is useful for tracking trends over time (using counter logs), however sometimes I like to see snapshots of the current state of a SQL Server Instance. Using Query Analyzer, you can add or integrate these queries I detail into your own Transact-SQL script library or procedures as you see fit
AWE Adventures
Joseph Sack
Recently, 4GB of physical RAM was added to a SQL Server 2000 Enterprise edition instance I support. This brought the total physical RAM available on the machine up to 8GB. By using Windows 2000 Address Windowing Extensions (AWE), with SQL Server 2000 Enterprise or Developer Edition, on Windows 2000 Advanced Server or Windows 2000 Data Center, SQL Server can take advantage of physical memory exceeding 4GB of physical RAM
Problem Solving With Information Schema Columns
Joseph Sack
Information Schema Views were introduced in Microsoft SQL Server 2000. They provide a method of querying database meta-data without directly accessing system tables. Information Schema Views are less cryptic than system tables (no type code or bit map translations), and require fewer table joins within a query, depending on the data you are interested in
Executing a Package from Visual Basic
Brian Knight
So you've created a SQL Server package and now you're ready to integrate it into your Visual Basic application? A common scenario for this is where you don't want a client to have direct access to SQL Server Enterprise Manager. Instead, you can send them a Visual Basic executable to place a clean front-end to the package. For example, you could send the client a program to where you could enter a few parameters to execute the package. In this article, I'll show you how to do a simple example
Worst Practice - Bad Comments
Andy Warren
Steve Jones & I have been writing for a while about Worst Practices for a while, our attempt to spark some thought and conversation about things that are just plain wrong! At least according to us, your mileage may vary. So let's talk about worst practices in commenting your TSQL (and to a large extent, any other code you write)

[В начало]

ФОРУМ SQL.RU

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

Tool Вы знаете что твориться на ваших 10-30+ серверах ?
Суррогатные или естественные
Книга по SQL 2000
Можно ли в SQL Server 2000 зашифровать поля, чтобы никто не видел значений? (номера кредитных карт)
Как отследить разрыв соединения
Почему нежелательно называть поля в таблицах БД по-русски?
Недостатки MSSQL
как узнать значения?
Оптимизация создания 10 МИЛИАРДОВ записей.
Разработчикам складских баз: подсчет складских остатков
Интересно, а кто как свои SQL сервера называет?
Вопрос к аналитикам
Extended Procedure
Оптимизация быстродействия внутри хранимки
ADO& SQL Server , блокировка записей
xp_sqlmaint -RebldIdx free_space and fill factor
Глюк с Having ?
Как прилинковать MySQL к MSSQL
SQL Agent
Необходимо Упростить запрос!!!

[В начало]

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

И мене плиз!!
Таблица
re
View Вопрос новичка
SQL Server BOL January 2004 Update
ADOQuery:DataSet не в режиме редактирования
Возможность репликации MS SQL2000 и локальных БД
Access не открыват dbf?

[В начало]


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

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

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




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

В избранное