-- XML 의 exist 메소드를 활용 사례
--  : XML 문서에서 어떤 속성의 특정값이 존재하는지를 검사
-- (only SQL Server 2005)
DECLARE @v_xml XML
SELECT @v_xml = N'<rows><row id="1" tag="1"/><row id="1" tag="0"/></rows>'

--rows/row/@tag속성의 값이 1인 엘리멘트가 존재하지를 반환
SELECT @v_xml.exist('rows/row[@tag="1"]')   result
---존재함
---result = 1  

SELECT @v_xml.exist('rows/row[@tag="2"]')   result
---존재하지 않음
---result = 0

출처 : 직접 작성.

이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2010/02/11 23:16 2010/02/11 23:16
, , , ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/297

Trackback URL : http://John.tobe30.com/tc/trackback/297

Leave a comment
[로그인][오픈아이디란?]

DECLARE @v_xml XML
, @v varchar(max)
SELECT @v_xml = '<row id=""/>'
, @v = 'xxxxx'
SET @v_xml.modify(' replace value of (/row/@id)[1] with sql:variable("@v") ');
SELECT @v_xml ;

--반환값
<row id="xxxxx" />

이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/08/11 19:33 2009/08/11 19:33
,
Response
4 Trackbacks , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/188

Trackback URL : http://John.tobe30.com/tc/trackback/188

Trackbacks List

  1. Vicodin.

    Tracked from Buy vicodin. 2010/06/25 01:49 Delete

    Vicodin. Buy vicodin online. How l ong does vicodin stay in your system.

  2. Purchase vicodin online.

    Tracked from Vicodin. 2010/07/15 01:58 Delete

    Buy vicodin online. Vicodin erowid. Vicodin. Vicodin overdose.

  3. How long is percocet in your system.

    Tracked from Percocet. 2010/07/15 06:16 Delete

    Percocet vs. lortabs. Percocet withdrawal symptoms.

  4. Heroin mixed with alprazolam.

    Tracked from Alprazolam. 2010/07/15 11:56 Delete

    Alprazolam synthesis. Alprazolam.

Leave a comment
[로그인][오픈아이디란?]

[SQL Server]SQL Server 2005 XML ASCII 문자(1~31) 사용시 오류 문제.


1. 오류 재현 코드

DECLARE @v_xml XML DECLARE @v_looper INT SELECT @v_looper = 1 WHILE (@v_looper<31) BEGIN SELECT @v_looper = @v_looper + 1 BEGIN TRY   SELECT @v_Xml = N'<rows>

<row attr="' + CHAR(@v_looper) + '" />

</rows>' PRINT 'Success! ASCII Code:' + CAST(@v_looper AS VARCHAR(10)) END TRY BEGIN CATCH PRINT 'Failure! ASCII Code:' + CAST(@v_looper AS VARCHAR(10)) --PRINT ERROR_NUMBER() --PRINT ERROR_MESSAGE() END CATCH END


실행결과

Error! ASCII Code:2

Error! ASCII Code:3 Error! ASCII Code:4 Error! ASCII Code:5 Error! ASCII Code:6 Error! ASCII Code:7 Error! ASCII Code:8 Success! ASCII Code:9 Success! ASCII Code:10 Error! ASCII Code:11 Error! ASCII Code:12 Success! ASCII Code:13 Error! ASCII Code:14 Error! ASCII Code:15 Error! ASCII Code:16 Error! ASCII Code:17 Error! ASCII Code:18 Error! ASCII Code:19 Error! ASCII Code:20 Error! ASCII Code:21 Error! ASCII Code:22 Error! ASCII Code:23 Error! ASCII Code:24 Error! ASCII Code:25 Error! ASCII Code:26 Error! ASCII Code:27 Error! ASCII Code:28 Error! ASCII Code:29 Error! ASCII Code:30 Error! ASCII Code:31

위 실행결과에서 확인할 수 있듯이 ASCII코드 1에서 31사이에 사용 가능한 Character는

9  (TAB : horizontal tab, XML #x9)
10 (LF : line feed, new line, XML #xA)
13 (CR : carriage  return, XML #xD)

이렇게 세가지 뿐이고, 나머지 Character는 다음과 모두 에러를 발생한다.

메시지 9420, 수준 16, 상태 1, 줄 9
XML parsing: line 1, character 18, illegal xml character
이 같은 문제에 대해 MS에서는 해당 문자들은 XML 스펙에서 사용을 금지하고 있으므로 사용하지 말라고 이야기 하고 있다.

PRB: Error Message When an XML Document Contains Low-Order ASCII Characters

원문 : http://support.microsoft.com/kb/315580

SYMPTOMS (증상)

When you attempt to use versions 3.0 or later of the MSXML parser to parse XML documents that contain certain low-order non-printable ASCII characters (that is, characters below ASCII 32), you may receive the following error message:
An Invalid character was found in text content.


CAUSE

Versions 3.0 and later of the MSXML parser strictly enforce the valid XML character ranges that are defined by the World Wide Web Consortium (W3C) XML language specification. XML documents that are parsed using versions 3.0 or later of MSXML cannot contain characters that fall outside the defined valid XML character ranges. The low-order non-printable ASCII characters in the ranges that are listed in the "More Information" section are not valid XML characters. An XML document that contains instances of these characters is not conformant with the W3C specifications and cannot be parsed successfully with versions 3.0 and later of MSXML.


RESOLUTION
To resolve this problem, either remove instances of the low-order non-printable ASCII characters, or replace the characters with an alternate valid character such as the space character (ASCII 32, hex #x20). This solution makes the XML document compliant with the W3C specifications. However, removing or replacing instances of these characters may affect other applications that use the data and to which the characters are significant. Such additional impact can only be identified by testing and will need to be addressed by implementing a fix or workaround that is appropriate for a specific situation.

STATUS
This behavior is by design.


MORE INFOMATION
Versions 2.6 and earlier of the MSXML parser permit XML documents to contain low-order non-printable ASCII characters that fall outside the W3C valid XML character ranges. However, the design of versions 3.0 and later of the MSXML parser has been changed to strictly enforce the valid XML character ranges that are defined in the W3C XML language specification. This design change is required to be able to identify non-conformant XML documents.
The following are the valid XML characters and character ranges (hex values) as defined by the W3C XML language specifications 1.0:
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
The following are the character ranges for low-order non-printable ASCII characters that are rejected by MSXML versions 3.0 and later:
#x0 - #x8 (ASCII 0 - 8)
#xB - #xC (ASCII 11 - 12)
#xE - #x1F (ASCII 14 - 31)
This design change may affect the following users and applications:
  • Internet Explorer users: Users who have been using Internet Explorer versions 5.5 and earlier (and who did not install MSXML 3.0 in Replace mode) to browse and view XML documents that contain one or more instances of the specified low-order non-printable ASCII characters encounter the error message after upgrading to Internet Explorer 6.0 because Internet Explorer 6.0 installs MSXML 3.0 SP2 in Replace mode and uses it to parse XML documents.
  • MDAC and ADO users: Developers and users who load ADO-persisted XML documents that contain one or more instances of the specified low-order non-printable ASCII characters into ADO Recordset objects encounter the error message after upgrading to MDAC 2.7 because MDAC 2.7 installs MSXML 3.0 SP2, which is the version of the MSXML parser that the ADO 2.7 Recordset object uses.
  • Applications that use the MSXML Document Object Model (DOM): Applications that use version independent PROGIDs to instantiate MSXML DOM objects that are used to parse XML documents generate the specified error when MSXML 3.0 or one of its service packs is installed in Replace mode or when the code is modified to use the MSXML 3.0 or 4.0 version specific PROGIDs.


REFERENCES

For additional information on other known causes and workarounds for the error message that is specified in the 'Symptoms' section, click the article numbers below to view the articles in the Microsoft Knowledge Base:
238833  (http://support.microsoft.com/kb/238833/EN-US/ ) PRB: XML Parser: Invalid Character Was Found in Text Content
275883  (http://support.microsoft.com/kb/275883/EN-US/ ) INFO: XML Encoding and DOM Interface Methods

APPLIES TO
  • Microsoft XML Parser 3.0
  • Microsoft XML Parser 3.0 Service Pack 1
  • Microsoft XML Parser 3.0 Service Pack 2
  • Microsoft XML Core Services 4.0
  • Microsoft Data Access Components 2.8


이에 대해서 W3C의 Extensible Markup Language (XML) 1.0 (Fifth Edition) 에서 다음과 같이 정의하고 있다. ("2.2.Characters"에 대한 내용만 일부 복사.)

Extensible Markup Language (XML) 1.0 (Fifth Edition)
W3C Recommendation 26 November 2008
2.2. Characters
[Definition: A parsed entity contains text, a sequence of characters, which may represent markup or character data.] [Definition: A character is an atomic unit of text as specified by ISO/IEC 10646:2000 [ISO/IEC 10646]. Legal characters are tab, carriage return, line feed, and the legal characters of Unicode and ISO/IEC 10646. The versions of these standards cited in A.1 Normative References were current at the time this document was prepared. New characters may be added to these standards by amendments or new editions. Consequently, XML processors MUST accept any character in the range specified for Char. ]

Character Range
[2]    Char    ::=    #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */

The mechanism for encoding character code points into bit patterns may vary from entity to entity. All XML processors MUST accept the UTF-8 and UTF-16 encodings of Unicode [Unicode]; the mechanisms for signaling which of the two is in use, or for bringing other encodings into play, are discussed later, in 4.3.3 Character Encoding in Entities.

Note:
Document authors are encouraged to avoid "compatibility characters", as defined in section 2.3 of [Unicode]. The characters defined in the following ranges are also discouraged. They are either control characters or permanently undefined Unicode characters:
[#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDEF],
[#x1FFFE-#x1FFFF], [#x2FFFE-#x2FFFF], [#x3FFFE-#x3FFFF],
[#x4FFFE-#x4FFFF], [#x5FFFE-#x5FFFF], [#x6FFFE-#x6FFFF],
[#x7FFFE-#x7FFFF], [#x8FFFE-#x8FFFF], [#x9FFFE-#x9FFFF],
[#xAFFFE-#xAFFFF], [#xBFFFE-#xBFFFF], [#xCFFFE-#xCFFFF],
[#xDFFFE-#xDFFFF], [#xEFFFE-#xEFFFF], [#xFFFFE-#xFFFFF],
[#x10FFFE-#x10FFFF].

나의 결론 : 지금까지 이런 문제에 대해 전혀 모르고 있었다. XML를 사용하면서 W3C의 XML 스펙 문서를 자세히 읽어 본 적도 없고,  XML관련 서적을 봤을 때 W3C의 XML 스펙에 대해 이야기하는 책도 접해보지 못했다. 새로운 기술을 사용할 때는 기본에 충실하고,  해당 표준 스펙에 대해 충분히 숙지 해야할 것이다. 그리고 또 다른 한가지는 모든 스펙문서가 영문으로 된 경우 많으므로 영어능력을 키우는 것도 중요하겠다. 여기서 다시 한번 모든 학문의 기초는 영어라는 이야기를 되새기면서... 이 씁쓸함은 머지?





이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/06/07 00:47 2009/06/07 00:47

Trackback URL : http://John.tobe30.com/tc/trackback/165

Leave a comment
[로그인][오픈아이디란?]

[SQL Server] DB Backup 백업 현황 점검

SQL Server에서 DB Backup 백업 현황 점검하는 SQL.

msdb에 backupset 시스템 테이블을 조회하면 백업현황을 조회해볼 수 있다.
msdb.dbo.backupset 테이블의 내용
열 이름 데이터 형식 설명
backup_set_id int 백업 세트를 식별하는 고유한 백업 세트 ID입니다. ID, 기본 키
backup_set_uuid uniqueidentifier 백업 세트를 식별하는 고유한 백업 세트 ID입니다.
media_set_id int 백업 세트를 포함한 미디어 세트를 식별하는 고유한 미디어 세트 ID입니다. backupmediaset(media_set_id)를 참조합니다.
first_family_number tinyint 백업 세트가 시작되는 미디어의 패밀리 번호입니다. NULL일 수 있습니다.
first_media_number smallint 백업 세트가 시작되는 미디어의 미디어 번호입니다. NULL일 수 있습니다.
last_family_number tinyint 백업 세트가 끝나는 미디어의 패밀리 번호입니다. NULL일 수 있습니다.
last_media_number smallint 백업 세트가 끝나는 미디어의 미디어 번호입니다. NULL일 수 있습니다.
catalog_family_?number tinyint 백업 세트 디렉터리의 시작을 포함한 미디어의 패밀리 번호입니다. NULL일 수 있습니다.
catalog_media_number smallint 백업 세트 디렉터리의 시작을 포함한 미디어의 미디어 번호입니다. NULL일 수 있습니다.
position int 적절한 백업 세트 및 파일의 위치를 찾기 위해 복원 작업에 사용되는 백업 세트 위치입니다. NULL일 수 있습니다. 자세한 내용은 BACKUP(Transact-SQL)에서 FILE을 참조하십시오.
expiration_date datetime 백업 세트가 만료되는 날짜 및 시간입니다. NULL일 수 있습니다.
software_vendor_id int 백업 미디어 헤더를 기록하는 소프트웨어 공급업체의 ID입니다. NULL일 수 있습니다.
name nvarchar(128) 백업 세트의 이름입니다. NULL일 수 있습니다.
description nvarchar(255) 백업 세트에 관한 설명입니다. NULL일 수 있습니다.
user_name nvarchar(128) 백업 작업을 수행하는 사용자의 이름입니다. NULL일 수 있습니다.
software_major_version tinyint Microsoft SQL Server 주 버전 번호입니다. NULL일 수 있습니다.
software_minor_version tinyint SQL Server 부 버전 번호입니다. NULL일 수 있습니다.
software_build_version smallint SQL Server 빌드 번호입니다. NULL일 수 있습니다.
time_zone smallint 15분 간격으로 백업 작업이 수행되는 현지 시간과 UCT 간의 차이입니다. 값은 -48에서 +48까지 사용할 수 있으며 각 값을 포함합니다. 값 127은 알 수 없음을 의미합니다. 예를 들어 -20은 EST(동부 표준시) 또는 UTC 이후 5시간을 의미합니다. NULL일 수 있습니다.
mtf_minor_version tinyint Microsoft Tape Format의 부 버전 번호입니다. NULL일 수 있습니다.
first_lsn numeric(25,0) 백업 세트에서 첫 번째 또는 가장 오래된 로그 레코드의 로그 시퀀스 번호입니다. NULL일 수 있습니다.
last_lsn numeric(25,0) 백업 세트 다음에 오는 로그 레코드의 로그 시퀀스 번호입니다. NULL일 수 있습니다.
checkpoint_lsn numeric(25,0) 다시 실행이 시작되어야 하는 로그 레코드의 로그 시퀀스 번호입니다. NULL일 수 있습니다.
database_backup_lsn numeric(25,0) 가장 최근 전체 데이터베이스 백업의 로그 시퀀스 번호입니다. NULL일 수 있습니다. database_backup_lsn은 백업이 시작될 때 트리거되는 "검사점의 시작"입니다. 데이터베이스가 유휴 상태이고 복제가 구성되지 않은 경우 백업이 수행되면 이 LSN은 first_lsn과 일치하게 됩니다.
database_creation_date datetime 데이터베이스가 원래 생성된 날짜와 시간입니다. NULL일 수 있습니다.
backup_start_date datetime 백업 작업이 시작된 날짜와 시간입니다. NULL일 수 있습니다.
backup_finish_date datetime 백업 작업이 완료된 날짜와 시간입니다. NULL일 수 있습니다.
type char(1) 백업 유형입니다. 다음 값이 될 수 있습니다.
D = 데이터베이스 I = 차등 데이터베이스 L = 로그 F = 파일 또는 파일 그룹 G =차등 파일 P = 부분 Q = 차등 부분 NULL일 수 있습니다.
sort_order smallint 백업 작업을 수행하는 서버의 정렬 순서입니다. NULL일 수 있습니다. 정렬 순서 및 데이터 정렬에 대한 자세한 내용은 데이터 정렬 작업을 참조하십시오.
code_page smallint 백업 작업을 수행하는 서버의 코드 페이지입니다. NULL일 수 있습니다. 코드 페이지에 대한 자세한 내용은 데이터 정렬 작업을 참조하십시오.
compatibility_level tinyint 데이터베이스에 대한 호환성 수준 설정입니다. 다음 값이 될 수 있습니다.
60 = SQL Server 6.0 65 = SQL Server 6.5 70 = SQL Server 7.0 80 = SQL Server 2000 90 = SQL Server 2005
NULL일 수 있습니다. 호환성 수준에 대한 자세한 내용은 sp_dbcmptlevel(Transact-SQL)을 참조하십시오.
database_version int 데이터베이스 버전 번호입니다. NULL일 수 있습니다.
backup_size numeric(20,0) 백업 세트의 크기(바이트)입니다. NULL일 수 있습니다.
database_name nvarchar(128) 백업 작업과 연관된 데이터베이스의 이름입니다. NULL일 수 있습니다.
server_name nvarchar(128) SQL Server 백업 작업을 실행하고 있는 서버의 이름입니다. NULL일 수 있습니다.
machine_name nvarchar(128) SQL Server를 실행 중인 컴퓨터의 이름입니다. NULL일 수 있습니다.
flags int Microsoft SQL Server 2005에서는 flags 열이 사용되지 않고 대신 다음과 같은 bit 열이 사용됩니다.
  • has_bulk_logged_data
  • is_snapshot
  • is_readonly
  • is_single_user
  • has_backup_checksums
  • is_damaged
  • begins_log_chain
  • has_incomplete_metadata
  • is_force_offline
  • is_copy_only
NULL일 수 있습니다.SQL Server 이전 버전의 백업 세트에서 플래그 비트는 다음과 같습니다. 1 = 백업이 최소 기록 데이터를 포함합니다. 2 = WITH SNAPSHOT이 사용되었습니다. 4 = 백업 시 데이터베이스가 읽기 전용이었습니다. 8 = 백업 시 데이터베이스가 단일 사용자 모드였습니다.
unicode_locale int 유니코드 로캘입니다. NULL일 수 있습니다.
unicode_compare_style int 유니코드 비교 스타일입니다. NULL일 수 있습니다.
collation_name nvarchar(128) 데이터 정렬 이름입니다. NULL일 수 있습니다.
Is_password_protected bit 백업 세트입니다. 다음과 같이 암호로 보호됩니다.
0 = 보호되지 않음
1 = 보호됨
recovery_model nvarchar(60) 데이터베이스의 복구 모델입니다. FULL BULK-LOGGED SIMPLE
has_bulk_logged_data bit 1 = 백업이 대량 로그 데이터를 포함합니다.
is_snapshot bit 1 = SNAPSHOT 옵션을 사용하여 백업이 수행되었습니다.
is_readonly bit 1 = 백업 시 데이터베이스가 읽기 전용이었습니다.
is_single_user bit 1 = 백업 시 데이터베이스가 단일 사용자 모드였습니다.
has_backup_checksums bit 1 = 백업이 백업 체크섬을 포함합니다.
is_damaged bit 1 = 이 백업이 생성될 때 데이터베이스 손상이 감지되었습니다. 오류와 관계없이 백업 작업을 계속하도록 요청했습니다.
begins_log_chain bit 1 = 연속되는 로그 백업 체인에서 첫 번째입니다. 로그 체인은 데이터베이스가 생성된 후 또는 단순 복구 모델에서 전체 또는 대량 로그 복구 모델로 전환될 때 수행된 첫 번째 로그 백업에서 시작됩니다.
has_incomplete_metadata bit 1 = 메타데이터가 완전하지 않은 비상 로그 백업입니다. 자세한 내용은 비상 로그 백업을 참조하십시오.
is_force_offline bit 1 = 백업이 수행될 때 NORECOVERY 옵션을 사용하여 데이터베이스가 오프라인 상태가 되었습니다.
is_copy_only bit 1 = 복사 전용 백업입니다. 자세한 내용은 복사 전용 백업을 참조하십시오.
first_recovery_fork_guid uniqueidentifier 복구 분기 시작 지점의 ID입니다. RESTORE HEADERONLY의 FirstRecoveryForkID에 해당됩니다. 데이터 백업의 경우 first_recovery_fork_guid는 last_recovery_fork_guid와 같습니다.
last_recovery_fork_guid uniqueidentifier 복구 분기 끝 지점의 ID입니다. RESTORE HEADERONLY의 RecoveryForkID에 해당됩니다. 데이터 백업의 경우 first_recovery_fork_guid는 last_recovery_fork_guid와 같습니다.
fork_point_lsn numeric(25,0) first_recovery_fork_guid가 last_recovery_fork_guid와 같지 않으면 분기 지점의 로그 시퀀스 번호입니다. 그렇지 않으면 값은 NULL입니다.
database_guid uniqueidentifier 데이터베이스에 대한 고유 ID입니다. RESTORE HEADERONLY의 BindingID에 해당됩니다. 데이터베이스를 복원하면 새 값이 할당됩니다.
family_guid uniqueidentifier 생성 시 원래 데이터베이스의 고유 ID입니다. 이 값은 데이터베이스가 다른 이름으로 복원되는 경우에도 동일하게 유지됩니다.
differential_base_lsn numeric(25,0) 차등 백업에 대한 기본 LSN입니다. 단일 백업을 기반으로 하는 차등 백업의 경우 differential_base_lsn보다 크거나 같도록 LSN을 변경하면 차등 백업에 포함됩니다. 여러 백업을 기반으로 하는 차등 백업의 경우 값은 NULL이며 기본 LSN은 파일 수준에서 결정해야 합니다. backupfile(Transact-SQL)을 참조하십시오. 비차등 백업 유형의 경우 값은 항상 NULL입니다.
differential_base_guid uniqueidentifier 단일 백업을 기준으로 하는 차등 백업의 경우 값은 차등 기반의 고유 식별자입니다. 여러 백업을 기반으로 하는 차등 백업의 경우 값은 NULL이며 기본 차등 백업은 파일 수준에서 결정해야 합니다. 비차등 백업 유형의 경우 값은 NULL입니다.


/******************************************************************************
 Name   : Retrieve backup-status
 Author  : CHOI JI WHAN
 Date  : 2009.05.09(SUN)
 Description
User : Backup 명령어를 실행한 사용자
Database : 데이터베이스 명 
Server : 서버명(인스턴스명)
Backup Started : 백업시작시간
Backup Finished : 백업종료시간
Total Time : 백업소요시간
*******************************************************************************/
DECLARE @dbname sysname
SET @dbname = NULL
SELECT bup.user_name AS [User]
, bup.database_name AS [Database]
, bup.server_name AS [Server]
, bup.backup_start_date AS [Backup Started]
, bup.backup_finish_date AS [Backup Finished]
, CAST((CAST(DATEDIFF(s, bup.backup_start_date, bup.backup_finish_date) AS int))/3600 AS varchar) + ' hours, ' 
 + CAST((CAST(DATEDIFF(s, bup.backup_start_date, bup.backup_finish_date) AS int))/60 AS varchar)+ ' minutes, '
 + CAST((CAST(DATEDIFF(s, bup.backup_start_date, bup.backup_finish_date) AS int))%60 AS varchar)+ ' seconds'
AS [Total Time]
FROM msdb.dbo.backupset bup
WHERE bup.backup_set_id IN
(
SELECT MAX(backup_set_id) 
FROM msdb.dbo.backupset
--if no dbname, then return all
WHERE database_name = ISNULL(@dbname, database_name) 
--only interested in the time of last full backup
AND type = 'D' 
GROUP BY database_name
AND bup.database_name IN (SELECT name FROM master.dbo.sysdatabases)
ORDER BY bup.database_name




/******************************************************************************
 Name : Retrieve backup-history
 Author : CHOI JI WHAN
 Date : 2009.05.09(SUN)
*******************************************************************************/
DECLARE @dbname sysname
SET @dbname = NULL 
SELECT bup.user_name AS [User]
, bup.database_name AS [Database]
, bup.server_name AS [Server]
, bup.backup_start_date AS [Backup Started]
, bup.backup_finish_date AS [Backup Finished]
, CAST((CAST(DATEDIFF(s, bup.backup_start_date, bup.backup_finish_date) AS int))/3600 AS varchar) + ' hours, ' 
 + CAST((CAST(DATEDIFF(s, bup.backup_start_date, bup.backup_finish_date) AS int))/60 AS varchar)+ ' minutes, '
 + CAST((CAST(DATEDIFF(s, bup.backup_start_date, bup.backup_finish_date) AS int))%60 AS varchar)+ ' seconds'
 AS [Total Time]
FROM msdb.dbo.backupset bup
WHERE bup.database_name IN (SELECT name FROM master.dbo.sysdatabases)
ORDER BY bup.database_name



참조 : SQL Server 2005 도움말
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.ko/tsqlref9/html/6ff79bbf-4acf-4f75-926f-38637ca8a943.htm
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/05/10 14:01 2009/05/10 14:01
, , , ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/137

Trackback URL : http://John.tobe30.com/tc/trackback/137

Leave a comment
[로그인][오픈아이디란?]

[SQL Server] XML의 특정값 수정하기

SQL Server 2005에서 XML 타입의 modify()메소를 이용하여 XML의 특정값을 수정하는 예제이다.  
XML DML에서 replace value of xpath with value 구문을 이용하는 것이다.

DECLARE @xml XML
SELECT  @xml = N'<root>
                  <elements>
                     <event id="1"/>
                  </elements>
                 </root>'
SET @xml.modify('
replace value of (/root/elements/event/@id)[1]
with "999"
')
SELECT @xml --Result --@xml='<root><elements><event id="999" /></elements></root>'


이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/02/25 23:41 2009/02/25 23:41
, ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/77

Trackback URL : http://John.tobe30.com/tc/trackback/77

Leave a comment
[로그인][오픈아이디란?]

Top SQL Server 2005 Performance Issues for OLTP Applications
원문 : http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/oltp-performance-issues.mspx

OLTP work loads are characterized by high volumes of similar small transactions.

It is important to keep these characteristics in mind as we examine the significance of database design, resource utilization and system performance. The top performance bottlenecks or gotchas for OLTP applications are outlined below.

1

Database Design issue if….

Too many table joins for frequent queries. Overuse of joins in an OLTP application results in longer running queries & wasted system resources. Generally, frequent operations requiring 5 or more table joins should be avoided by redesigning the database.

Too many indexes on frequently updated (inclusive of inserts, updates and deletes) tables incur extra index maintenance overhead. Generally, OLTP database designs should keep the number of indexes to a functional minimum, again due to the high volumes of similar transactions combined with the cost of index maintenance.

Big IOs such as table and range scans due to missing indexes. By definition, OLTP transactions should not require big IOs and should be examined.

Unused indexes incur the cost of index maintenance for inserts, updates, and deletes without benefiting any users. Unused indexes should be eliminated. Any index that has been used (by select, update or delete operations) will appear in sys.dm_db_index_usage_stats. Thus, any defined index not included in this DMV has not been used since the last re-start of SQL Server.

2

CPU bottleneck if…

Signal waits > 25% of total waits. See sys.dm_os_wait_stats for Signal waits and Total waits. Signal waits measure the time spent in the runnable queue waiting for CPU. High signal waits indicate a CPU bottleneck.

Plan re-use < 90% . A query plan is used to execute a query. Plan re-use is desirable for OLTP workloads because re-creating the same plan (for similar or identical transactions) is a waste of CPU resources. Compare SQL Server SQL Statistics: batch requests/sec to SQL compilations/sec. Compute plan re-use as follows: Plan re-use = (Batch requests - SQL compilations) / Batch requests. Special exception to the plan re-use rule: Zero cost plans will not be cached (not re-used) in SQL 2005 SP2. Applications that use zero cost plans will have a lower plan re-use but this is not a performance issue.

Parallel wait type cxpacket > 10% of total waits. Parallelism sacrifices CPU resources for speed of execution. Given the high volumes of OLTP, parallel queries usually reduce OLTP throughput and should be avoided. See sys.dm_os_wait_stats for wait statistics.

3

Memory bottleneck if…

Consistently low average page life expectancy. See Average Page Life Expectancy Counter which is in the Perfmon object SQL Server Buffer Manager (this represents is the average number of seconds a page stays in cache). For OLTP, an average page life expectancy of 300 is 5 minutes. Anything less could indicate memory pressure, missing indexes, or a cache flush.

Sudden big drop in page life expectancy. OLTP applications (e.g. small transactions) should have a steady (or slowly increasing) page life expectancy. See Perfmon object SQL Server Buffer Manager.

Pending memory grants. See counter Memory Grants Pending, in the Perfmon object SQL Server Memory Manager. Small OLTP transactions should not require a large memory grant.

Sudden drops or consistenty low SQL Cache hit ratio. OLTP applications (e.g. small transactions) should have a high cache hit ratio. Since OLTP transactions are small, there should not be (1) big drops in SQL Cache hit rates or (2) consistently low cache hit rates < 90%. Drops or low cache hit may indicate memory pressure or missing indexes.

4

IO bottleneck if…

High average disk seconds per read. When the IO subsystem is queued, disk seconds per read increases. See Perfmon Logical or Physical disk (disk seconds/read counter). Normally it takes 4-8ms to complete a read when there is no IO pressure. When the IO subsystem is under pressure due to high IO requests, the average time to complete a read increases, showing the effect of disk queues. Periodic higher values for disk seconds/read may be acceptable for many applications. For high performance OLTP applications, sophisticated SAN subsystems provide greater IO scalability and resiliency in handling spikes of IO activity. Sustained high values for disk seconds/read (>15ms) does indicate a disk bottleneck.

High average disk seconds per write. See Perfmon Logical or Physical disk. The throughput for high volume OLTP applications is dependent on fast sequential transaction log writes. A transaction log write can be as fast as 1ms (or less) for high performance SAN environments. For many applications, a periodic spike in average disk seconds per write is acceptable considering the high cost of sophisticated SAN subsystems. However, sustained high values for average disk seconds/write is a reliable indicator of a disk bottleneck.

Big IOs such as table and range scans due to missing indexes.

Top wait statistics in sys.dm_os_wait_stats are related to IO such as ASYNCH_IO_COMPLETION, IO_COMPLETION, LOGMGR, WRITELOG, or PAGEIOLATCH_x.

5

Blocking bottleneck if…

Index contention. Look for lock and latch waits in sys.dm_db_index_operational_stats. Compare with lock and latch requests.

High average row lock or latch waits. The average row lock or latch waits are computed by dividing lock and latch wait milliseconds (ms) by lock and latch waits. The average lock wait ms computed from sys.dm_db_index_operational_stats represents the average time for each block.

Block process report shows long blocks. See sp_configure “blocked process threshold” and Profiler “Blocked process Report” under the Errors and Warnings event.

Top wait statistics are LCK_x. See sys.dm_os_wait_stats.

High number of deadlocks. See Profiler “Graphical Deadlock” under Locks event to identify the statements involved in the deadlock.

6

Network bottleneck if…

High network latency coupled with an application that incurs many round trips to the database.

Network bandwidth is used up. See counters packets/sec and current bandwidth counters in the network interface object of Performance Monitor. For TCP/IP frames actual bandwidth is computed as packets/sec * 1500 * 8 /1000000 Mbps.

이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/01/10 02:11 2009/01/10 02:11

Trackback URL : http://John.tobe30.com/tc/trackback/57

Leave a comment
[로그인][오픈아이디란?]

[펌]SQL Server Storage Top 10 Best Practices

Storage Top 10 Best Practices

원문 : http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspx

Proper configuration of IO subsystems is critical to the optimal performance and operation of SQL Server systems. Below are some of the most common best practices that the SQL Server team recommends with respect to storage configuration for SQL Server.

1

Understand the IO characteristics of SQL Server and the specific IO requirements / characteristics of your application.

In order to be successful in designing and deploying storage for your SQL Server application, you need to have an understanding of your application’s IO characteristics and a basic understanding of SQL Server IO patterns. Performance monitor is the best place to capture this information for an existing application. Some of the questions you should ask yourself here are:

What is the read vs. write ratio of the application?

What are the typical IO rates (IO per second, MB/s & size of the IOs)? Monitor the perfmon counters:

1.

Average read bytes/sec, average write bytes/sec

2.

Reads/sec, writes/sec

3.

Disk read bytes/sec, disk write bytes/sec

4.

Average disk sec/read, average disk sec/write

5.

Average disk queue length

How much IO is sequential in nature, and how much IO is random in nature? Is this primarily an OLTP application or a Relational Data Warehouse application?

To understand the core characteristics of SQL Server IO, refer to SQL Server 2000 I/O Basics.

2

More / faster spindles are better for performance

Ensure that you have an adequate number of spindles to support your IO requirements with an acceptable latency.

Use filegroups for administration requirements such as backup / restore, partial database availability, etc.

Use data files to “stripe” the database across your specific IO configuration (physical disks, LUNs, etc.).

3

Try not to “over” optimize the design of the storage; simpler designs generally offer good performance and more flexibility.

Unless you understand the application very well avoid trying to over optimize the IO by selectively placing objects on separate spindles.

Make sure to give thought to the growth strategy up front. As your data size grows, how will you manage growth of data files / LUNs / RAID groups? It is much better to design for this up front than to rebalance data files or LUN(s) later in a production deployment.

4

Validate configurations prior to deployment

Do basic throughput testing of the IO subsystem prior to deploying SQL Server. Make sure these tests are able to achieve your IO requirements with an acceptable latency. SQLIO is one such tool which can be used for this. A document is included with the tool with basics of testing an IO subsystem. Download the SQLIO Disk Subsystem Benchmark Tool.

Understand that the of purpose running the SQLIO tests is not to simulate SQL Server’s exact IO characteristics but rather to test maximum throughput achievable by the IO subsystem for common SQL Server IO types.

IOMETER can be used as an alternative to SQLIO.

5

Always place log files on RAID 1+0 (or RAID 1) disks. This provides:

better protection from hardware failure, and

better write performance.

Note: In general RAID 1+0 will provide better throughput for write-intensive applications. The amount of performance gained will vary based on the HW vendor’s RAID implementations. Most common alternative to RAID 1+0 is RAID 5. Generally, RAID 1+0 provides better write performance than any other RAID level providing data protection, including RAID 5.

6

Isolate log from data at the physical disk level

When this is not possible (e.g., consolidated SQL environments) consider I/O characteristics and group similar I/O characteristics (i.e. all logs) on common spindles.

Combining heterogeneous workloads (workloads with very different IO and latency characteristics) can have negative effects on overall performance (e.g., placing Exchange and SQL data on the same physical spindles).

7

Consider configuration of TEMPDB database

Make sure to move TEMPDB to adequate storage and pre-size after installing SQL Server.

Performance may benefit if TEMPDB is placed on RAID 1+0 (dependent on TEMPDB usage).

For the TEMPDB database, create 1 data file per CPU, as described in #8 below.

8

Lining up the number of data files with CPU’s has scalability advantages for allocation intensive workloads.

It is recommended to have .25 to 1 data files (per filegroup) for each CPU on the host server.

This is especially true for TEMPDB where the recommendation is 1 data file per CPU.

Dual core counts as 2 CPUs; logical procs (hyperthreading) do not.

9

Don’t overlook some of SQL Server basics

Data files should be of equal size – SQL Server uses a proportional fill algorithm that favors allocations in files with more free space.

Pre-size data and log files.

Do not rely on AUTOGROW, instead manage the growth of these files manually. You may leave AUTOGROW ON for safety reasons, but you should proactively manage the growth of the data files.

10

Don’t overlook storage configuration bases

Use up-to-date HBA drivers recommended by the storage vendor

Utilize storage vendor specific drivers from the HBA manufactures website

Tune HBA driver settings as needed for your IO volumes. In general driver specific settings should come from the storage vendor. However we have found that Queue Depth defaults are usually not deep enough to support SQL Server IO volumes.

Ensure that the storage array firmware is up to the latest recommended level.

Use multipath software to achieve balancing across HBA’s and LUN’s and ensure this is functioning properly

Simplifies configuration & offers advantages for availability

Microsoft Multipath I/O (MPIO): Vendors build Device Specific Modules (DSM) on top of Driver Development Kit provided by Microsoft.

이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/01/09 02:10 2009/01/09 02:10
, , ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/56

Trackback URL : http://John.tobe30.com/tc/trackback/56

Leave a comment
[로그인][오픈아이디란?]

원문 : http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/dw_perf_top10.mspx

Relational Data Warehouse or Reporting work loads are characterized by low volumes of very large transactions. These applications are often identified as having predominately read workloads (e.g. Decision Support, Analysis, and Reporting) with periodic feeds or batch loads. It is important to keep these characteristics in mind as we examine the significance of database design, resource utilization and system performance. The top performance bottlenecks or gotchas to avoid for Data Warehouse or Reporting applications are outlined below.

1

Database Design issue if….

Excessive sorting operations are performed. If you continually perform the same sorting operations over and over, you can avoid these with appropriate indexing.

Excessive RID lookups are performed on heap tables. RID lookups mean extra IOs are required to retrieve columns that are not in the index used. This can be avoided with covered nonclustered indexes.

Key lookups against the clustering keys look like joins however they are marked as “lookups” only in the XML showplan. These can be avoided with covered nonclustered indexes.

A potentially beneficial index is missing on join columns resulting in HASH joins. Indexes on join columns may avoid the hash.

2

CPU gotchas….

If signal waits > 25% of total waits, there is a CPU bottleneck. See sys.dm_os_wait_stats for Signal waits and Total waits. Signal waits measure the time spent in the runnable queue waiting for CPU. High signal waits indicate a CPU bottleneck.

Avoid inappropriate plan re-use. If the query is identical, then plan re-use is a good thing. However, query parameterization that allows plan re-use is only appropriate when the result set (and intermediate work tables) are of similar size to the original plan. If result set sizes vary significantly due to differing parameter values which are common in data warehouse scenarios, plan re-use can be detrimental. Bad plans can also lead to longer running queries and IO or memory pressure. Therefore, the cost of plan generation in such cases is preferable to plan re-use. Unlike OLTP, data warehouse queries are not always identical in terms of result sets or optimal query plans.

3

Memory bottleneck if….

Sudden big drop in page life expectancy. DW applications (e.g. big transactions) could experience big drops in page life expectancy. This is due to a cache flush from a big read. See Perfmon object SQL Server Buffer Manager.

Pending memory grants. See counter Memory Grants Pending, in the Perfmon object SQL Server Memory Manager. Large memory grants can be common in Data Warehouse applications. More memory may help, otherwise the user cannot execute until memory grant occurs.

Sudden drops or consistently low SQL Cache hit ratio. Drops or low cache hit may indicate memory pressure or missing indexes.

4

IO bottleneck if…

The best metric for write performance is disk seconds per read and disk seconds per write. When the IO system is NOT under significant load, there will be no disk queuing and thus disk seconds per read or write should be as good as it gets Normally it takes 4-8 milliseconds to complete a read when there is no IO pressure. Factors for IO throughput are the number of spindles, and drive throughput such as sequential and random IOs per second (according to the vendor). As the IO requests increase, you may notice disk queuing. The effects of queuing are reflected in high disk seconds per read or write. Periodic higher values for disk seconds/read may be acceptable for many applications. For high performance OLTP applications, sophisticated SAN subsystems provide greater IO scalability and resiliency in handling spikes of IO activity. Sustained high values for disk seconds/read (>15ms) does indicate a disk bottleneck.

High average disk seconds per write. See Perfmon Logical or Physical disk. Data Warehouse loads can be either logged with inserts, updates or deletes, or non-logged using bulk copy. Logged operations require transaction log writes. A transaction log write can be as fast as 1ms (or less) for high performance SAN environments. For many applications, a periodic spike in average disk seconds per write is acceptable considering the high cost of sophisticated SAN subsystems. However, sustained high values for average disk seconds/write is a reliable indicator of a disk bottleneck.

Big IOs such as table and range scans may be due to missing indexes.

5

Blocking bottleneck if….

Index contention. Look for high lock and latch waits in sys.dm_db_index_operational_stats. Compare with lock and latch requests.

High average row lock or latch waits. The average row lock or latch waits are computed by dividing lock and latch wait milliseconds (ms) by lock and latch waits. The average lock wait ms computed from sys.dm_db_index_operational_stats represents the average time for each block.

Block process report shows long blocks. See sp_configure “blocked process threshold” and Profiler “Blocked process Report” under the Errors and Warnings event.

High number of deadlocks. See Profiler “Graphical Deadlock” under Locks event to identify the statements involved in the deadlock.

6

Network bottleneck if….

High network latency coupled with an application that incurs many round trips to the database.

Network bandwidth is used up. See counters packets/sec and current bandwidth counters in the network interface object of Performance Monitor. For TCP/IP frames actual bandwidth is computed as packets/sec * 1500 * 8 /1000000 Mbps.

7

Wait statistics gotchas...

Since DataWarehouse and Reporting workloads are largely reads which are compatible with other reads, incompatible exclusive lock waits would ordinarily only come into play during batch loads or periodic feeds. If the top wait statistics are LCK_x. or PAGELATCH_EX, see “SQL Server 2005 Performance Tuning using Waits & Queues” for an explanation of sys.dm_os_wait_stats.

There is an IO bottleneck if top wait statistics in sys.dm_os_wait_stats are related to IO such as ASYNCH_IO_COMPLETION, IO_COMPLETION, LOGMGR, WRITELOG, or PAGEIOLATCH_x.

8

Indexing gotchas.

Large data warehouse can benefit from more indexes. Indexes can be used to cover queries and avoid sorting. For a data warehouse application, the cost of index overhead is only paid when data is loaded.

Check for missing indexes in sys.dm_db_missing_index_group_stats, sys.dm_db_missing_index_groups and sys.dm_db_missing_index_details

9

Watch out for fragmentation.

Excessive fragmentation is problematic for big IO operations. The Dynamic Management table valued function sys.dm_db_index_physical_stats returns the fragmentation percentage in the column avg_fragmentation_in_percent. Fragmentation should not exceed 25%. Reducing index fragmentation can benefit big range scans, common in data warehouse and Reporting scenarios

10

Consider Table Partitioning for fast loads

For the large tables common in Data Warehouses, table partitioning offers important performance and manageability advantages. For example, the fastest type of load is a non-logged bulk copy. The requirements for non-logged bulk copies are that indexes must be dropped. This is not feasible on a huge billion row table UNLESS you use table partitioning. This allows one to create a staging table identical to the large table (minus indexes). A fast non-logged bulk copy is used to load data. Thereafter, indexes are added to the staging table followed by constraints. Then, a meta-data only SWITCH IN operation switches pointer locations for the populated staging table and the empty target partition of the partitioned table resulting in an fully populated partition and empty staging table. Besides a fast bulk copy, the staging table allows us to eliminate blocking in the large partitioned table during the load. For more information refer to “Loading Bulk Data into Partitioned Tables”. In addition to fast loads, partitioned tables allow fast deletes (or archiving purposes or sliding window deletes) where large logged deletes are replaced with meta-data only partition SWITCH OUT operations that switches pointer locations for the full partition (to be ‘deleted’) and an empty monolithic table. The SWITCH OUT results in an empty partition and a fully populated monolithic staging table. Thereafter the monolithic table can either be dropped or added to a partitioned archive table using SWITCH IN. Partitions also provide manageability improvements when combined with specific filegroup placement, allowing for customized backup and restore strategies. 

이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/01/07 08:00 2009/01/07 08:00
, , ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/54

Trackback URL : http://John.tobe30.com/tc/trackback/54

Leave a comment
[로그인][오픈아이디란?]

SQL Server 관련 사이트


SQL Server Technet 
      Home : http://technet.microsoft.com/ko-kr/sqlserver/default.aspx
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2009/01/07 02:48 2009/01/07 02:48
,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/55

Trackback URL : http://John.tobe30.com/tc/trackback/55

Leave a comment
[로그인][오픈아이디란?]

SQL Server 2005 Service Pack 3



List of the bugs that are fixed in SQL Server 2005 Service Pack 3


This article contains information about the bugs that are fixed in Microsoft SQL Server 2005 Service Pack 3 (SP3).

Notes Other fixes that are not documented may be included in the service pack.
This list will be updated when more articles are released.
For more information about how to obtain SQL Server 2005 service packs, click the following article number to view the article in the Microsoft Knowledge Base:
913089 (http://support.microsoft.com/kb/913089/ ) How to obtain the latest service pack for SQL Server 2005
In addition to the fixes that are listed below, SQL Server 2005 SP3 contains the hotfixes that were included in cumulative update packages for SQL Server 2005 Service Pack 2 from cumulative update package 1 to cumulative update package 9.
For more information about the cumulative update packages for SQL Server 2005 Service Pack 2, click the following article number to view the article in the Microsoft Knowledge Base:
937137 (http://support.microsoft.com/kb/937137/ ) The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 2 was released
Note If you are upgrading from SQL Server 2005 SP2 Cumulative Update 10 or from SQL Server 2005 SP2 Cumulative Update 11, you must apply a post-SQL Server 2005 SP3 cumulative update after you upgrade to SQL Server 2005 SP3 to obtain all the fixes.
For more information about the post-SQL Server 2005 SP3 cumulative update, click the following article number to view the article in the Microsoft Knowledge Base:
959195 (http://support.microsoft.com/kb/959195/ ) Cumulative update package 1 for SQL Server 2005 Service Pack 3
Microsoft Knowledge Base articles that describe these hotfixes will be released as they become available.

For more information about the bugs that are fixed in SQL Server 2005 Service Pack 3, click the following article numbers to view the articles in the Microsoft Knowledge Base:
Collapse this tableExpand this table
KB article Title
956911 FIX: A time-out setting is not available for the Web Service task in a Microsoft SQL Server 2005 Integration Services (SSIS) package
958547 FIX: The values of the datetime column are not same for the rows that are copied when you copy data to a table by using the GETDATE() function in Microsoft SQL Server 2005
959000 FIX: When you validate a publication in a transactional replication, articles that you added after you added a vertical filter to an article are not validated in SQL Server 2005
959001 FIX: The Log Reader Agent skips some transactions when the Log Reader Agent runs to replicate transactions for a transactional replication in SQL Server 2005
959003 FIX: Only the first command in a transaction is replicated to the subscriber when you set the MaxCmdsInTran parameter of Log Reader Agent to 1 in SQL Server 2005
959004 FIX: When a process that is running on an instance of SQL Server 2005 consumes a large amount of memory, dump files are generated in the folder that contains the SQL Server error log
959006 FIX: Database mirroring sessions may stop intermittently in SQL Server 2005
959007 FIX: Error message when you use SQL Server Service Broker in SQL Server 2005: "Failed Virtual Allocate Bytes: FAIL_VIRTUAL_RESERVE 589824"
959008 FIX: Error message when you start database mirroring in SQL Server 2005 on a database that is restored or upgraded from SQL Server 2000: "The Service Broker ID for the remote copy of database "<DatabaseName>" does not match the ID on the principal server"
959009 FIX: Target endpoints in Service Broker of SQL Server 2005 leak in the valid message exchange pattern where the target sends only the end conversation message
959010 FIX: Error message when an application that uses Service Broker sends messages in SQL Server 2005: "The conversation endpoint is not in a valid state for SEND"
959012 FIX: When you shrink a database that has the SNAPSHOT transaction isolation level enabled in SQL Server 2005, the shrink operation is not completed successfully
959013 FIX: The synchronization process is slow, and the CPU usage is high on the computer that is configured as the Distributor in SQL Server 2005
959015 FIX: A conflict with the foreign key constraint occurs when you update the case of the column values in the primary key table or you pad column values in the primary key table in SQL Server 2005
959016 FIX: Rows that include a NULL column may not be deleted when you delete rows from a table by using "<ImageColumnName> is NULL" as the condition in the WHERE clause in SQL Server 2005
959017 FIX: You receive an incorrect result when you query a column of the varchar(max) data type that contains only one character from a table in SQL Server 2005
959018 FIX: You cannot find the SQL Server 2005 performance counters for the instance of Windows Internal Database
959019 FIX: You receive an incorrect result when you run a query that uses the LIKE operator in SQL Server 2005
959020 FIX: When you use a CASE function that returns constants of the binary data type, some constants are trimmed incorrectly even after you run the SET ANSI_PADDING ON statement in SQL Server 2005
959023 FIX: A blocking issue occurs when you run the Merge Agent in SQL Server 2005
959024 FIX: When the Merge Agent synchronizes multiple batches of changes, the synchronization may take a long time to finish or the synchronization may expire unexpectedly in SQL Server 2005
959025 FIX: Error message when you call a stored procedure that returns a rowset which have the DBPROP_MAXROWS rowset property or the SSPROP_MAXBLOBLENGTH rowset property specified: "The incoming tabular data stream (TDS) protocol stream is incorrect"
959026 FIX: Error message when you run a DB2 query that uses the WITH UR query hint in SQL Server 2005 Analysis Services: "OLE DB error: OLE DB or ODBC error: An unexpected token "WITH" was found following "<Query>""
959031 FIX: Error message when you try to expand the Catalogs node for a linked server that links to a Teradata Database in SQL Server 2005: "Cannot obtain the schema rowset DBSCHEMA_CATALOGS for OLE DB provider SQL Server for linked server (null)"
959376 FIX: Error message when you run the DBCC SHRINKFILE command or the DBCC SHRINKDATABASE command on a server that contains a SQL Server 2008 database: "5205 : DBCC SHRINKFILE: Moving Page <FileId>:<PageId> failed"
Resolutions to the following issues are also included in this cumulative update:
Collapse this tableExpand this table
FIX: A new trace event is logged by any command that aborts a transaction in SQL Server 2005 Analysis Services
FIX: An unexpected error is returned when an aggregation is referenced that has an attribute in a many-to-many dimension in SQL Server 2005 Analysis Services: "file ‘pffilestore.cpp’, line 3311, function ‘PFFileStore::HandleDataPageFault’"
FIX: Redundant indexes are created on datacache objects when the cost estimate indicates that indexes are not required in SQL Server 2005
FIX: The PeriodstoDate() function generates an unhandled exception at Time.All coordinates in SQL Server 2005
FIX: If you install SQL Server 2005 SP1 or SQL Server 2005 SP2 after you add a network card to the same computer, the installation adds a duplicate IP address in the SQL Server network configuration
FIX: In SQL Server 2005, the DTS designer application cannot be started on a Windows Vista-based computer or on a Windows Server 2008-based computer
FIX: You cannot set the breakpoint to the script of an SSIS script task when the current script is shorter than a script in another script task in the same package
FIX: A Transfer Objects task does not transfer assemblies to the destination database in SQL Server 2005
The design time experience of the TransferSQLServerObjects task is improved
FIX: The TransferSQLServerObjects task drops database users during the CopyAllOjbect operation in SQL Server 2005
FIX: The property setting of a TransferSqlServerObjects task cannot be correctly saved in SQL Server 2005
The connection handling with SAP Business Intelligence (BI) designer is improved to avoid "connection timed out" error messages
FIX: Error message when you use the new Essbase provider name: "OLAP error (1260046): Unknown Member PARENT_UNIQUE_NAME used in query"
FIX: Rendering a report is much longer in the SharePoint integrated mode than in the Native mode, especially when you put more than one report viewer Web part on a SharePoint Web page
FIX: A query that contains the "current of" statement receives incorrect results from a heap table because of an incorrect query plan in SQL Server 2005
FIX: When a single partition is rebuilt in SQL Server 2005, statistics are dropped together with the old version of the index
FIX: When a CHECKPOINT thread is blocked by another SPID, SQL Server 2005 does not update the sys.dm_exec_requests dynamic management view with the blocking information, and the blocking_session_id column remains NULL
FIX: You receive an incorrect value in the @@ROWCOUNT function if the query is recompiled
FIX: If the Parameterization Forced option is enabled on a database in SQL Server 2005, the unicode characters inside literal constants in some queries may be interpreted as non-unicode characters
The sp_altermessage stored procedure can now be used to enable or disable system messages to the Windows event log in SQL Server 2005
FIX: When a "non-yielding schedule condition" error (error 17883) occurs, the SQL Server service generates a dump file on the first occurrence
FIX: When multiple instances of the print control are started at the same time from the same Internet Explorer process, Internet Explorer may crash
For more information about SQL Server 2005 Service Pack 3-related issues, click the following article numbers to view the articles in the Microsoft Knowledge Base:
Collapse this tableExpand this table
KB article Title
931279 SQL Server timing values may be incorrect when you use utilities or technologies that change CPU frequencies
958999 Best practices for changing the service account for the report server in SQL Server 2005 Reporting Services
960320 Error message when you install SQL Server 2005 Service Pack 3 on Windows Vista: "Visual Studio 2005 has a know compatibility issue with this version of Windows"
959823 How to customize the quota for the TokenAndPermUserStore cache store in SQL Server 2005 Service Pack 3

APPLIES TO
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Workgroup Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Express Edition with Advanced Services
  • Microsoft SQL Server 2005 Analysis Services
  • Microsoft SQL Server 2005 Reporting Services
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 좐군

2008/12/28 23:10 2008/12/28 23:10
, ,
Response
No Trackback , No Comment
RSS :
http://John.tobe30.com/tc/rss/response/50

Trackback URL : http://John.tobe30.com/tc/trackback/50

Leave a comment
[로그인][오픈아이디란?]