블로그 이미지
LifeisSimple

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

2012. 2. 5. 23:13 Brain Trainning/DataBase

Trace Flag 관련해서 잘 정리해 놓으신것 같습니다.  (시퀄 메거진을 보면 가끔씩 이분의 글들이 보이죠... )

출처 : 
http://sqlserverpedia.com/wiki/Trace_Flags 

Kevin Kline

Kevin Kline

Kevin Kline is the Technical Strategy Manager for SQL Server Solutions at Quest Software, a leading provider of award winning tools for database management and application monitoring. He is a founding board member and former President of the international Professional Association for SQL Server (PASS) and frequently contributes to database technology magazines, web sites, and discussion forums. Kevin also serves the community as an adviser to SQL Saturday education program as well as a curriculum adviser for both the University of Washington and Purdue University at Calumet in their IT and Computer Science departments.

Kevin’s most popular book is SQL in a Nutshell (now in its third edition) published by O’Reilly Media. Kevin is also author or co-author on seven other IT books, including Transact-SQL Programming, Database Benchmarking: A Practical Approach, and Professional SQL Server 2008 Relational Database Design and Optimization.

A top rated speaker, He appears at international conferences like Microsoft TechEd, DevTeach, PASS, Microsoft IT Forum, SQL Connections, and the Best Practices Conference.

Beginning his career as a lowly hardware jockey working with PC’s, Digital VAX, and Intergraph Unix workstations, Kevin has worked on multiple large-scale database projects throughout his career at Deloitte & Touche, NASA and the U.S. Army.

When Kevin isn’t working on technology issues, he enjoys spending time with his wife Rachel, his four kids, his three step kids, and his Basset Hound and Ginger Kitty.

His online presences include:

Trace flags can be used to alter SQL Server behavior temporarily. Trace flags can be turned on for a specific connection, or server-wide. Trace flags can be a great tool for troubleshooting a particular issue, however be forewarned: some trace flags are dangerous - use them at your own risk and be prepared to rebuild the server from scratch. Furthermore, functionality of certain trace flags might not be supported in future versions of SQL Server, so definitely avoid setting trace flags in your T-SQL code. We strongly recommend against using undocumented trace flags on production systems unless you're directed to do so by Microsoft's technical support. 

To turn on a particular trace flag for a given connection, you execute the DBCC TRACEON command with the trace flag number specified in parenthesis, as follows:
1./* send the output of DBCC commands to the client */  DBCC TRACEON (3604)


To enable a trace flag on the SQL Server instance level you need to start SQL Server with the /T parameter followed by the trace flag number. If you start SQL Server with a trace flag, all connections will automatically have the same trace flag turned on. For example, to collect deadlock related information you could start the default instance of the SQL Server instance from the command prompt as follows:
1.NET START MSSQLSERVER /T1205


You can check the status of a particular trace flag by executing DBCC TRACESTATUS. Turn off a previously turned on trace flag using DBCC TRACEOFF. For example:
1.DBCC TRACESTATUS(3604)  DBCC TRACEOFF(3604)


You can check all trace flags turned on for the current connection by passing -1 as the parameter of DBCC TRACESTATUS, for example:
1.DBCC TRACESTATUS(-1)


Results:
1.TraceFlag  Status   ---------  ------   2520       1  3604       1


If you have no trace flags turned on, SQL Server will return the following message:
1.Trace option(s) not enabled for this connectionUse 'DBCC TRACEON()'.


Next, we discuss some of the more frequently used trace flags. As mentioned above, some of these can be very powerful and therefore should be handled with care.

Contents

[hide]

DBCC TRACEON / TRACEOFF (-1)



This flag advises SQL Server to turn on the trace flags turned on for the current connection on all subsequent client connections. For example, if you have turned on 3604 and 2520 on the current connection and you execute DBCC TRACEON(-1) all subsequent connections to the server will have 3604 and 2520 turned on. Similarly, if you wish to turn a particular trace flag for all connections simply execute it along with -1, as in DBCC TRACEON(-1, 3604). Executing DBCC TRACEOFF(-1) will automatically turn off all trace flags on the current and any subsequent connections.

DBCC TRACEON (2528)



This flag disables parallelism during executing of maintenance DBCC statements, such as DBCC CHECKDB, DBCC CHECKFILEGROUP and DBCC CHECKTABLE. By default SQL Server will determine the needed degree of parallelism during query execution. Usually it is recommended to let SQL Server decide whether parallelism will be useful. Occasionally, if you only wish to use a single processor for DBCC statements, you might wish to override the default behavior. Remember that turning off parallelism might increase the total time required for executing DBCC commands.

DBCC TRACEON(3604) and DBCC TRACEON(3605)



The first flag (3604) sends the output of (some) DBCC commands and trace flags to the Query Analyzer; 3605 sends the same output to SQL Server error log. For example, the following commands will generate a list of the 10 longest buffer chains in Query Analyzer:
1.DBCC TRACEON(3604)  DBCC BUFCOUNT


Results:
1.**** THE 10 LONGEST BUFFER CHAINS ****       bucket number = 514     chain size = 3     bucket number = 522     chain size = 2     bucket number = 770     chain size = 2     bucket number = 1026    chain size = 2     bucket number = 269     chain size = 1     bucket number = 272     chain size = 1     bucket number = 274     chain size = 1     bucket number = 281     chain size = 1     bucket number = 283     chain size = 1     bucket number = 284     chain size = 1    The Smallest Chain Size is: 0    The Average Chain Size is: 0.005066


If you turn off 3604 and turn on 3605, instead you'll get the same result in the error log. You can double check this by executing the following:
1.EXEC master..xp_readerrorlog


Abbreviated results:
1.ERRORLOG                                                                        ContinuationRow  2003-10-24 21:00:31.51 spid51       bucket number = 514       chain size= 3    0  2003-10-24 21:00:31.51 spid51       bucket number = 522       chain size = 2    0  2003-10-24 21:00:31.51 spid51       bucket number = 770       chain size = 2    0  2003-10-24 21:00:31.51 spid51       bucket number = 1026      chain size = 2    0  2003-10-24 21:00:31.51 spid51       bucket number = 269       chain size = 1    0  2003-10-24 21:00:31.51 spid51       bucket number = 272       chain size = 1    0  2003-10-24 21:00:31.51 spid51       bucket number = 274       chain size = 1    0  2003-10-24 21:00:31.51 spid51       bucket number = 281       chain size = 1    0  2003-10-24 21:00:31.51 spid51       bucket number = 283       chain size = 1    0  2003-10-24 21:00:31.51 spid51       bucket number = 284       chain size = 1    0  2003-10-24 21:00:31.51 spid51      The Smallest Chain Size is: 0                0  2003-10-24 21:00:31.51 spid51      The Average Chain Size is: 0.005066          0


DBCC TRACEON(1204) , DBCC TRACEON(1205) and DBCC TRACEON(1206)



These trace flags are used to troubleshoot deadlocks. 1204 returns deadlock chains and the victim SPID. 1205 returns the details of the commands (stack traces) involved in the deadlock. Along with these flags you should also turn on 3605 to send the output of the trace to the SQL Server error log. 1206 can be used to supplement the information collected by the other two trace flags by returning all lock activities performed by deadlocked connections. The output of 1206 can be very large. 

If you wish to see what deadlock output looks like, simply open two connections to the same SQL Server instance through Query Analyzer and execute following on one of them:
1.DBCC TRACEON(-1, 1204)  DBCC TRACEON(-1, 1205)  DBCC TRACEON(-1, 3605)


Next execute the following on the first connection:
1.USE pubs  BEGIN TRAN  UPDATE titles   SET title = 'deadlock battle'    WAITFOR DELAY'00:00:05'    UPDATE authors   SET address = '110 north main'


At the same time execute the following script from the other connection:
1.USE pubs  BEGIN TRANSACTION  UPDATE authors   SET address = '115 East 43rd street'   UPDATE titles   SET title = 'who can win?'


One of these connections will be chosen as a deadlock victim and its transaction will be aborted by SQL Server. Now if you read the error log, you will find entries similar to the following:
1.spid4     ----------------------------------      spid4     Starting deadlock search 1     spid4     Target Resource Owner:       spid4      ResType:LockOwner Stype:'OR' Mode: U SPID:53 ECID:  Ec:( x195 756 )               Value: x1916eb4     spid4      Node:1  ResType:LockOwner Stype:'OR' Mode: U SPID:53 ECID:  Ec:( x195 756 )               Value: x1916eb4     spid4     spid4     End deadlock search 1 ... a deadlock was not found.      spid4     ----------------------------------      spid4    ----------------------------------    spid4     Starting deadlock search 2      spid4     Target Resource Owner:      spid4      ResType:LockOwner Stype:'OR' Mode: U SPID:52 ECID:  Ec:( x1947756 )                Value: x1916e72     spid4      Node:1  ResType:LockOwner Stype:'OR' Mode: U SPID:52 ECID:  Ec:( x1947756 )                Value: x1916e72     spid4      Node:2  ResType:LockOwner Stype:'OR' Mode: U SPID:53 ECID:  Ec:(x195 756 )                Value: x1916eb4     spid4      Cycle:  ResType:LockOwner Stype:'OR' Mode: U SPID:52 ECID:  Ec:( x1947756 )                Value: x1916e72      spid4       spid4       spid4     <b>Deadlock cycle was encountered .... verifyingcycle</b>     spid4      Node:1  ResType:LockOwner Stype:'OR' Mode: U SPID:52 ECID:  Ec:(x1947756 )                Value: x1916e72  Cost:( /16  )    spid4      Node:2  ResType:LockOwner Stype:'OR' Mode: U SPID:53 ECID:  Ec:( x195 756 )                Value: x1916eb4  Cost:( /B88)     spid4      Cycle:  ResType:LockOwner Stype:'OR' Mode: U SPID:52 ECID:  Ec:( x1947756 )                Value: x1916e72  Cost:( /16  )    spid4     spid4   <b>Deadlock encountered .... Printing deadlock information</b>     spid4     spid4     Wait-for graph     spid4     spid4     Node:1    spid4     KEY: 5:1977 58 79:1 ( 1 1aedb232b) CleanCnt:1 Mode: X Flags:  x    spid4      Grant List::    spid4        Owner: x1916ee2  Mode: X        Flg: x  Ref:  Life: 2       SPID:53 ECID:    spid4        SPID: 53 ECID:   Statement Type: UPDATE Line #: 1    spid4        Input Buf:Language Event: <b>begin tran   update authors set address = '115 East 43rd street '  update titles set title = 'who can win?'</b>     spid4      Requested By:     spid4        ResType:LockOwner Stype:'OR' Mode: U SPID:52 ECID:  Ec:( x1947756)                  Value: x1916e72  Cost:( /16  )    spid4       spid4     Node:2     spid4     KEY: 5:2121 58592:1 (a7  64fb1eac) CleanCnt:1 Mode: X Flags:  x     spid4     Grant List::     spid4        Owner: x191813   Mode: X        Flg: x  Ref:  Life: 2       SPID:52 ECID:    spid4        SPID: 52 ECID:   Statement Type: UPDATE Line #: 1    spid4        Input Buf: Language Event: <b>begin tran   update titles set title=' deadlock battle''    waitfor delay '  :  : 5'  update authors set address='110 north main'</b>     spid4      Requested By:     spid4        ResType:LockOwner Stype:'OR' Mode: U SPID:53 ECID:  Ec:( x195 756 )                  Value: x1916eb4  Cost:( /B88)    spid4     Victim Resource Owner:     spid4      ResType:LockOwner Stype:'OR' Mode: U SPID:53 ECID:  Ec:( x195 756 )                Value: x1916eb4  Cost:( /B88)    spid4     spid4     <b>End deadlock search 2 ... a deadlock was found.</b>     spid4     ----------------------------------     spid4     ----------------------------------     spid4     Starting deadlock search 3    spid4     Target Resource Owner:     spid4      ResType:LockOwner Stype:'OR' Mode: U SPID:53 ECID:  Ec:( x195 756 )                Value: x1916eb4     spid4      Node:1  ResType:LockOwner Stype:'OR' Mode: U SPID:53 ECID:  Ec:( x195 756 )                Value: x1916eb4     spid4      Node:2  ResType:LockOwner Stype:'OR' Mode: U SPID:52 ECID:  Ec:( x1947756 )                Value: x1916e72     spid4     spid4     <b>Previous victim encountered ... aborting search</b>          spid4     spid4     End deadlock search 3 ... a deadlock was not found.        spid4    ----------------------------------


If you had also turned on trace flag 1206 you would get numerous messages similar to the following in the error log:
1.Process 52 acquiring IX lock on PAG: 5:1:99 (class bit2000000 ref1)   result: OK  Process 52 acquiring X lock on KEY: 5:2121058592:1 (b60057ff7752) (class bit2000000 ref1)  result: OK  Process 52 releasing lock reference on KEY: 5:2121058592:2 (9002e988d824) Process 5 releasing all locks @19116B3C


DBCC TRACEON(3205)



This flag disables hardware compression for tape drives. If the tape drive supports the compression, the BACKUP statement that backs up the database directly to tape will take advantage of hardware compression. If you must exchange tapes with another office where hardware compression is not supported, you might wish to turn on trace flag 3205 so that your tapes are compatible with the other office's hardware.

DBCC TRACEON (4013)



This flag can be used to audit connections to the server. When turned on, the SQL Server error log will contain an entry for each successful connection. The log entry will look similar to the following:
1.Login: johndoe BP-5CHSFFH2HEJ1johndoejohndoeSQL Query AnalyzerBP-5CHSFFH2HEJ1ODBCmaster,   server process ID (SPID): 55, kernel process ID (KPID): 55.


As you might imagine the error log on a busy server will grow quite voluminous if this flag is turned on.

DBCC TRACEON(4022)



This flag is used to bypass procedures marked for automatic execution at startup. Note that automatically executed procedures are also skipped if SQL Server is started with minimal configuration.

DBCC TRACEON(2520)



This flag can be used to force DBCC HELP to return syntax of undocumented DBCC statements. If 2520 is not turned on, DBCC HELP will refuse to give you the syntax stating: "No help available for DBCC statement 'undocumented statement'".

DBCC TRACEON(2588)



This flag can be used to force DBCC HELP to return syntax of undocumented DBCC statements in SQL Server 2005 and 2008.
1.DBCC TRACEON (2588);DBCC HELP ('?') GO DBCC TRACEOFF (2588);


DBCC TRACEON(1200)



This flag can be used to get a detailed report of all locks acquired by each SQL statement on the current connection - the output can be large depending on the number of rows involved. For example, take a look at the output of the following simple query:
1.SELECT a.au_id, b.royaltyper  FROM authors a INNER JOIN titleauthor b  ON a.au_id =b.au_id  ORDER BY 2


Results (abbreviated):
1.Process 54 acquiring IS lock on TAB: 5:53575229 [] (class bit0 ref1) result: OK  Process 54 acquiring IS lock on TAB: 5:1977058079 [] (class bit0 ref1) result: OK  Process 54 acquiring IS lock on PAG: 5:1:148 (class bit0 ref1) result: OK  Process 54 acquiring ISlock on PAG: 5:1:102 (class bit0 ref1) result: OK  Process 54 releasing lock on PAG: 5:1:102  Process 54 acquiring IS lock on PAG: 5:1:102 (class bit0 ref1) result: OK  Process 54 releasing lock on PAG: 5:1:102  Process 54 acquiring IS lock on PAG: 5:1:102(class bit0 ref1) result: OK  Process 54 releasing lock on PAG: 5:1:102  Process 54 acquiring IS lock on PAG: 5:1:102 (class bit0 ref1) result: OK  Process 54 releasing lockon PAG: 5:1:102  Process 54 acquiring IS lock on PAG: 5:1:102 (class bit0 ref1) result: OK  Process 54 releasing lock on PAG: 5:1:102  Process 54 acquiring IS lock on PAG: 5:1:102 (class bit0 ref1) result: OK  Process 54 releasing lock on PAG: 5:1:102  Process 54 acquiring IS lock on PAG: 5:1:102 (class bit0 ref1) result: OK  Process 54 releasing lock on PAG: 5:1:102  Process 54 acquiring IS lock on PAG: 5:1:102 (class bit0 ref1)result: OK  Process 54 releasing lock on PAG: 5:1:102  Process 54 acquiring IS lock onPAG: 5:1:102 (class bit0 ref1) result: OK  Process 54 releasing lock on PAG: 5:1:102  …


DBCC TRACEON (1807)



This flag can be used to allow the creation of database files on a network share. You must specify a valid UNC path to the share in order to create database and log files.
1.DBCC TRACEON(3607)DBCC TRACEON(3608) and DBCC TRACEON(3609)


These flags can be used to skip the recovery process during SQL Server startup. 3607 does not recover any databases, 3608 recovers the master only. In addition, both trace flags cause SQL Server to skip stored procedures marked for automatic execution. Trace flag 3609 skips creation and clearing of tempdb at startup. Warning: do NOT use trace flags 3607-3609 unless you are directed to do so by Microsoft support professional.

DBCC TRACEON(4030), DBCC TRACEON(4031) and DBCC TRACEON(4032)



Flags 4030 and 4031 can be used to write the SQL statements submitted and output returned to the connections. Their functionality is similar to DBCC INPUTBUFFER and DBCC OUTPUTBUFFER respectively. The difference is that trace flags record all information in the error log for all connections. For example, we can set both of these flags globally and send the output to the error log with the following:
1.DBCC TRACEON(-1, 4031)  DBCC TRACEON(-1, 4030)  DBCC TRACEON(-1, 3605)


Next, execute a simple statement such as:
1.SELECT TOP * FROM authors


You will see entries similar to the following in the error log:
1.2003-10-24 23:09:08. spid52     Printing receive buffer:  01 01 00 42 00 00 01 00 53 00 45 00 4C 00 45 00   ...B....S.E.L.E.  43 00 54 00 20 00 54 00 4F 00 50 00 20 00 31 00   C.T. .T.O.P. .1.  20 00 2A 00 20 00 46 00 52 00 4F 00 4D 00 20 00    .*. .F.R.O.M. .    2003-10-24 23:09:08.78 spid52    61 00 75 00 74 00 68 00 6F 00 72 00 73 00 0D 00   a.u.t.h.o.r.s...      2003-10-24 23:09:08. spid52     Printing send buffer:     04 01 01 41 00 34 01 00 81 09 00 01 01 08 00 A7   ...A.4..........  0B 00 09 04 D0 00 34 05 61 00 75 00 5F 00 69 00   ......4.a.u._.i.  64 00 00 00 08 00 A7 28 00 09 04 D0 00 34 08 61   d......(.....4.a  00 75 00 5F 00 6C 00 6E 00 61 00 6D 00 65 00 00   .u._.l.n.a.m.e..  00 08 00 A7 14 00 09 04 D0 00 34 08 61 00 75 00   ..........4.a.u.  5F 00 66 00 6E 00 61 00 6D 00 65 00 00 00 08 00   _.f.n.a.m.e.....  AF 0C 00 09 04 D0 00 34 05 70 00 68 00 6F 00 6E   .......4.p.h.o.n  00 65 00 00 00 09 00 A7 28 00 09 04 D0 00 34 07   .e......(.....4.


Flag 4032 can be used to record every SQL statement executed against the server in the error log. The log entries will look similar to the following:
1.Text:use [pubs]  ODS Event: Language Exec  Text:SELECT TOP * FROM authors


DBCC TRACEON(8202)



Used for replication, this flag forces SQL Server to replicate UPDATE statements as DELETE followed by an INSERT. This behavior could be useful if you wish to perform custom processing in replication stored procedures. For instance, you could write a record to the audit table every time record is updated through replication.
posted by LifeisSimple
2012. 2. 5. 23:10 Brain Trainning/DataBase

배포DB 서버 변경 중 이런 에러 메시지를 받았네요.

보통은 2008 버전으로 호환성 UP 한 다음에 작업을 했었는데 오늘은 아무 생각없이 DB버전을 80모드 (2000) 으로 두고 했더니 이런 오류가 나네요... 

음... 역시나 해결책은... 

DBCC TRACEON(-1, 7307) 
(원격쿼리시 데이터 Validation 수정) 구버전 혹은 이기종 데이터를 전송할때 문제가 될 경우 사용하면... 직방입니다. 쩝. 
편하게 사용하기 좋지만 만약 찜찜하면 데이터를 잘 확인해 보시는것이...


관련 오류 링크 :

SSIS 데이터 전송 오류 : http://www.sqlleader.com/mboard.asp?exec=view&strBoardID=SS2005QNA&intSeq=1412 

2000->2005 데이터 이관시 오류 :  http://www.sqlleader.com/mboard.asp?exec=view&strBoardID=SS2005SSIS&intSeq=1427 


=========================================== 오류 메시지 =====================================================

Message: 
연결된 서버 '(null)' OLE DB 공급자 'STREAM'( '[!BulkInsert].PUBLICATIONTB_ADD_PROFILE'에 대한 잘못된 데이터를 반환했습니다. 

날짜                     2012-02-05 오후 10:22:56

로그                     작업 기록 (NODE01-PUBLICATIONDB-PUBLICATIONTB-NODE02-ReplDB-6BF4222B-9EE3-4847-B0D1-E49560BA519D)

 

단계 ID                1

서버                     NODE02

작업 이름                          NODE01-PUBLICATIONDB-PUBLICATIONTB-NODE02-ReplDB-6BF4222B-9EE3-4847-B0D1-E49560BA519D

단계 이름                          에이전트를 실행합니다.

기간                     00:06:42

SQL 심각도                        0

SQL 메시지 ID                   0

전자 메일 수신 운영자                     

Net Send 수신 운영자                      

호출 수신 운영자               

다시 시도 횟수                   0

 

메시지

2012-02-05 13:29:28.788 Copyright (c) 2008 Microsoft Corporation

2012-02-05 13:29:28.788 Microsoft SQL Server 복제 에이전트: distrib

2012-02-05 13:29:28.788 

2012-02-05 13:29:28.788 출력 줄 앞에 붙은 타임스탬프가 UTC 시간으로 표시됩니다.

사용자 지정 에이전트 매개 변수 값:

                                        -Publisher NODE01

                                        -PublisherDB PUBLICATIONDB

                                        -Publication PUBLICATIONTB

                                        -Distributor NODE03

                                        -SubscriptionType 1

                                        -Subscriber NODE02

                                        -SubscriberSecurityMode 1

                                        -SubscriberDB ReplDB

                                        -Continuous

                                        -XJOBID 0x77A61C45B5385E468E6F86091C248D7E

                                        -XJOBNAME NODE01-PUBLICATIONDB-PUBLICATIONTB-NODE02-ReplDB-6BF4222B-9EE3-4847-B0D1-E49560BA519D

                                        -XSTEPID 1

                                        -XSUBSYSTEM Distribution

                                        -XSERVER NODE02

                                        -XCMDLINE 0

                                        -XCancelEventHandle 00000000000005EC

                                        -XParentProcessHandle 00000000000005E8

2012-02-05 13:29:28.788 Startup Delay: 9469 (msecs)

2012-02-05 13:29:38.257 구독자 'NODE02'에 연결하는 중

배포자 'NODE03'에 연결하는 중

에이전트 프로필에서 가져온 매개 변수 값:

                                        -bcpbatchsize 2147473647

                                        -commitbatchsize 100

                                        -commitbatchthreshold 1000

                                        -historyverboselevel 1

                                        -keepalivemessageinterval 300

                                        -logintimeout 15

                                        -maxbcpthreads 1

                                        -maxdeliveredtransactions 0

                                        -pollinginterval 5000

                                        -querytimeout 1800

                                        -skiperrors 

                                        -transactionsperhistory 100

2012-02-05 13:29:38.319 초기화하는 중

구독자에서 구독을 다시 초기화하는 중

스냅숏은 대체 폴더 '\\Node03\node03\unc\NODE01_PUBLICATIONDB_PUBLICATIONTB\20120205222913\'()로부터 적용됩니다.

스크립트 'MS_PUBLICATIONTB_2.pre'() 적용했습니다.

스크립트 'MS_PUBLICATIONTB_2.sch'() 적용했습니다.

테이블 'MS_PUBLICATIONTB'()로 데이터를 대량 복사하는 중

테이블 'MS_PUBLICATIONTB'()로 데이터를 대량 복사하는 중

테이블 'MS_PUBLICATIONTB'()로 데이터를 대량 복사하는 중

테이블 'MS_PUBLICATIONTB'()로 데이터를 대량 복사하는 중

에이전트 메시지 코드 20037입니다. 테이블 '"dbo"."MS_PUBLICATIONTB"'()로 대량 복사할 수 없습니다.

Category:NULL

Source:  Microsoft SQL Server Native Client 10.0

Number:  

Message: 일괄 보내기가 실패했습니다.

Category:NULL

Source:  Microsoft SQL Server Native Client 10.0

Number:  7339

Message: 연결된 서버 '(null)' OLE DB 공급자 'STREAM'() '[!BulkInsert].PUBLICATIONTB_ADD_PROFILE'에 대한 잘못된 데이터를 반환했습니다.

posted by LifeisSimple
2012. 2. 2. 00:37 Brain Trainning/DataBase
VM에서 Cluster를 생성 테스트 하기 위해서는 공유Disk 를 만들어줘야 합니다. 
이럴때 사용할 수 있는 Tool이 Microsoft iSCSI Software Target 입니다. 

생각보다 설치도 간단하고 사용법도 간단합니다. 

간략히 설명을 하자면.. 저 툴을 설치한 서버가 Storage 역할을 하는 것입니다. 디스크를 넉넉하게 넣어둔 서버에 설치하면 되겠네요. 
(단, 서버 버전은... 안타깝게도 2008 R2 버전이어야 합니다. ㅡㅡ;;)

아래는 아주 친절한 사용 설명입니다. 

출처 :  http://blogs.technet.com/b/josebda/archive/2009/02/02/step-by-step-using-the-microsoft-iscsi-software-target-with-hyper-v-standalone-full-vhd.aspx 

Overview

In this post, I will show all the steps required to run Windows Server 2008 Hyper-V with the Microsoft iSCSI Software Target. We will cover the specific scenario of a standalone Windows Server 2008 server (as opposed to a clustered one) on a full install (as opposed to a core install) and using a VHD file (as opposed a pass-through disk).

In order to follow these instructions you will need at least two computers. One computer will run a full install of Windows Server 2008 with the Hyper-V role enabled. The other computer needs to be a Windows Storage Server (WSS) with the iSCSI pack or Windows Unified Data Storage Server (WUDSS). Optionally, you could add a Client for your Virtual Machine and a computer for remote Hyper-V Management.

Configuring the Networks

For your server running Hyper-V, you should consider having at least three Network Interface Cards (NICs). One will be dedicated to iSCSI traffic. The second will be connected to the Virtual Switch and used for traffic going to your virtual machine. The third NIC you will dedicate to remote management. This configuration is showed in the diagram below:

01 

Checking the Windows Storage Server

WSS (with the Microsoft iSCSI Software Target) comes preinstalled from the hardware vendor. This special OS release is not available the Microsoft sales channels like software retailers or volume licensing. You can find more information about WSS and WUDSS at http://www.microsoft.com/storageserver. Windows Storage Server 2008 is also available from MSDN or TechNet subscriber downloads for non-production use (see details athttp://blogs.technet.com/josebda/archive/2009/05/13/windows-storage-server-2008-with-the-microsoft-iscsi-software-target-3-2-available-to-msdn-and-technet-plus-subscribers.aspx).

You should make sure you have the proper credentials (username and password) with administrator privileges on the Storage Server. You should also make sure you have remote access to the Storage Server via Remote Desktop. Once you log on to the Storage Server via Remote Desktop, verify that you can locate the Microsoft iSCSI Software Target Management Console (MMC), which can be found in the Administration Tools menu. From a Storage Server perspective, we’ll perform all the configuration actions using the iSCSI Target MMC.

02 

Checking the Server running Hyper-V

On the server running Windows Server 2008 Hyper-V, you should make sure to run Windows Update to get the latest updates. This will ensure that you have the final release of Hyper-V, not the beta version that was released with Windows Server 2008.

You will also need to enable the Hyper-V role. This is done using Server Manager by right-clicking the “Roles” node on the tree on the left and selecting “Add Roles”.

03

This will bring up the “Add Roles Wizard”, where you will find “Hyper-V” on the list of roles:

 04

While configuring the Hyper-V role on the wizard, you should see the three (or more) NICs on your server on the “Create Virtual Networks” step.
Make sure you do not select the NICs used for iSCSI traffic and Hyper-V remote management in the “Create Virtual Networks”.

05 

You will need to restart the server after you add the Hyper-V role.

Loading the iSCSI Initiator

The next step now is to configure the iSCSI initiator on the Hyper-V server. 
You can find the “iSCSI Initiator” under “Administrative Tools” in Windows Server 2008. You can also find it in the “Control Panel”.

The first time you load the iSCSI initiator, it will ask you two questions.
The first question is about loading the Microsoft iSCSI Initiator service every time:

06

The second question is about configuring the firewall to allow the iSCSI traffic:

07

You should click on “Yes” for both questions.
After that, the iSCSI Initiator Properties windows will load, showing the “General” tab.
This tab gives you an important piece of information: your initiator name or IQN. We’ll need this later when configuring the target:

07

Configuring the target portal

The next step is configure the initiator with the address of your iSCSI target portal.
In our case, this is the computer running Windows Storage Server and the Microsoft iSCSI Software Target.
In the iSCSI Initiator Properties window, select the “Discovery” tab and add the IP address of the Storage Server to the list of Target Portals.

09

Click on “Add Portal…” to add the information. You will need the IP address of your Storage Server at this point. Port 3260 is the default.

10

Here’s the screen after the Target Portal is added:

11

Now, if you switch over the “Targets” tab of the iSCSI Initiator Properties windows, you will see this:

12

This blank list of targets is expected at this point, since we haven’t configured any targets yet.
We’ll do that next.

Creating the iSCSI Target

Now we switch over the Microsoft iSCSI Software Target side, on the Windows Storage Server.
We will create the target using the Microsoft iSCSI Software Target MMC we mentioned before.

13

After starting the wizard, skip the introduction page by clicking “Next”.

14

Next, you will provide the name and description for the target. We’ll be using simply “T1” for the name.

15

On the following screen, you need to provide the identification for the target.
Here you can use an IQN (iSCSI Qualified Name) or you can use the advanced setting to go with an IP address, DNS name or MAC address.

16

Since our initiator in this case already contacted the Storage Server, you can simply click on “Browse” and pick the IQN from there.

17

Once you get the right IQN, click “Next” to proceed.

18

Finally, click “Finish” to create the target.

19

Adding LUNs to the iSCSI Target

Now that the target is created, you need to add virtual disks or LUNs to it. These will be the logical units that will be presented to the initiator.
You will do this by right-clicking the target T1 and selecting the option to “Create Virtual Disks for iSCSI Target”.

20

You will start the wizard. Click “Next” on the introduction page.

21

Next, you will provide a path to the file to use as your virtual disk or LUN. This file will have a VHD extension.

22

Next, you will specify the size for the virtual disk or LUN. We’ll create a 20GB LUN here, which is enough to install Windows Server 2008 later on. The iSCSI target uses fixed-sized VHD files, but you can extend them if needed.

23

Next, you will specify a description for the virtual disk or LUN.

24

Finally, click “Finish” to create the virtual disk. Depending on the size, it could take a while.

25

At this point, you can see the target and its virtual disk on the Microsoft iSCSI Software Target MMC:

26

You can check the properties of the target, including the target IQN, by right-clicking the target name and clicking on “Properties”.

27

Now we go back to the initiator side.

Configuring the iSCSI Initiator targets

When we last checked the “Targets” tab of the iSCSI Initiator Properties windows, we had an empty list.
With the target properly configured, you should see the it showing after you click on “Refresh”:

28

Now you need to click on “Log on…” to connect to the target.
On the “Log On to Target” window, be sure to check the box to “Automatically restore this connection when the computer starts”.

29

Once you log on, the target status will change to “Connected”.

30

The LUN should also appear in the list of “Volumes and Devices” in the iSCSI Initiator Properties:

31

Now we need to work on that LUN to turn it into an NTFS volume with a drive letter.
That is done in Disk Management.

Preparing the Volume

If you followed all the steps so far, you should already have the LUN as an offline, uninitialized, unallocated volume in Server Manager, under Disk Management:

32

The first thing you need to do here is to online the volume, by right-clicking on the disk:

33

The volume will be onlined automatically if you are running the Standard Edition of Windows Server 2008. 

After that, the volume will be online, but still uninitialized. You will then select the option to “Initialize Disk”:

34

At this point you need to select a partition style (MBR or GPT). The older MBR style is commonly used for small partitions. GPT is required for partitions larger than 2TB.

35

After this, you have a basic disk online which you could use to create an NTFS volume. If you right click it again, there will be an option to create a “New Simple Volume”.

36

Once you go through that wizard, format the volume and assign it a drive letter, you will have the final result in Disk Management as drive E:

37

We’ll use this drive E: as our storage for Hyper-V.

Creating the Virtual Machine

Last but not least, we must now create our Virtual Machine. We’ll do this in the Hyper-V Manager:

38

There are two places in the New Virtual Machine Wizard where you will refer to the E: disk. 
The first one is when you select the location of your virtual machine configuration files:

39

The second one is when you specify the location of the virtual hard drive used by that virtual machine:

40

In this case, by using the wizard, we selected the default option of using a Dynamically Expanding VHD file that is exposed to the child partition as Virtual IDE.
You can verify that looking at the settings for the resulting Virtual Machine:

41

If you click on the “Inspect” button, you can see it’s a Dynamic VHD:

42

You could, of course, use any of the other types of VHD files or even a pass-through disk, but that’s a topic for another blog post…

Conclusion

I hope this blog post has helped you understand all the steps required to use the Microsoft iSCSI Software Target to provision storage for your Windows Server 2008 server running Hyper-V.
This post covered a scenario where Hyper-V runs on a full install of Windows Server 2008, using a VHD file on the parent and without Failover Clustering.

posted by LifeisSimple
2012. 2. 1. 16:32 Brain Trainning/DataBase


이전에는 특별히 사용에 대한 고민을 하지 않았지만... 요즘.. 새로운 서비스와 시스템이 난무하면서 Adhoc 쿼리의 압박이 있어 사용을 고려하고 있는 옵션입니다. 

테스트 상에서는 큰 문제가 보이지 않고 효과도 입증이 되었지만... 실 서비스에서는 어떤 Side Effect가 있을지 ... 

확실히 테스트시에는 효과가 좋습니다. 

좀 여유가 있는 시스템에 적용 후 추이를 봐가면 부하가 큰 시스템에 순차적 적용하면 좋을 듯 합니다. 


출처 :  http://www.sqlskills.com/blogs/kimberly/post/procedure-cache-and-optimizing-for-adhoc-workloads.aspx 

Plan cache and optimizing for adhoc workloads 

I mentioned that servers receiving a lot of dynamic constructs (typically those generated by client SQL generaters/ORM/LINQ, etc.) can start to consume too much plan cache and have problems with "single-use plans" in my last post titled: Statement execution and why you should use stored procedures. I also mentioned that SQL Server 2008 has an option/feature specifically to help reduce the bloat on the plan cache by only storing a query plan hash the first time a plan is created.

First - let's check to see how your plan cache is currently allocated:

(note: updated to decimal(18,2) as a few of you had overflow errors due to high use counts!)

SELECT objtype AS [CacheType]
        , count_big(*) AS [Total Plans]
        , sum(cast(size_in_bytes as decimal(18,2)))/1024/1024 AS [Total MBs]
        , avg(usecounts) AS [Avg Use Count]
        , sum(cast((CASE WHEN usecounts = 1 THEN size_in_bytes ELSE 0 END) as decimal(18,2)))/1024/1024 AS [Total MBs - USE Count 1]
        , sum(CASE WHEN usecounts = 1 THEN 1 ELSE 0 END) AS [Total Plans - USE Count 1]
FROM sys.
dm_exec_cached_plans
GROUP BY objtype
ORDER BY [Total MBs - USE Count 1] 
DESC
go

This statement will show you how much of your cache is allocated to single use plans... and, I'd love to hear what your numbers are... this query works in 2005 and 2008; however, the primary solution I'm describing here (optimize for adhoc workloads) will only work in SQL Server 2008.

If you have a lot of your cache going to plans that are only executed once, then it's time to clean up the cache and take better advantage of it with plans that are more consistent and more stable. Ideally, this means using more stored procedures and writing these stored procedures effectively for better performance (I'm currently in the midst of doing this in my Optimizing Procedural Code category). However, if you absolutely must use a lot of adhoc SQL, then you should consider upgrading and turning on this new option. It's an advanced configuration option so you won't see it until you "show advanced options" and it's set using sp_configure. There have been some other really good posts out there on how to use this and what this is so I'm just going to bring together some great resources for you to read. The most important post to read (and it's especially important for those on you on versions of SQL Server 2000 or SQL Server 2005 RTM/SP1 [er... why aren't you on SP2?]) is that plan cache can get out of control. 2005 SP2 and 2008 reduce the total size but there no upper limit (which is again - a GREAT reason for the addition of "optimize for adhoc workloads"). Kalen Delaney talks about how things really work in her SQL Server 2005 SP2 post titled: Did You Know? SP2 does NOT limit the amount of plan cache you can have (key word there is LIMIT). Again, SQL Server doesn't set an upper limit but it does [drastically] reduce the total size that's possible (as of SP2). As for even more details on plan caching, recompilation and SQL Server 2008's better cache control - check out Greg Low's (blog|twitter) whitepaper titled: Plan Caching in SQL Server 2008. Taken STRAIGHT from the first section of the whitepaper:

SQL Server 2008 and SQL Server 2005 SP2 
* 75% of visible target memory from 0-4GB + 10% of visible target memory from 4Gb-64GB + 5% of visible target memory > 64GB 
 
SQL Server 2005 RTM and SQL Server 2005 SP1 
* 75% of visible target memory from 0-8GB + 50% of visible target memory from 8Gb-64GB + 25% of visible target memory > 64GB 
 
SQL Server 2000 
* SQL Server 2000 4GB upper cap on the plan cache 

Finally, lots of additional posts on this topic will give you even more details:

However, I'm still really interested in seeing your numbers from the query above - let me know!

NEW/ADDITIONAL REQUEST: Let me know your max server memory setting as well as the total memory available on the box?

Thanks for reading!
kt



Read more: http://www.sqlskills.com/blogs/kimberly/post/procedure-cache-and-optimizing-for-adhoc-workloads.aspx#ixzz1l73uvfAb
 


출처 :  http://blogs.msdn.com/b/joesack/archive/2011/03/28/measuring-impact-of-optimize-for-ad-hoc-workloads-via-cachestore-sqlcp.aspx 

Measuring impact of “optimize for ad hoc workloads” via CACHESTORE_SQLCP

The cache store “CACHESTORE_SQLCP” represents cached ad-hoc query plans, server-side cursors and prepared statements.   One way to gather memory allocation values for this specific cache store is by using the following query:

SELECT single_pages_kb, multi_pages_kb

FROM sys.dm_os_memory_clerks

WHERE type = 'CACHESTORE_SQLCP'

You can also see allocations to CACHESTORE_SQLCP via DBCC MEMORYSTATUS (example output below for one node):

CACHESTORE_SQLCP (node 0),KB

VM Reserved,0

VM Committed,0

Locked Pages Allocated,0

SM Reserved,0

SM Committed,0

SinglePage Allocator,12728

MultiPage Allocator,1968

There has already been much written about cache bloat due to ad hoc query plans and I won’t rehash it here (Kimberly Tripp has a few great posts on this topic – including one post that lists several posts from different authors on the subject).   There are multiple ways to reduce this bloat (for example - move to using parameterized queries, force parameterization).  One of the easier methods includes enabling the “optimize for ad hoc workloads” option. 

The purpose of this post is to connect the dots between CACHESTORE_SQLCP and enabling the “optimize for ad hoc workloads" option (note that you can also use sys.dm_exec_cached_plans to see the impact on size_in_bytes by plan and reference the cacheobjtype of Compiled Plan versus Compiled Plan Stub).  The following demonstration simply shows the impact of executing several ad hoc queries and measuring the significant allocation differences in CACHESTORE_SQLCP.  In my testing – single_pages_kb was equal to 13,072 without plan stubs and then 760 after enabling the “optimize for…” option. This below demo is intended to be stepped through statement by statement:

-- Tested on 10.50.1765

-- This demo assumes optimize for ad hoc workloads is off

-- (And yes please only run this demo on a test environment)

 

USE [master]

GO

 

EXEC sp_configure 'show advanced options',1

RECONFIGURE

GO

 

EXEC sp_configure 'optimize for ad hoc workloads',0

RECONFIGURE

GO

 

EXEC sp_configure 'show advanced options',0

RECONFIGURE

GO

 

CREATE DATABASE [QueryBloat];

GO

 

USE [QueryBloat];

GO

 

CREATE TABLE dbo.Bloat (col01 uniqueidentifier);

GO

 

INSERT dbo.Bloat

VALUES (NEWID())

GO 500

 

-- Clear out adhoc queries, prior to baseline

DBCC FREESYSTEMCACHE('SQL Plans')

 

-- Take baseline

SELECT single_pages_kb

FROM sys.dm_os_memory_clerks

WHERE type = 'CACHESTORE_SQLCP'

 

-- In my case, I saw single_pages_kb = 120

 

-- Now let's make some bloat

DECLARE @NEWID varchar(36)

 

DECLARE curBloat CURSOR FOR  

SELECT col01

FROM dbo.Bloat

ORDER BY col01

 

OPEN curBloat

 

FETCH NEXT FROM curBloat

INTO @NEWID;

 

EXEC ('SELECT col01 FROM dbo.Bloat WHERE col01 = ' + '''' +@NEWID + '''')

 

WHILE @@FETCH_STATUS = 0

BEGIN

 

FETCH NEXT FROM curBloat

INTO @NEWID;

 

EXEC ('SELECT col01 FROM dbo.Bloat WHERE col01 = ' + '''' +@NEWID + '''')

END

 

CLOSE curBloat;

DEALLOCATE curBloat;

 

-- Checking again, I see single_pages_kb = 13,072

SELECT single_pages_kb

FROM sys.dm_os_memory_clerks

WHERE type = 'CACHESTORE_SQLCP'

 

-- Now let's enable "optimize for ad hoc workloads"

EXEC sp_configure 'show advanced options',1

RECONFIGURE

GO

 

EXEC sp_configure 'optimize for ad hoc workloads',1

RECONFIGURE

GO

 

EXEC sp_configure 'show advanced options',0

RECONFIGURE

GO

 

-- Clear out adhoc queries for our second test

DBCC FREESYSTEMCACHE('SQL Plans')

 

-- Take baseline - I see single_pages_kb = 120

SELECT single_pages_kb

FROM sys.dm_os_memory_clerks

WHERE type = 'CACHESTORE_SQLCP'

 

-- Make some bloat again

DECLARE @NEWID varchar(36)

 

DECLARE curBloat CURSOR FOR  

SELECT col01

FROM dbo.Bloat

ORDER BY col01

 

OPEN curBloat

 

FETCH NEXT FROM curBloat

INTO @NEWID;

 

EXEC ('SELECT col01 FROM dbo.Bloat WHERE col01 = ' + '''' +@NEWID + '''')

 

WHILE @@FETCH_STATUS = 0

BEGIN

 

FETCH NEXT FROM curBloat

INTO @NEWID;

 

EXEC ('SELECT col01 FROM dbo.Bloat WHERE col01 = ' + '''' +@NEWID + '''')

END

 

CLOSE curBloat;

DEALLOCATE curBloat;

 

-- Measuring impact - single_pages_kb = 760 (versus 13,072)

SELECT single_pages_kb

FROM sys.dm_os_memory_clerks

WHERE type = 'CACHESTORE_SQLCP' 

posted by LifeisSimple
2012. 1. 29. 16:49 Brain Trainning/Server
윈도우 2003/2008 버전의 에디션간 차이점입니다. 
여기에 SQL Server버전간의 차이점을 더하면 놀라운... 일관성없음이 보입니다. (흠..)

두 팀은 서로 이야기를 좀 해야할듯...



Compare the Editions of Windows Server 2008



Compare the Editions of Windows Server 2003

Compare the features of the Windows Server 2003 family using this set of tables, which is organized by function.

Features

Key = Feature included  = Feature partially supported  = Feature not included

Feature Standard Edition Enterprise Edition Datacenter Edition Web Edition
Hardware Specifications
64-bit Support for Intel® Itanium™-Based Computers1
Hot add memory2,3
Non-Uniform Memory Access (NUMA)3
Datacenter Program
2 GB RAM Maximum
4 GB RAM Maximum
32 GB RAM Maximum
64 GB RAM Maximum4
512 GB RAM Maximum5
2-way SMP
4-way SMP
8-way SMP
32-way SMP
64-way SMP
Directory Services
Active Directory
Metadirectory Services (MMS) Support
Security Services
Internet Connection Firewall2
Public Key Infrastructure, Certificate Services, and Smart Cards
Terminal Services
Remote Desktop for Administration
Terminal Server
Terminal Server Session Directory
Clustering Technologies
Network Load Balancing
Cluster Service
Communications & Networking Services
Virtual Private Network (VPN) Support
Internet Authentication Service (IAS)
Network Bridge2
Internet Connection Sharing (ICS)2
IPv6
File & Print Services
Distributed File System (DFS)
Encrypting File System (EFS)
Shadow Copies of Shared Folders
Removable Storage
Remote Storage
Fax Service
Services for Macintosh
Management Services
IntelliMirror
Group Policy Results
Windows Management Instrumentation (WMI) Command Line
Remote OS Installation
Remote Installation Services (RIS)
Windows System Resource Manager (WSRM)
.NET Application Services
.NET Framework2
Internet Information Services (IIS) 6.0
ASP.NET2
Enterprise UDDI Services
Multimedia Services
Windows Media™ Services2
1 Applies to 64-bit versions only.
2 Not supported in 64-bit versions of Windows Server 2003.
3 May be limited by lack of support by OEM hardware.

4 Both the 32-bit version of Datacenter Edition and the 64-bit version of Enterprise Edition support up to 64 GB RAM.
5 The 64-bit version of Datacenter Edition supports up to 512 GB RAM.
posted by LifeisSimple
2012. 1. 28. 23:01 Brain Trainning/DataBase
출처 :  http://technet.microsoft.com/en-us/library/cc966534.aspx 

Storage Top 10 Best Practices
Published: October 17, 2006

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.

posted by LifeisSimple
2012. 1. 25. 22:07 Brain Trainning/PRG Language
아주 가끔씩 필요한 경우가 있었는데 책에 정리가 잘 되어 있군요... 



웹을지탱하는기술HTTPURIHTML그리고REST
카테고리 컴퓨터/IT > 웹사이트
지은이 야마모토 요헤이 (멘토르, 2011년)
상세보기

스테이터스 코드
구분 코드 요약 설명
1xx 100 Continue 클라이언트는 헤더를 보내고 대기합니다. 서버는 이 요청을 처리할 수 있다고 판한한 경우, 100 Continue를 반환합니다.
101 Switching Protocol 이용할 프로토콜을 HTTP 1.1 에서 업그레이드 할 때 사용합니다. 
2xx 200 OK 요청이 성공했다는 것을 나타냅니다.
201 Created 요청이 성공해서 새로운 리소스를 작성했다는 것을 나타냅니다.
202 Accepted 클라이언트로부터 요청은 받아들였지만, 서버 측에서 처리가 완료되지 않았음을 나타냅니다.
203 Non-Authoritative Information 응답 헤더가 오리지널 서버로부터 제공된 것이 아님을 나타냅니다.
204 No Content 요청이 성공했지만, 클라이언트에게 돌려보낼 콘텐츠가 없다는 것을 나타냅니다. (보통 Delete 에 대한 응답)
205 Reset Content 요청이 성공하여 브라우저 화면을 리셋하고, 다음 입력 동작으로 옮겨간다는 의미 (재입력 상태로 변경 등)
206 Partial Content GET할 때 Range 헤더에 리소스의 범위를 바이트로 지정하면, 리소스의 일부만을 얻을 수 있습니다. Partial GET의 성공
207 Multi-Status WebDAV에 있어서, 일괄처리와 같이 처리결과의 스테이터스가 여러 개 존재할 경우. 각각의 결과에 대한 성공은 바디의 XML을 확인해야 함.
3xx 300 Multiple Choices 지정한 URI에 대해서 콘텐트 네고시에이션을 수행한 결과 (복수의 링크에 대한 반환을 하기 위해 사용)
301 Moved Permanently 지정한 리소스가 새로운 URI로 이동했다는 것을 나타냄. 이동할 곳의 URI는 location 헤더로 나타냄
302 Found 스펙상은 요청한 URI가 존재하지 않았기 때문에 클라이언트는 location 헤더가 나타내는 별도의 URI로 메서드를 바꾸지 않은 채 요청을 재송신할 필요가 있음을 나타냄
303 See Other 요청에 대한 처리결과를 location헤더에서 표시되는 URI에서 GET으로 취득할 수 있다는 것을 나타냄
304 Not Modified 조건부 GET일때, 리소스가 갱신되지 않았다는 것을 보여줌
305 Use Proxy 이 리소스에 액세스하기 위해서는 지정된 프록시를 통할 필요가 있다는 것을 나타냅니다.
307 Temporary Redirected 요청한 URI가 존재하지 않기 때문에, 클라이언트는 location 헤더가 가리키는 새로운 URI로 메서드를 변경하지 않고 요청을 재송신할 필요가 있음을 나타냄.
4xx 400 Bad Request 요청의 구문이 잘못되었다는 것을 나타냅니다. 또한, 다른 4xx 계열 에러코드에 적합하지 않은 에러일 경우에도 이용합니다.
401 Unauthorized 적절한 인증정보 없이 리소스에 엑세스하려고 했다는 것을 나타냅니다.
402 Payment Required 이 리소스를 조작하기 위해서는 요금이 필요하다는 것을 나타냅니다. (실제 이용 안됨)
403 Forbidden 401 Unauthorized 는 클라이언트가 적절한 인증정보를 제시하지 않았다는 것을 나타내지만 403은 그 밖의 이유로 리소스를 조작할 수 없음을 나타냄 (특정 IP어드레스만 접근할 수 없는 경우 등)
404 Not Found 지정한 리소스를 찾을 수 없다는 것을 나타냅니다.
405 Method Not Allowed 요청한 URI가 지정한 메서드를 지원하지 않는다는 것을 나타냅니다.
406 Not Acceptable 클라이언트가 Accept 헤더에서 지정한 표현을 반환할 수 없다는 것을 나타냅니다.
407 Proxy Authentication Required 프록시 인증이 필요하다는 것을 나타냅니다.
408 Request Timeout 클라이언트가 요청을 아무리 기다려도 다 송신하지 못했기 때문에 서버 쪽에서 타임아웃했다는 것을 나타냅니다.
409 Conflict 요청이 요구한 리소스에 대한 조작이 리소스의 현재 상태와 모순된다는 것을 나타냅니다. (충돌)
410 Gone 이 리소스가 이전에 존재했지만, 현재는 존재하지 않는다는 것을 나타냅니다.
411 Length Required 클라이언트가 Content-Length 헤더를 송신해야만 한다는 것을 나타냅니다.
412 Precondition Failed 조건부 요청에서 클라이언트가 지정한 사전조건이 서버 쪽에서 맞지않았다는 것을 나타냅니다. (낙관적 잠금에서 이용)
413 Request Entity Too Large 서버가 처리할 수 없을 만큼 요청 메시지가 크다는 것을 나타냅니다. 서버는 클라이언트 접속을 끊습니다. 
414 Request-URI Too Long 서버가 처라힐 수 없을 만큼 요청한 URI가 너무 길다는 것을 나타냅니다.
415 Unsupported Media Type 클라이언트가 지정한 미디어 타입을 서버가 지원하지 않는다는 것을 나타냅니다.
416 Requested Range Not Satisfiable 클라이언트가 Range 헤더에서 지정한 범위가 리소스의 사이즈와 맞지 않음을 나타냅니다.
417 Expectation Failed 클라이언트가 지정한 Expect 헤더를 서버가 이해할 수 없다는 것을 나타냅니다. 클라이언트가 요청의 Expect 헤더에서 100-Continue를 지정했음에도 불구하고 서버가 다룰 수 없는 경우
422 Unprocessable Entity WebDAV에 있어서 클라이언트가 송신한 XML이 구문으로서는 바르지만, 의미상에 오류가 있다는 것을 나타냅니다.
423 Locked WebDAV에서 잠겨 있는 리소스를 조작하려고 했다는 것을 나타냄
424 Failed Dependency WebDAV에서 클라이언트가 요구한 메서드가 의존하는 다른 메서드의 실패로 인해, 원래의 요청도 실패했다는 것을 나타냅니다.
5xx 500 Internal Server Error 서버 측에서 에러가 발생했다는 것을 나타냅니다. 또한, 다른 5xx 계열 에러코드에 적합하지 않은 에러인 경우에도 이용합니다.
501 Not Implemented 요청된 메서드를 이 URI에서 서버가 구현하고 있지 않다는 것을 나타냅니다.
502 Bad Gateway 프록시가 상류 서버에 요청을 보냈지만, 처리가 정상적으로 종료하지 않았음을 나타냅니다.
503 Service Unavailable 서버 점검 등에서 서비스를 제공할 수 없다는 것을 나타냅니다. 응담 Retry-After 헤더에 재개 시기를 통지할 수도 있습니다.
504 Gateway Timeout 프록시가 상류 서버에 요청을 보냈지만 접속할 수 없다는 것을 나타냅니다.
505 HTTP Version Not Supported 클라이언트가 송신한 요청의 HTTP 버전을 서버가 지원하지 않음을 나타냅니다.

'Brain Trainning > PRG Language' 카테고리의 다른 글

[C#] SqlBulkCopy & SqlBulkCopyOptions 사용 방법...  (0) 2012.01.18
[C#] Bulk Insert into SQL Server  (0) 2012.01.17
[C#] Import Excel to GridView  (0) 2011.12.30
[C#] MVC Tutorials  (0) 2011.11.27
[GeoIP] .NET API 테스트 결과  (0) 2011.06.13
posted by LifeisSimple
2012. 1. 24. 15:55 Brain Trainning/DataBase
단순히 Netsh 명령이나 Registry 편집 이외에도 네트웍 카드 고급옵션에서도 설정을 해줘야 합니다.

그래야 확실한 문제 해결이 됩니다.

http://blogs.technet.com/b/networking/archive/2008/11/14/the-effect-of-tcp-chimney-offload-on-viewing-network-traffic.aspx 


The effect of TCP Chimney offload on viewing network traffic

Have you ever run in to a problem where you are attempting to troubleshoot a network connectivity issue with a network capture utility and seen only the 3 way handshake? This will happen if you are using Netmon 2.x, Netmon 3.x, Wireshark, Ethereal and most other network capture utilities.

It is relatively common knowledge that this will happen when TCP Chimney offload is enabled but disabling it via the registry or netsh sometimes doesn’t always resolve the problem. TCP Chimney offload enables TCP/IP processing to be offloaded to network adapters that can handle the TCP/IP processing in hardware. The use of TCP Chimney offload causes traffic to be delivered at a lower layer of the TCP/IP stack than we listen on with most network capture utilities.

The initial troubleshooting for this type of issue is to turn off TCP Chimney Offload via Netsh as follows. The benefit of this is that it does not require a reboot.

To turn off TCP Chimney by using the Netsh.exe tool, follow these steps:

  1. Click Start, click Run, type cmd, and then click OK.
  2. At the command prompt, type Netsh int ip set chimney DISABLED and then press ENTER.

However, if this does not change what is shown in a network capture, you should then move forward with disabling all of the features of the Scalable Network Pack as documented in Knowledge Base article 948496 – “An update to turn off default SNP features is available for Windows Server 2003-based and Small Business Server 2003-based computers”.

To manually disable RSS, NetDMA and TCP Offload, follow these steps:

  1. Click Start , click Run , type regedit , and then click OK .
  2. Locate the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  3. Right-click EnableTCPChimney , and then click Modify.
  4. In the Value data box, type 0, and then click OK.
  5. Right-click EnableRSS, and then click Modify.
  6. In the Value data box, type 0, and then click OK.
  7. Right-click EnableTCPA, and then click Modify.
  8. In the Value data box, type 0, and then click OK.
  9. Exit Registry Editor, and then restart the computer.

Disabling Chimney with netsh and changed the registry values above will allow you to see all the traffic in most cases but not always. You may also need to look at the features related to TCP Chimney offload available on the Network card. To access these options, choose the configure button on the general tab of the adapters properties. This will bring up a Window similar to what is displayed below. The Advanced tab is where the changes will be made.

image

The configurable options available vary depending on how the vendor implements the driver for Windows. Many network cards have features including Receive Side Scaling, TCP Checksum Offload and TCP Large Send Offload. Disabling the offload features of the network card will allow you to view all of the traffic in many cases where disabling the scalable network pack features in the OS doesn’t work. You should refer to the vendor’s documentation for specific steps on how to disable these features.

As a last resort you may have to disable chimney from a hardware perspective. Refer to the vendor’s documentation for specific information on how to disable offload features. Possible ways to do this vary, and may include settings on the NIC, jumpers on the motherboard, and/or configuration in System BIOS.

- Michael Vargo

posted by LifeisSimple
2012. 1. 24. 15:40 Brain Trainning/DataBase

fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 121, output error: 0).

위와 같은 오류가 2003 버전에서 발생했을 경우 ... 
윈도우 2008 과는 약간 다른듯 합니다. 일단... 레지스트리에 편집해야하는 해당 항목이 없습니다. 만들어 넣어야 할지... 아래는 2008 입니다.

저희는 문제가 발생해서 아래의 조치를 취했는데도 이런 문제가 발생했군요... 그래서... 다음과 같이 네떡카드에서도 설정을 해 줘야 합니다. ㅡㅡ;;

http://blogs.technet.com/b/networking/archive/2008/11/14/the-effect-of-tcp-chimney-offload-on-viewing-network-traffic.aspx 




iSCSI 장비에서 이런일이 많이 발생한다고 합니다. ... 쩝.



응용 프로그램이 Windows Server 2003을 실행하는 서버에서 SQL Server에 연결할 때 오류 메시지: "일반 네트워크 오류", "통신 연결 실패" 또는 "전송 수준 오류"

이 페이지에서

현상

영문자와 숫자가 조합된 PIN 코드가 설정된 Bluetooth 장치가 있다면. 서버를 Windows Server 2003 및 Microsoft SQL Server 실행 중입니다. TCP/IP를 사용하여 SQL Server에 연결하는 응용 프로그램이 있습니다. 응용 프로그램이 SQL Server에 연결할 때 이 시나리오에서는 사용자가 일시적으로 다음과 같은 오류 메시지 중 하나가 나타날 수 있습니다.
오류 메시지 1
[Microsoft][ODBC SQL Server 드라이버][DBNETLIB] 일반 네트워크 오류가 발생했습니다. 네트워크 설명서를 참조하십시오
오류 메시지 2
오류 [08S01] [Microsoft] [SQL Native Client] 통신 연결 오류입니다.
오류 메시지 3
System.Data.SqlClient.SqlException: 서버에 요청을 보낼 때 A 전송 수준 오류가 발생했습니다. (공급자: TCP 공급자 오류: 0 - 있는 기존 연결이 강제로 원격 호스트에서 닫혔습니다.)
SQL Server 네트워크 로드가 높은 때 이러한 오류 메시지 중 하나가 나타날 수 있습니다. 예를 들어, SQL Server 에서 데이터베이스를 복제할 때 이러한 오류 메시지 중 하나가 나타날 수 있습니다. 또는 SQL Server 에서 데이터베이스를 다중 사용자 응용 프로그램에 액세스할 때 이러한 오류 메시지 중 하나가 나타날 수 있습니다.

원인

서버에서 TCP Chimney 기능이 설정되어 있기 때문에 이 문제가 발생합니다. Windows Server 2003 확장 가능한 네트워킹 팩이에 의해 TCP Chimney 기능을 사용할 수 있습니다.

일반적으로 이 문제는 Broadcom 5708 칩세트 네트워크 어댑터를 사용하는 경우 발생합니다. 예를 들어, Broadcom 5708 칩세트를 다음 네트워크 어댑터를 사용합니다.
  • Broadcom NetXtreme 2세
  • Hewlett-Packard NC373i 다기능 기가비트 서버 어댑터
네트워크 어댑터가 다른 칩셋을 사용하는 경우에도 이 문제가 발생할 수 있습니다.

해결 방법

이 문제를 해결하려면 하드웨어 공급업체에 다음 업데이트가 있는지 하드웨어 공급업체에 문의하십시오.
  • 최신 기본 입/출력 시스템 (BIOS) 서버에 대해 업데이트
  • 네트워크 어댑터에 대한 최신 펌웨어 업데이트
  • 네트워크 어댑터의 최신 드라이버 업데이트
하드웨어 공급업체에 업데이트가 있는 경우 이 문제를 해결하려면 "해결 과정" 절을 참조하십시오.

해결 과정

중요한 이 섹션에서는, 메서드 또는 작업이 레지스트리 수정 방법을 알려 주는 단계가 포함되어 있습니다. 그러나 레지스트리를 잘못 수정하면 심각한 문제가 발생할 수 있습니다. 따라서 다음 이 단계를 주의 깊게 따라야 합니다. 추가 보호 기능을 수정하기 전에 레지스트리를 백업해야. 그런 다음 문제가 발생할 경우 레지스트리를 복원할 수 있습니다. 백업 및 복원하는 방법에 대한 자세한 내용은 Microsoft 기술 자료의 다음 문서를 참조하십시오.
322756  백업 및 Windows 에서 레지스트리를 복원하는 방법


이 문제를 해결하려면 TCP Chimney 기능을 해제하십시오. 이렇게 하려면 다음과 같이 하십시오.
  1. 시작 을 누르고 실행 을 cmd 를 입력한 다음 Enter 키를 누릅니다.
  2. 명령 프롬프트에서 다음 명령을 입력한 다음 Enter 키를 누릅니다.
    Netsh int IP DISABLED chimney 설정합니다.
    참고 이 명령을 실행한 후 서버를 다시 시작할 필요가 없습니다.
TCP Chimney 기능을 해제한 후 Windows Server 2003 성능이 저하되면 추가 단계를 수행하십시오.
  1. 시작 을 누르고, 실행 을, Regedit 를 입력한 다음 확인 을 누릅니다.
  2. 다음 레지스트리 하위 키를 찾습니다.
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  3. EnableTCPChimney 레지스트리 항목을 두 번 클릭하십시오.
  4. DWORD 값 편집 대화 상자에서 값 데이터 상자에 0 입력한 다음 확인 을 누릅니다.
  5. EnableRSS 레지스트리 항목을 두 번 클릭하십시오.
  6. DWORD 값 편집 대화 상자에서 값 데이터 상자에 0 입력한 다음 확인 을 누릅니다.
  7. EnableTCPA 레지스트리 항목을 두 번 클릭하십시오.
  8. DWORD 값 편집 대화 상자에서 값 데이터 상자에 0 입력한 다음 확인 을 누릅니다.
  9. 서버를 다시 시작하십시오.

현재 상태

Microsoft는 "본 문서의 정보는 다음의 제품에 적용됩니다." 절에 나열된 Microsoft 제품에서 이 문제를 확인했습니다.

추가 정보

Windows Server 2003 확장 가능한 네트워킹 팩이 같은 기능을 제공합니다.
  • TCP Chimney 오프로드
  • 받는 쪽 (RSS) 확장
  • 네트워크에 직접 메모리 액세스 (NetDMA)
Windows Server 2003 네트워크 트래픽을 처리할 때 이러한 기능을 Windows Server 2003 성능을 최적화합니다.

Windows Server 2003 확장 가능한 네트워킹 팩을 얻으려면 Windows Server 2003 서비스 팩 2 (SP2)를 설치해야 합니다. 또는 Microsoft 기술 자료 문서 912222 설명하는 업데이트를 설치해야 합니다. 추가 정보는 다음 문서 번호를 클릭하여 Microsoft 기술 자료에서 확인하십시오:
912222  Microsoft Windows Server 2003 확장 가능한 네트워킹 팩을 릴리스
TCP Chimney 기능을 사용하려면 서버에서 지원하는 기술을 오프로드 네트워크 어댑터가 있어야 합니다.

네트워크 추적을 사용하여 TCP Chimney 기능을 사용할 수 있는지 여부를 확인하는 방법

TCP Chimney 기능을 사용하는 경우 직접 서버의 네트워크 추적을 캡처하면 네트워크 추적 3방향 핸드셰이크는 TCP 및 UDP 트래픽을 포함합니다. TCP/IP 스택이 해당 특정 부분을 무시할 네트워크 트래픽을 TCP Chimney 기능을 수 있기 때문에 네트워크 추적을 다른 트래픽이 포함되어 있지 않습니다. 패킷을 캡처하는 드라이버를 TCP/IP 스택의 해당 특정 부분에 위치합니다.

Microsoft의 현재 보기를 게시 날짜를 기준으로 이 문제에 대한 정보와 이 문서 솔루션에서 나타냅니다. 이 솔루션은 Microsoft 또는 타사 공급자를 통해 사용할 수 있습니다. Microsoft에서는 타사 공급자 또는 이 문서에서는 타사 솔루션을 특별히 권장하지 않습니다. 또한 있을 다른 타사 공급자나 타사 솔루션이 이 문서에서는 설명하지 않습니다. Microsoft는 변화하는 시장 환경에 대처해야 하므로 이 정보는 사용하여 약정 수 있도록 Microsoft에서 해석해서는 안. Microsoft 보장할 수 또는 모든 정보 또는 Microsoft 또는 언급한 타사 공급자에 의해 제시된 솔루션의 정확도를 보호인 수 없습니다. 

Microsoft는 어떠한 수 있으며 모든 표현, 보증 및 조건을 명시적, 묵시적 또는 법정 여부를 제외합니다. 이러한 포함되어 있지만 표현, 보증, 또는 제목, 권리 비침해를, 만족스러운 조건, 상품성, 및 모든 서비스, 솔루션, 제품, 또는 기타 자료를 또는 정보를 관련하여 특정 목적에의 적합성에 대한 조건이 제한되지 않습니다. 어떠한 경우에도 Microsoft이 이 문서에서는 포함되지는 몇 가지 설명합니다 타사 솔루션을 지지 것입니다.
posted by LifeisSimple
2012. 1. 24. 15:34 Brain Trainning/DataBase

다음과 같은 에러가 발생하는 경우가 있습니다. 

A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 121, output error: 0).

TCP Chimney Offload 기능을 활성화 했을 경우 Network 카드가 CPU에서 처리해야할 일부 기능을 분담해 시스템 부하를 줄여주는 역할을 하는데 일정이상의 네트웍부하가 있을 경우 이로 인해 네트웍에 문제가 생기는 경우가 있습니다. 때문에 DB 같이 중요한 시스템에서는 이 기능으로 인한 오류를 방지하기 위해 OFF 해야 합니다. 

참고 : 

TCP Chimney 오프로드는 네트워크를 통한 데이터 이동 관련 작업을 호스트 컴퓨터의 CPU에서 네트워크 어댑터로 오프로드할 수 있게 해주는 네트워킹 기술입니다. 이 기술을 사용하면 관리 효율성이나 보안에 손실을 주거나 추가 프로그램 사용하지 않고도 컴퓨터 또는 서버의 네트워크 데이터 처리 작업을 향상시킬 수 있습니다. 현재 네트워크 처리 오버헤드로 제한을 받는 프로그램도 TCP Chimney 오프로드와 함께 사용할 경우 일반적으로 더 잘 조정됩니다.

Microsoft 제품에 포함되어 있는 TCP 오프로드 기술 부분은 Alacritech와의 사용권 계약에 따라 사용되고 있으며 6,226,680, 6,247,060, 6,334,153, 6,389,479, 6,393,487, 6,427,171, 6,427,173, 6,434,620, 6,591,302, 6,658,480, 6,697,868, 6,751,665, 또는 6,757,746 등의 미국 특허 중 하나 이상에서 다룰 수 있습니다. Microsoft는 Alacritech의 특허에 의한 사용권을 갖고 있지 않아 하드웨어 부분에 오프로딩 기능을 구현할 수 없습니다. 이는 Alacritech의 특허 기술을 사용하기 위해 특별히 고안된 하드웨어에서 TCP 오프로드 기술을 사용하거나 판매하기 위한 사용권을 Alacritech 특허에서 허가받지 못했음을 명시적으로나 암시적으로 동의하고 인지한 것입니다.

자세한 정보는 Microsoft 웹 사이트의 TCP Chimney 라이선싱을 참조하십시오.


따라서, 아래와 같이 조치합니다.

Windows Server 2008 TCP Chimney 오프로드, 수신측 배율 및 네트워크 직접 메모리 액세스 기능에 대한 정보

이 페이지에서

소개

이 문서에서는 Windows Server 2008에서 TCP/IP 프로토콜에 대해 사용할 수 있는 TCP Chimney 오프로드, RSS(수신측 배율) 및 NetDMA(네트워크 직접 메모리 액세스) 기능에 대해 설명합니다.

추가 정보

TCP Chimney 오프로드 개요

TCP Chimney 오프로드는 네트워크 데이터 전송 동안 CPU의 작업을 네트워크 어댑터로 전송하는 데 도움을 주는 네트워킹 기술입니다. Windows Server 2008에서 TCP Chimney 오프로드는 Windows 네트워킹 하위 시스템이 TCP/IP 연결 처리를 특수한 TCP/IP 오프로드 처리를 지원하는 네트워크 어댑터로 오프로드할 수 있도록 합니다.

TCP Chimney 오프로드는 모든 버전의 Windows Server 2008 및 Windows Vista에서 사용할 수 있습니다. 네트워크 어댑터에서 해당 기능을 지원하기만 하면 TCP/IPv4 연결과 TCP/IPv6 연결 모두 오프로드될 수 있습니다.

Windows Server 2008에서 TCP Chimney 오프로드를 사용하거나 사용하지 않도록 설정하는 방법

TCP Chimney 오프로드는 다음 두 위치에서 사용하거나 사용하지 않도록 설정할 수 있습니다.
  • 운영 체제
  • 네트워크 어댑터의 고급 속성 페이지
TCP Chimney 오프로드는 두 위치에서 모두 사용하도록 설정되어야만 작동합니다. 기본적으로 TCP Chimney 오프로드는 이 두 위치에서 사용하지 않도록 설정되어 있습니다. 그러나 OEM 설치는 운영 체제, 네트워크 어댑터 또는 운영 체제와 네트워크 어댑터 모두에서 TCP Chimney 오프로드를 사용하도록 설정할 수 있습니다.

운영 체제에서 TCP Chimney 오프로드를 구성하는 방법

  • TCP Chimney 오프로드를 사용하도록 설정하려면 다음과 같이 하십시오.
    1. 관리 자격 증명을 사용해서 명령 프롬프트를 엽니다.
    2. 명령 프롬프트에서 다음 명령을 입력한 후 Enter 키를 누릅니다.
      netsh int tcp set global chimney=enabled
  • TCP Chimney 오프로드를 사용하지 않도록 설정하려면 다음과 같이 하십시오.
    1. 관리 자격 증명을 사용해서 명령 프롬프트를 엽니다.
    2. 명령 프롬프트에서 다음 명령을 입력한 후 Enter 키를 누릅니다.
      netsh int tcp set global chimney=disabled
  • TCP Chimney 오프로드의 현재 상태를 확인하려면 다음과 같이 하십시오.
    1. 관리 자격 증명을 사용해서 명령 프롬프트를 엽니다.
    2. 명령 프롬프트에서 다음 명령을 입력한 후 Enter 키를 누릅니다.
      netsh int tcp show global

네트워크 어댑터에서 TCP Chimney 오프로드를 구성하는 방법

  • TCP Chimney 오프로드를 사용하거나 사용하지 않도록 설정하려면 다음과 같이 하십시오.
    1. 장치 관리자를 엽니다.
    2. 네트워크 어댑터에서 원하는 네트워크 어댑터를 두 번 클릭합니다.
    3. 고급 탭에서 TCP 오프로드 항목 옆에 있는 사용 또는 사용 안 함 확인란을 클릭합니다. 

      참고 제조업체마다 다른 용어를 사용해서 네트워크 어댑터의 고급 속성 페이지에서 TCP Chimney 오프로드를 기술할 수 있습니다.

TCP Chimney 오프로드가 다른 프로그램 및 서비스와 공존하는 방식

TCP Chimney 오프로드 기술은 지정된 TCP 연결에 대한 TCP/IP 처리를 전용 네트워크 어댑터로 오프로드할 때 네트워킹 하위 시스템의 하위 계층 서비스에 의존하는 다른 프로그램이나 서비스와 공존해야 합니다. 다음 표에는 TCP Chimney 오프로드가 다른 프로그램 및 서비스와 공존하는 방식이 나와 있습니다.
프로그램 또는 서비스TCP Chimney 오프로드에서 작동하는 방법해당 서비스와 TCP Chimney 오프로드가 둘 다 사용하도록 설정되어 있을 때 예상되는 동작
Windows 방화벽 방화벽이 지정된 TCP 연결에 사용되도록 구성되면 TCP/IP 스택은 해당 TCP 연결을 네트워크 어댑터로 오프로드합니다.
타사 방화벽 구현별 일부 방화벽 공급업체는 방화벽 서비스가 실행되는 동안 TCP Chimney 오프로드가 사용될 수 있는 방식으로 제품을 구현하기로 결정했습니다. 방화벽 설명서에서 사용 중인 제품이 TCP Chimney 오프로드를 지원하는지 여부를 확인하십시오.
IPsec(인터넷 프로토콜 보안) 정책 아니오 시스템에 IPsec 정책이 적용된 경우 TCP/IP 스택은 TCP 연결을 오프로드하려고 하지 않습니다. 따라서 IPsec 계층은 모든 패킷을 검사하여 원하는 보안을 제공할 수 있습니다.
네트워크 어댑터 팀 서비스(이 서비스를 부하 분산 및 장애 조치 서비스라고도 합니다. 이 서비스는 일반적을 OEM에서 제공합니다.) 구현별 일부 OEM에서는 TCP Chimney 오프로드와 공존할 수 있도록 네트워크 어댑터 팀 솔루션을 구현하기로 결정했습니다. TCP Chimney 오프로드를 네트워크 어댑터 팀 서비스와 함께 사용할 수 있는지 확인하려면 이 서비스 설명서를 참조하십시오.
Windows 가상화(Hyper-V 기술) 아니오 Microsoft Hyper-V 기술을 사용해서 가상 시스템을 실행하는 경우 운영 체제에서 TCP Chimney 오프로드를 활용하지 못합니다.
네트워크 모니터링 도구(예: 네트워크 모니터 및 Wireshark) 구현별 일부 네트워크 모니터링 도구는 TCP Chimney와 공존할 수 있지만 오프로드된 연결을 모니터링하지 못할 수 있습니다.
NLB(네트워크 부하 분산) 서비스 아니오 서버에서 NLB 서비스를 구성하는 경우 TCP/IP 스택은 TCP 연결을 오프로드하지 않습니다.
클러스터 서비스 그러나 Network 내결함성 드라이버(NetFT.sys)를 사용하는 TCP 연결은 오프로드되지 않습니다. NetFT는 내결함성 노드 간 클러스터 통신에 사용됩니다.
NAT(네트워크 주소 변환) 서비스(인터넷 연결 공유 서비스라도고 함) 아니오 이 서비스가 설치 및 실행되고 있는 경우 TCP/IP 스택은 연결을 오프로드하지 않습니다.

TCP Chimney 오프로드가 작동하는 방식을 확인하는 방법

운영 체제 및 네트워크 어댑터에서 TCP Chimney 오프로드가 사용 가능하게 설정되면 TCP/IP 스택은 적절한 TCP 연결을 네트워크 어댑터로 오프로드하려고 합니다. 시스템에서 현재 설정되어 있는 TCP 연결 중에서 오프로드된 연결을 확인하려면 다음과 같이 하십시오.
  1. 관리 자격 증명을 사용해서 명령 프롬프트를 엽니다.
  2. 다음 명령을 입력하고 Enter 키를 누릅니다.
    netstat –t
    다음과 비슷한 결과가 표시됩니다.
    Active Connections
    
      Proto  Local Address          Foreign Address        State           Offload State
    
      TCP    127.0.0.1:52613        computer_name:52614       ESTABLISHED     InHost TCP    192.168.1.103:52614        computer_name:52613       ESTABLISHED     Offloaded
    이 출력에서는 두 번째 연결이 오프로드되었습니다.
Windows Server 2003의 TCP Chimney 오프로드에 대한 자세한 내용은 다음 문서 번호를 클릭하여 Microsoft 기술 자료 문서를 참조하십시오.
912222  Microsoft Windows Server 2003 Scalable Networking Pack 릴리스

Windows Server 2008에서 RSS를 사용하거나 사용하지 않도록 설정하는 방법

RSS를 사용하도록 설정하려면 다음과 같이 하십시오.
  1. 관리 자격 증명을 사용해서 명령 프롬프트를 엽니다.
  2. 명령 프롬프트에서 다음 명령을 입력한 후 Enter 키를 누릅니다.
    netsh int tcp set global rss=enabled
RSS를 사용하지 않도록 설정하려면 다음과 같이 하십시오.
  1. 관리 자격 증명을 사용해서 명령 프롬프트를 엽니다.
  2. 명령 프롬프트에서 다음 명령을 입력한 후 Enter 키를 누릅니다.
    netsh int tcp set global rss=disabled
RSS의 현재 상태를 확인하려면 다음과 같이 하십시오.
  1. 관리 자격 증명을 사용해서 명령 프롬프트를 엽니다.
  2. 명령 프롬프트에서 다음 명령을 입력한 다음 Enter 키를 누릅니다.
    netsh int tcp show global
명령을 사용하여 RSS를 사용하도록 설정할 경우 다음 메시지가 표시됩니다.
TCP Global Parameters ---------------------------------------------- Receive-Side Scaling State : enabled
참고 기본적으로 RSS는 사용하도록 설정되어 있습니다.

Windows Server 2008에서 NetDMA를 사용하거나 사용하지 않도록 설정하는 방법

저희가 NetDMA를 사용하거나 사용하지 않게 설정하도록 하려면 "해결 지원" 절로 이동하십시오. NetDMA를 사용하거나 사용하지 않도록 직접 설정하려면 "직접 해결" 절로 이동하십시오.

해결 지원



이 문제를 자동으로 해결하려면 Fix it 단추나 링크를 클릭합니다. 파일 다운로드 대화 상자에서실행을 클릭하고 Fix it 마법사의 단계를 따릅니다.


NetDMA 사용 
Microsoft Fix it 50610
NetDMA 사용 안 함 
Microsoft Fix it 50611


참고
  • NetDMA 사용 패키지가 작동하는지 확인하려면 NetDMA 기능을 상요하도록 설정해야 합니다. NetDMA 사용에 대한 자세한 내용을 보려면 다음 링크를 클릭하십시오.
  • 이 마법사는 영어로만 제공될 수 있습니다. 그러나 다른 언어 버전의 Windows에서도 자동 해결 기능을 사용할 수 있습니다.
  • 현재 문제가 있는 컴퓨터에서 작업하고 있지 않은 경우 Fix it 솔루션을 플래시 드라이브 또는 CD에 저장한 후 문제가 있는 컴퓨터에서 실행하십시오.

그런 다음 "문제가 해결되었습니까?" 절로 이동하십시오.



직접 해결

NetDMA를 사용하거나 사용하지 않도록 설정하려면 다음과 같이 하십시오.
  1. 시작실행을 차례로 클릭하고 regedit를 입력한 다음 확인을 클릭합니다.
  2. 다음 레지스트리 하위 키를 찾아 클릭합니다.
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  3. EnableTCPA 레지스트리 항목을 두 번 클릭합니다.
    참고 이 레지스트리 항목이 없으면 매개 변수를 마우스 오른쪽 단추로 클릭하고 새로 만들기를 가리킨 후 DWORD 값을 클릭하고 EnableTCPA를 입력한 후 Enter 키를 누릅니다.
  4. NetDMA를 사용하도록 설정하려면 값 데이터 상자에 1을 입력한 후 확인을 클릭합니다.
  5. NetDMA를 사용하지 않도록 설정하려면 값 데이터 상자에 0을 입력한 후 확인을 클릭합니다.
  6. EnableTCPA 레지스트리 항목이 없는 경우 NetDMA 기능을 사용하도록 설정해야 합니다.

문제가 해결되었습니까?

  • 문제가 해결되었는지 확인합니다. 문제가 해결되었다면 이 절에서 설명한 작업이 끝난 것이지만 문제가 해결되지 않은 경우에는 기술 지원 서비스에 문의할 수 있습니다.
  • 의견을 보내 주셔서 감사합니다. 의견을 보내거나 이 해결 방법에 대한 문제점을 보고하려면 "Fix it for me" 블로그에 의견을 남겨 주시거나 전자 메일 메시지를 보내 주십시오.
이 문서에 나와 있는 타사 제품은 Microsoft와 무관한 회사에서 제조한 것입니다. Microsoft는 이들 제품의 성능이나 신뢰성에 관하여 명시적이든 묵시적이든 어떠한 보증도 하지 않습니다.

본 문서의 정보는 다음의 제품에 적용됩니다.
키워드: 
kbenable kbnetworkmon kbnlb kbnetworkcard kbnetworkconnectivity kbexpertiseadvanced kbinfo kbhowto kbfixme kbmsifixme KB951037
posted by LifeisSimple