2017. 2. 24. 14:24

MS-SQL 2016 New Features

 


 

1.    SQL Server 2016 (데이터베이스 엔진의 새로운 기능

-       Automatic Soft NUMA

n  SQL Server 2016에서는 한 NUMA 노드에 8개 이상의 processor가 있을 경우 자동으로 Soft-NUMA를 구성해 확장성을 높여줌

-       Dynamic Memory Object (CMemThread) Partitioning

n  CMemThread 병목 발생시 자동으로 per NUMA or per CPU Partitioning으로 변경해 CMemThread 대기 완화

-       Multiple Log Writers

n  인스턴스당 4개까지(one per H/W NUMA node) Log Writer thread 생성

-       Parallel Recovery

n  Database Recovery 단계 중 Redo에 대해 병렬 처리

-       SOS_RWLock

n  RWLock Internal Structure에 대한 일관성을 위해 사용되는 동기화 개체로 SQL Server 2014까지는 내부적으로 spinlock이 사용되었습니다.

n  SQL Server 2016에서는 불필요한 spinlock 대기를 없애도록 re-design되어 scalability를 높임

-       DBCC CHECK* 성능 향상

n  1TB 데이터베이스에 대한 내부 테스트 결과 7배 성능 향상



-       In-direct Checkpoint 기본

n  In-direct checkpoint SQL Server 2014에서 추가된 기능이며, SQL Server 2016에서는 Default 설정으로 적용됩니다.

-       Larger Data Writes

n  2016 이전은 한번에 최대 32 Data Pages (256KB) Write하였으며, SQL 2016에서는 최대 128 pages (1MB)로 대량 쓰기 성능 향상됨

(LazyWriter, Checkpoint, Bulk Insert 등에 사용)

 

-       OPTION (USE HINT('<hint1>', '<hint2>')) 같은 보다 일반적인 쿼리 힌트 모델에 대한 지원이 추가 ( SP1 , https://support.microsoft.com/ko-kr/help/3189813/update-introduces-use-hint-query-hint-argument-in-sql-server-2016)

n  use hint 모양이 추가됨보다 직관 적인 힌트 형태가 사용 되어짐.

SELECT * FROM Person.Address 

WHERE City = 'SEATTLE' AND PostalCode = 98104

OPTION (RECOMPILE, USE HINT ('ASSUME_MIN_SELECTIVITY_FOR_FILTER_ESTIMATES', 'DISABLE_PARAMETER_SNIFFING'));

GO 

-       sys.dm_exec_valid_use_hints DMV가 추가됨 – 모든 힌트 목록을 확인 할 수 있음

-       sys.dm_exec_query_statistics_xml DMV이 추가되어 실행 계획 XML 임시 통계 추가 :  기존에 query plan을 수집하기 위해 했던 작업이 간소화 해 짐.

-       estimated_read_row_count 열이 sys.dm_exec_query_profiles에 추가 (SQL2014에서도 있음 )

n  DMV를 사용하여 느리게 실행되는 쿼리 부분을 결정

n  타임스탬프 열을 사용하여 이 DMV를 다른 성능 카운터(성능 모니터, xperf)와 조인

-       UTF-8에 대한 지원

-       메모리 액세스에 최적화된 테이블에 대한 Transact-SQL 개선 사항

n  UNIQUE 제약 조건 및 인덱스가 지원됩니다.

n  메모리 액세스에 최적화된 테이블 간의 FOREIGN KEY 참조가 지원

n  비고유 인덱스에서 해당 키에 NULL 값을 허용할 수 있음

n  TRIGGER가 메모리 액세스에 최적화된 테이블에서 지원 ( insteadof 트리거는 지원되지 않음)

n  스키마 변경합니다(열 추가/삭제/변경제약 조건 추가/삭제).

-       프로시저 LOB를 허용

n  본 프로시저에서 문자열 함수(: LTrim 또는 Substring)에 전달된 매개 변수 가능

-       통계의 업데이트에 대해 선형 폭이 강조되는 임계값

n  대형 테이블에서 통계의 자동 업데이트가 한층 더 강화되었습니다(호환성 수준 130). 대형 테이블의 경우 SQL Server 2016부터 통계 자동 업데이트를 트리거하는 임계값이 20%가 되어 임계값이 테이블에서 행이 증가한 수만큼 줄어든 상태로 시작됩니다(백분율로 표시). 임계값을 줄이기 위해 2371 추적 플래그를 설정하지 않아도 됩니다.

n  대형 테이블일 경우 20% 가 크게 느껴질 수 있는데 조정 가능 해서 성능 향상에 도움이 됨.

-        Live Query Statistics

n  Management Studio는 활성 쿼리의 활성 실행 계획을 보는 기능을 제공합니다이 활성 쿼리 계획을 통해 제어권이 한 쿼리 계획 연산자에서 다른 연산자로 흘러갈 때 쿼리 실행 프로세스를 실시간으로 파악할 수 있습니다.

-        Monitoring Performance By Using the Query Store (https://msdn.microsoft.com/ko-kr/dn817826)

n  쿼리 저장소는 DBA에게 쿼리 계획 선택 및 성능에 대한 정보를 제공하는 새로운 기능입니다쿼리 계획 변경으로 인해 발생하는 성능 차이를 신속하게 찾을 수 있도록 하여 성능 문제 해결을 간소화합니다이 기능은 쿼리계획 및 런타임 통계의 기록을 자동으로 캡처하고 검토할 수 있도록 이 기록을 유지합니다. 

-      TempDB 데이터베이스

n  Tempdb에 대한 추적 플래그 1117  1118이 필요하지 않습니다. Tempdb 데이터베이스가 여러 개 있을 경우 모든 파일은 증가 설정에 따라 동시에 크기가 증가

n  기본적으로 설치 시 CPU 개수 또는 8개 중 적은 수만큼 tempdb 파일이 추가

n  Tempdb 데이터베이스 파일에 대해 여러 볼륨을 지정할 수 있습니다여러 디렉터리가 지정된 경우 tempdb 데이터 파일은 라운드 로빈 방식으로 여러 디렉터리에 분배됩니다.

-       기본 제공 JSON 지원

-       PolyBase 제공 - Hadoop 또는 Azure Blob Storage에 저장된 데이터에 액세스하고 임시 방식으로 데이터를 쿼리할 수 있습니다

-       Stretch Database -스트레치 데이터베이스는 기록 데이터를 Microsoft Azure 클라우드에 투명하고 안전하게 마이그레이션하는 SQL Server 2016의 새로운 기능입니다

-       이제 TRUNCATE TABLE 문은 지정된 파티션의 잘림을 허용합니다

-       Azure SQL 데이터베이스 복제가 지원됨

-      향상된 고가용성 기능 – Always ON

n  Always On 가용성 그룹은 Windows Server 2016에서 분산 트랜잭션 및 DTC를 지원

n  이제 데이터베이스가 오프라인으로 전환될 때 장애 조치(failover)하도록 Always On 가용성 그룹 을 구성할 수 있습니다.

n  이제 Always On은 암호화된 데이터베이스를 지원합니다

n  가용성 그룹의 동기화 처리량은 주 복제본에서 로그 블록의 병렬 및 빠른 압축최적화된 동기화 프로토콜보조 복제본에서 로그 레코드 다시 실행 및 병렬 압축 풀기를 통해 10배까지 증가되었습니다따라서 읽기 가능한 보조 복제본의 새로 고침이 증가되고 장애 조치(failover) 시 데이터베이스 복구 시간이 줄어듭니다. 

'ETC' 카테고리의 다른 글

SQL Server 2012 Certification upgrade info  (0) 2015.05.20
메모리 dump 분석 예 ( 정확하지 않음 )  (0) 2014.11.06
Windbg 명령어 & 설치  (0) 2014.11.06
Window 서비스 등록/삭제 방법  (0) 2011.10.20
2015. 5. 20. 13:03

SQL Server 2012 Certification upgrade info



1.     SQL 2008이 있는 경우  - 아래 두개의 시험을 봐야 MCSA가 됩니다Admin 기준


70-457: Transition Your MCTS on SQL Server 2008 to MCSA: SQL Server 2012, Part 1

70-458: Transition Your MCTS on SQL Server 2008 to MCSA: SQL Server 2012, Part 2                                                    


MCSE: Data Platform involves

·   A pass in Microsoft Certified IT Professional (MCITP) Database Administrator 2008 or Database Developer 2008 (70-450 or 70-451)

    • Exam 70-457: Transition your MCTS on SQL Server 2008 to MCSA: SQL Server 2012 – Part 1
    • Exam 70-458: Transition your MCTS on SQL Server 2008 to MCSA: SQL Server 2012 – Part 2
    • Exam 70-459: Transition your MCITP: Database Administrator 2008 or MCITP: Database Developer 2008 to MCSE:Data Platform

MCSE: Business Intelligence involves

A pass in Microsoft Certified IT Professional (MCITP) Business Intelligence 2008 (70-452)

·         Exam 70-457: Transition your MCTS on SQL Server 2008 to MCSA: SQL Server 2012 – Part 1

·         Exam 70-458: Transition your MCTS on SQL Server 2008 to MCSA: SQL Server 2012 – Part 2

·         Exam 70-460: Transition your MCITP: Business Intelligence Developer 2008 to MCSE: Business Intelligence 



2.     처음 부터 SQL 2012를 취득 하고 자 한다면 



'ETC' 카테고리의 다른 글

MS-SQL 2016 New Features  (0) 2017.02.24
메모리 dump 분석 예 ( 정확하지 않음 )  (0) 2014.11.06
Windbg 명령어 & 설치  (0) 2014.11.06
Window 서비스 등록/삭제 방법  (0) 2011.10.20
2014. 11. 6. 14:30

메모리 dump 분석 예 ( 정확하지 않음 )

1.  메모리 덤프를 crash dump 파일 방식으로 실행 합니다.

2.  명령 창에 관련 symbols 파일을 받습니다.  ( 파일 열어 보면 명령창 입력 하는 부분이 있습니다. )

sympath srv*C:\PublicSymbols*http://msdl.microsoft.com/download/symbols;  <- C 밑에 받게 설정.

3.  Symbols 파일을 내려 받습니다.

.reload /f sqlservr.exe  ß--  sql 지정해 주지 않으면 모든 실행파일에 대한 받습니다 오래 걸립니다.   허나 컴이 2012 설치되어 있어서 서버 버전과 같은 sql 있어야 같은 느낌 입니다.

4.  문제되는 스래드 파악 봅니다. ^^

~~[스래드번호]s  

아래 노란색이 스래드 번호 입니다.

 

2014-10-31 07:07:06.960 서버           Process 0:0:0 (0x3318) Worker 0x000000002A7EA1A0 appears to be non-yielding on Scheduler 22. Thread creation time: 13059177216471. Approx Thread CPU Used: kernel 0 ms, user 70543 ms. Process Utilization 30%. System Idle 68%.

5.     자세한 내역을 봅니다

kL100

 

15번 파일을 그런 단계로 본 내역입니다.  Call site 값으로 세부적으로 뭔가 봐야 하는데 그 다음 명령을 모르겠습니다.

 




 

6.     참고로

.cxr sqlservr!CXStmtQuery::ErsqExecuteQuery+0x602    이 노란색이 call site 값인 것 같은데요..

 

7.     아래 부분 처럼

du 0x00000101`c21ae200 L100    이게 쿼리 내역을 보는 법인 것 같습니다.  RetAddr 값 일까요???  ㅋㅋ.

 

답변 받은 분도 명령창 번호가 같은걸로 봐서는  15번 덤프 파일을 가지고 분석 했습니다

 

참고로 ) 여러가지 원인이 있다는 Non-yielding Scheduler  dump 내역 입니다.

http://technet.microsoft.com/en-us/library/cc917684.aspx#XSLTsection129121120120

 


 

'ETC' 카테고리의 다른 글

MS-SQL 2016 New Features  (0) 2017.02.24
SQL Server 2012 Certification upgrade info  (0) 2015.05.20
Windbg 명령어 & 설치  (0) 2014.11.06
Window 서비스 등록/삭제 방법  (0) 2011.10.20
2014. 11. 6. 14:28

Windbg 명령어 & 설치


* WinDbg 설치 방법 

OS 버전에 맞는 파일을 받아 설치 합니다. 재부팅이 필요 하네요.




WinDbg 명령어

                                                                                                                                                                                                                                                              출처         

Command

option

usage

Desc

종료

q



디버깅 종료

qd



디버깅 종료;연결해제

디버깅 환경정보

vertarget



타겟 컴퓨터 정보 표시

version



디버그 환경 정보 표시

.lastevent



마지막 디버그 이벤트 정보 표시

||



디버깅 세션 정보 표시

sumble & sorurce

.symfix



MS 심볼경로 설정

.sympath



심볼경로 확인/설정

.sym noisy



심볼파일 검색 과정을 출력

.srcpath



소스경로 설정

.srcnoisy


.srcnoisy 1

소스경로 검색 과정을 출력

모듈

lm


l

로드된 모듈만 표시



m [pattern]

패턴과 일치되는 모듈만 표시



v

모듈 상세정보 표시

!lmi

!lmi ntdll.dll


모듈 상세정보 표시

.reload


/f [m_name]

심볼을 즉시 로드

x

X ntdll!*

X *!*abc*

/v

/t

/n

심볼 타입을 표시.

데이터 타입을 표시

이름순으로 정렬

ln


ln [address]

해당 주소에 근접한 심볼의 정보 표시

레지스터

r



레지스터 정보 표시

r $proc



현재 프로세스의 PEB주소( user-mode)

현재 프로세스의 EPROcESS주소( kernel-mode)

r $thread



현재 스레드의 TEB주소( user-mode)

현재 스레드의 ETHREAD주소( kernel-mode)

r $tpid



현재 프로세스ID(PID)

r $tid



현재 스레드ID(TID)

언어셈블

u


f

b

언어셈블

언어셈블(함수전체)

언어셈블(ip이전의8개 명령어)

콜스택

k


[n]

p

b

n

v

f

콜스택 정보표시

함수정보 출력

인자표시

프레임번호

FPO정보 표시

스택 사용량 표시

break point

bp

bp 0x123456


bp 설정

bl



bp 리스트 출력

bc

bc * | [frame_no]


bp 삭제

bd,be

bc * | [frame_no]


bp disable/enable

bm

bm notepad!*Win*


패턴과 일치하는 모든심볼에 bp설정

bu

bu aaa!bbb


로드되지 않은 심볼에 대한 bp설정

ba



특정 주소에 access bp

지역변수

dv

dv modulr!test*

/i

/V

심볼유형과 인자유형 표시

변수저장 위치 표시( register or address )

데이터유형

dt

df _EPROCESS 0xaddr


주소를 특정 데이터 형으로 변환해서 표시

du



Unicode string 표시

da



Ansi string 표시

dc




db




dy








!address

!address

!address [address]



프로세스 & 스레드 정보

!peb



PEB(Process Environment Block)표시

!teb



TEB(Thread Environment Block) 표시





!gle



API의 마지막 에러코드 표시

실행 제어

t



Trace

~.t



다른 스레드를 중지시킨 상태에서 하나의statementt 실행

g




p



Step Over

gu

gu

~0 gu


현재함수가 복귀할 때 까지 실행

스레드 0을 제외한 모든 스레드를freeze

wt



내부에서 호출된 함수와 함수호출 횟수등의 정보 표시

.cxr



컨텍스트 변경

!ready




.thread




!thread




.trap




.process




!process




ed




eb

eb .-6 90 90 90 90 90 90


6byteNOP(0x90)으로 변경

!error

!error [error code]


에러코드 정보표시


'ETC' 카테고리의 다른 글

SQL Server 2012 Certification upgrade info  (0) 2015.05.20
메모리 dump 분석 예 ( 정확하지 않음 )  (0) 2014.11.06
Window 서비스 등록/삭제 방법  (0) 2011.10.20
Admin::Superdome VS DL580 G7  (0) 2011.01.10
2011. 10. 20. 09:30

Window 서비스 등록/삭제 방법


윈도위 서비스 등록 삭제 방법.

1. 서비스 등록

명령창에서 실행 합니다..  (cmd , 시작->실행->cmd 입력)

sc create “New Service” binPath= “C:\TestFolder\TestApp.exe”

New Server = 서비스 이름

2. 서비스 삭제

sc delete “New Service”

'ETC' 카테고리의 다른 글

메모리 dump 분석 예 ( 정확하지 않음 )  (0) 2014.11.06
Windbg 명령어 & 설치  (0) 2014.11.06
Admin::Superdome VS DL580 G7  (0) 2011.01.10
믹시 가입  (0) 2010.10.13
2011. 1. 10. 13:44

Admin::Superdome VS DL580 G7


Superdome VS DL580 G7 간단 비교 자료입니다.

 

하드웨어 사양비교

Model

HP Proliant DL580 G7 Serise

HP SUPERDOME SD32B

Comment

CPU

Intel Xeon 7560  4CPU * 8Core

Itanium2 1.60GHz 32CPU * 2Core

 

Memory

256GB

512GB

 

CPU 출시년도

2010

2005

 

SQL Price

1 2?

4 5 ?

정확하지 않음

H/W Price

4?

5?

정확하지 않음

TPC-C 테스트 결과로 보는 성능비교 (참고사이트 http://www.tpc.org)

Tpmc(transactions per minute) 순위에서 있듯이 DL580 Superdome보다 등급 위에 있는 것은 사실인 합니다.

             Price/tpmC( 가격대비성능)DL580 G7 10배정도 좋네요

 

'ETC' 카테고리의 다른 글

Windbg 명령어 & 설치  (0) 2014.11.06
Window 서비스 등록/삭제 방법  (0) 2011.10.20
믹시 가입  (0) 2010.10.13
네할렘 아키텍쳐  (0) 2010.06.10
2010. 10. 13. 00:04

믹시 가입

ar8k6rNEr12FjiHOzyFXWovEUugsAIUaPEqbaiKf7TY,
2010. 6. 10. 00:40

네할렘 아키텍쳐

http://ko.wikipedia.org/wiki/%EB%84%A4%ED%95%A0%EB%A0%98_%EB%A7%88%EC%9D%B4%ED%81%AC%EB%A1%9C%EC%95%84%ED%82%A4%ED%85%8D%EC%B2%98

http://brown.ezphp.net/58


피망(게임) 서비스에 네할렘 서버를 적용해 본 결과, 초당 쿼리가 2750개를 처리해 기존(하퍼타운)보다 2배의 성능 향상을 보였습니다. 이는 서버를 절반 이상 감축할 수 있음을 의미합니다."

'ETC' 카테고리의 다른 글

Admin::Superdome VS DL580 G7  (0) 2011.01.10
믹시 가입  (0) 2010.10.13
최상위 코어 i7 프로세서를 낳은 인텔 네할렘 아키텍처  (0) 2010.06.10
유틸::엑셀이용 데이터 입력  (1) 2010.06.03
2010. 6. 10. 00:34

최상위 코어 i7 프로세서를 낳은 인텔 네할렘 아키텍처

'ETC' 카테고리의 다른 글

믹시 가입  (0) 2010.10.13
네할렘 아키텍쳐  (0) 2010.06.10
유틸::엑셀이용 데이터 입력  (1) 2010.06.03
Active Directory Management  (0) 2009.09.16
2010. 6. 3. 23:52

유틸::엑셀이용 데이터 입력

 Inserting, Updating or Deleting Data in SQL Server from an Excel Spreadsheet

Problem
I have seen your previous tips (Export data from SQL Server to Excel and Different Options for Importing Data into SQL Server) related to working with Excel and SQL Server data.  The main command used in one of the tips is OPENROWSET.  This has been beneficial for us because in our environment because our business users provide data to us in the form of Excel spreadsheets.  Many of the situations end up translating to INSERT, UPDATE or DELETE code in one or more of our SQL Server databases.  We always upload the data to a table and then begin the process.  Although this process works are you familiar with any other options to directly perform the INSERT, UPDATE or DELETE operations?  Are their any benefits to transitioning our code to another approach with the OPENROWSET command?

Solution
Yes - You are correct the OPENROWSET command can directly support INSERT, UPDATE or DELETE operations as shown in these tips: Export data from SQL Server to Excel and Different Options for Importing Data into SQL Server.  In addition, the OPENROWSET command can also support SELECT statements where a table is joined to the Excel spreadsheet.  Let's work through some examples with the SQL Server 2005 AdventureWorks sample database for each operation with a sample Excel spreadsheet.

Prerequisites

For all of these examples, please do the following:

  • Download this Excel (Office 2003) spreadsheet to perform the operations.
  • In order to follow the examples, be sure to save the Excel spreadsheet into a directory called C:\MSSQLTips\.
  • Review each of the worksheets in the Excel file to see the different data.
  • Be sure to close the Excel spreadsheet before running any of the code.
  • Review each of the commands below before executing them in your environment.

OPENROWSET Examples

Below are four examples to show some of the flexibility with the OPENROWSET command:

SELECT with a JOIN and ORDER BY Clause

Code Explanation - With the query below, 5 records should be returned to show a simple INNER JOIN statement can return a single result set from both data in the table ([Sales].[SalesPerson]) and Excel spreadsheet.
SELECT SP.[SalesPersonID]
,SP.[TerritoryID]
,SP.[SalesQuota]
,SP.[Bonus]
,SP.
[CommissionPct]
,SP.[SalesYTD]
,SP.[SalesLastYear]
,SP.[rowguid]
,SP.[ModifiedDate]
,T.[SalesPersonID]
,T.[TerritoryID]

FROM [AdventureWorks].[Sales].[SalesPerson] SP
INNER JOIN OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\MSSQLTips\1540_OPENROWSET_Examples.xls;',
'SELECT SalesPersonID, TerritoryID FROM [SELECT_Example$]') T
ON SP.[SalesPersonID] = T.[SalesPersonID]
AND SP.[TerritoryID] = T.[TerritoryID]
ORDER BY SP.[SalesPersonID], SP.[TerritoryID]
GO 

INSERT with a SELECT Statement

Code Explanation - With the first block of code, five records are inserted into the [AdventureWorks].[Sales].[SalesPerson] table by reading the data from the INSERT_Example worksheet of the Excel spreadsheet.  In the second query, the data inserted is verified.
INSERT INTO [AdventureWorks].[Sales].[SalesPerson](SalesPersonID, TerritoryID, SalesQuota, Bonus, CommissionPct, SalesYTD, SalesLastYear, rowguid, ModifiedDate)
SELECT SalesPersonID
,TerritoryID
,SalesQuota
,Bonus
,CommissionPct
,SalesYTD
,SalesLastYear
,NEWID()
,GETDATE()
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\MSSQLTips\1540_OPENROWSET_Examples.xls;',
'SELECT SalesPersonID, TerritoryID, SalesQuota, Bonus,
CommissionPct, SalesYTD, SalesLastYear
FROM [INSERT_Example$]'
)
GO

SELECT *
FROM [AdventureWorks].[Sales].[SalesPerson]
WHERE SalesPersonID IN (1, 2, 3, 4, 5)
GO
 

UPDATE with a JOIN Statement

Code Explanation - With the first block of code, five records are updated in the [AdventureWorks].[Sales].[SalesPerson] table by reading the data from the UPDATE_Example worksheet of the Excel spreadsheet.  In the second query, the data updated is verified.
UPDATE SP
SET SP.Bonus = T.Bonus
FROM [AdventureWorks].[Sales].[SalesPerson] SP
INNER JOIN OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\MSSQLTips\1540_OPENROWSET_Examples.xls;',
'SELECT SalesPersonID, TerritoryID, SalesQuota, Bonus
FROM [UPDATE_Example$]'
) T
ON SP.SalesPersonID = T.SalesPersonID
AND SP.TerritoryID = T.TerritoryID
AND SP.SalesQuota = T.SalesQuota
GO

SELECT *
FROM [AdventureWorks].[Sales].[SalesPerson]
WHERE SalesPersonID IN (1, 2, 3, 4, 5)
GO
 

DELETE with a JOIN Statement

Code Explanation - With the first block of code, five records are deleted in the [AdventureWorks].[Sales].[SalesPerson] table by reading the data from the DELETE_Example worksheet of the Excel spreadsheet.  In the second query, the data deleted is verified.
DELETE SP
FROM [AdventureWorks].[Sales].[SalesPerson] SP
INNER JOIN OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\MSSQLTips\1540_OPENROWSET_Examples.xls;',
'SELECT SalesPersonID, TerritoryID, SalesQuota, Bonus
FROM [UPDATE_Example$]'
) T
ON SP.SalesPersonID = T.SalesPersonID
AND SP.TerritoryID = T.TerritoryID
GO

SELECT *
FROM [AdventureWorks].[Sales].[SalesPerson]
WHERE SalesPersonID IN (1, 2, 3, 4, 5)
GO
 

General Analysis

In terms of transitioning your code to the new approach, I have yet to experience any performance issues with 1000's of records, but that seems to be the first concern.  If you test the approach and the overall performance is not an issue, then consider the approach.  It also may be faster to perform a single UPDATE as is the case with the example above versus uploading (INSERT...SELECT) the data and then performing an UPDATE based on the new table.  In addition, by using the commands listed above versus a two step process the overall code may be a little bit cleaner.  A second consideration with SQL Server 2005 is that the Surface Area Configuration setting must be enabled to use this code in either case.  Finally, with either approach be sure to clean up any Excel spreadsheets or temporary tables once you are finished with them.

 

이 글은 스프링노트에서 작성되었습니다.

'ETC' 카테고리의 다른 글

네할렘 아키텍쳐  (0) 2010.06.10
최상위 코어 i7 프로세서를 낳은 인텔 네할렘 아키텍처  (0) 2010.06.10
Active Directory Management  (0) 2009.09.16
Windows용 Dr. Watson  (0) 2009.09.14
2009. 9. 16. 10:28

Active Directory Management

2009. 9. 14. 10:25

Windows용 Dr. Watson

윈도우용 디버깅을 사용하면 문제시 dump를 볼 수 있는데..

비주얼 스튜디오 설치과정중에 응용 프로그램 디버거로 Visual Studio JIT 디버거가 변경되기 때문에

사용할 수 없게 된다.

 

 

Dr. Watson을 사용할 수 없도록 설정하는 방법

  1. 시작, 실행을 차례로 누르고 열기 상자에 regedit.exe를 입력한 다음 확인을 누릅니다.
  2. 다음 레지스트리 키를 찾아 누릅니다.
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug
    참고: 3단계와 4단계는 선택 사항이지만 Dr. Watson의 기본 사용을 복구하려는 경우 필요합니다.
  3. AeDebug 키를 누른 다음 레지스트리 메뉴의 레지스트리 파일 내보내기를 누릅니다.
  4. 저장할 레지스트리 파일의 이름과 위치를 입력한 다음 저장을 누릅니다.
  5. AeDebug 키를 삭제합니다.

디버거 프로그램의 레지스트리 항목은 Windows의 AeDebug 키에 있습니다. Dr. Watson 프로그램은 기본적으로 Windows에 설치되어 있고 응용 프로그램 오류가 발생할 때 실행되도록 구성되어 있습니다(Auto 값에 데이터 값 1로 설정). 기본값은 다음과 같습니다.

값 이름 = Auto
종류 = 문자열(REG_SZ)
데이터 값 = 1 또는 0(기본값은 1)

값 이름 = Debugger
종류 = 문자열(REG_SZ)
데이터 값 = drwtsn32 -p %ld -e %ld -g

참고: 이 데이터 값(drwtsn32 -p %ld -e %ld -g)은 Dr. Watson에만 적용되고 다른 디버거에는 고유한 값과 매개 변수가 있습니다.

Dr. Watson을 사용할 수 있도록 설정하는 방법

  1. 명령 프롬프트에서 다음 명령줄을 입력한 다음 Enter 키를 누릅니다.

    drwtsn32 -i
  2. 위의 3단계와 4단계에서 만든 .reg 파일을 두 번 누릅니다.

비스타의 경우는 Dr.Watson이 없다. 도움말 찾아보니 다음과 같은 말이..

제어하고 싶다면 XP에서 복사해서 사용하면 된다.

시스템 오류 또는 "크래시" 분석 도구인 Dr. Watson이 이 Windows 버전에서 문제 보고서 및 솔루션으로 바뀌었습니다.

2009. 7. 9. 18:27

Trouble Shooting Query Performance Issues Related to Plan Cache in SQL 2005 RTM and SP1

http://blogs.msdn.com/sqlprogrammability/archive/2007/01/20/trouble-shooting-query-performance-issues-related-to-plan-cache-in-sql-2005-rtm-and-sp1.aspx

 

 

SQL  SP3  CU4 부터 2005 X64 스탠다드 에디션에서 Lock Page in Memory 기능을 사용할 수 있게 되었음.

'ETC' 카테고리의 다른 글

최상위 코어 i7 프로세서를 낳은 인텔 네할렘 아키텍처  (0) 2010.06.10
유틸::엑셀이용 데이터 입력  (1) 2010.06.03
Active Directory Management  (0) 2009.09.16
Windows용 Dr. Watson  (0) 2009.09.14