'SQL Server 2012'에 해당되는 글 35건

  1. [펌] Why ROWLOCK Hints Can Make Queries Slower and Blocking Worse in SQL Server
  2. sys.dm_exec_describe_first_result_set
  3. SQL2012에서 SHA2_256, SHA2_512 추가
  4. 왜 병렬로 안 풀리니?
  5. SQL2012 Server 리붓 후 identity 갭 현상
  6. 스케쥴링 할당 방법 SQL2012 EE 버젼 변경
  7. SQL Server 2012 Memory
  8. 템플릿 매개변수값 설정 바로가기 키 설정
  9. change partitioned table in sql2012
  10. Indirect Checkpoint.


LOCK_ESCALATION Disable 이슈 및 RowLock 힌트로 인한 슬로우 쿼리 발생 가능.
https://www.littlekendra.com/2016/02/04/why-rowlock-hints-can-make-queries-slower-and-blocking-worse-in-sql-server/




프로시져 결과셋에 대한 컬럼명, 타입 정보 확인 가능. @@ 좋다~~
SQL2012+ 만 가능
http://msdn.microsoft.com/ko-kr/library/Ff878258(v=sql.110).aspx

http://beyondrelational.com/modules/4/whatisnew/361/features/7155/hashbytes-function-supports-2-more-algorithms-in-sql-server-2012.aspx

msdn 참고 : http://technet.microsoft.com/ko-kr/library/ms174415.aspx

	DECLARE @HashThis nvarchar(4000),
		@HashKey varbinary(1000);
	
	SELECT @HashThis = CONVERT(nvarchar(4000),'dslfdkjLK85kldsdfasdfasdfdsfasdfasdfhnv$n000#knf');
	SELECT @HashKey = HASHBYTES('SHA2_256', @HashThis);

	SELECT @HashKey, DATALENGTH(@HashKey);		-- return size 256 bit, 32 byte 


왜 병렬로 안 풀리니?

http://blogs.msdn.com/b/psssql/archive/2013/08/28/i-want-to-know-why-my-query-is-not-parallelized.aspx

SQL2012에서 강화된 기능인데요. 병렬로 플랜이 왜 안풀리는지 XML 실행 계획으로 확인할 수 있다.
Query Plan "NonParallelPlanReason" 속성을 찾아봐라..


<Statements>     

<StmtSimple StatementText="select
* from sys.objects option (maxdop 1)" StatementId="1" StatementCompId="1" StatementType="SELECT" RetrievedFromCache="false" StatementSubTreeCost="0.107922" StatementEstRows="2201" StatementOptmLevel="FULL" QueryHash="0xC34FFA269AC9A844" QueryPlanHash="0x39C2C734F752156C" StatementOptmEarlyAbortReason="GoodEnoughPlanFound">

         
<StatementSetOptions QUOTED_IDENTIFIER="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" NUMERIC_ROUNDABORT="false" />

         
<QueryPlan NonParallelPlanReason="MaxDOPSetToOne" CachedPlanSize="96" CompileTime="6" CompileCPU="6" CompileMemory="824">


병렬 실행 계획이 생성되지 않은 이유

  1. MaxDOPSetToOne:   Max Degree of Parallelism set to 1 at query or server level
  2. NoParallelDynamicCursor:  Dynamic cursor doesn’t support parallel plan
  3. NoParallelFastForwardCursor:  Fast Forward cursor doesn’t support parallel plan
  4. NoParallelCreateIndexInNonEnterpriseEdition:   We don’t’ support parallel index operations for non Enterprise editions
  5. NoParallelPlansInDesktopOrExpressEdition:  No parallel plan for express edition  (SQL 2000 desktop edition is the same as
    express edition for later builds)
  6. TSQLUserDefinedFunctionsNotParallelizable:  Scalar TSQL user defined function used in the query
  7. CLRUserDefinedFunctionRequiresDataAccess:  If a CLR user defined function ends up access data via context connection, the query can’t be parallelized.  But a CLR user defined function that doesn’t do data access via context connection can be parallelized.
  8. NoParallelForMemoryOptimizedTables:  This is for any query accessing memory optimized tables (part of SQL 2014 in-memory OLTP feature)


안녕하세요. 주디아줌마입니다.

 SQLTAG 회원으로 부터 SQL2012 버전에서 IDENTITY 컬럼에 대한 이슈가 야그가 나왔습니다. 먼 문제인가면~ Identity Column에 대한 증가값이 재 시작 후 갑자기 증가 되더라 입니다.

   

테스트 해보았을 때 대략 10000 이상 증가 되더군요.(증가된 값을 대중 없는 듯..)

CONNECT 에서 이 문제에 대해서 https://connect.microsoft.com/SQLServer/feedback/details/739013/alwayson-failover-results-in-reseed-of-identity 확인됩니다.

민석오빠 정리 http://sqlsql.tistory.com/271
INSERT 성능 향상을 위한 기능 
This reduces the amount and frequency of information written to the transaction log improving insert scalability.



http://technet.microsoft.com/ko-kr/library/ms186775.aspx
 SQL2012 IDENTITY MSDN에서 확인해 볼 수 있습니다.

   

해결 방법
http://www.big.info/2013/01/how-to-solve-sql-server-2012-identity.html
 

  1. trace flag 272 설정

       

  2. SEQUENCE의 NOCACHE 옵션 사용
     

   

   

http://blogs.msdn.com/b/psssql/archive/2013/08/13/how-it-works-sql-server-2012-database-engine-task-scheduling.aspx

SQL Server 2012 EE SKU

Starting with SQL Server 2012 EE SKU the behavior changes for a new task  (Batch, RPC, Disconnect, …) only after the connection has been established and pool assignment made.   (No connection no preferred scheduler yet!)

Note: Even if the RG is disabled the DEFAULT pool is used internally.  


구글 번역

SQL 서버 2012 EE SKU 연결이 설정되고 풀 할당 한 후에 만 새 작업의 동작 변경 (배치, RPC, 연결 끊기, ...)로 시작 -

SQL Server 2012 Memory

나는 현재 SQL2012 버전을 가지고 사용 중이다.

매개 변수값 설정해줘야 하는 바로가기 버튼이 안 먹는 것이다. 2008까지 썼던 것 같은데.. 점점 사용하기 힘들어지는 군…

참고 링크

http://stackoverflow.com/questions/1250120/ctrl-shift-m-no-longer-working-in-sql-server-management-studio

   

SSMS의 도구>옵션 선택

   

순서

  • 키보드 > 키보드 선택
  • "다음 문자열을 포함하는 명령 표시" 항목에 매개를 선택
  • "쿼리.템플릿매개변수값지정"을 선택 -> 새 바로가기 사용 위치. 전역 선택 -> 바로 가기 키 누르기에서 CTRL+SHIFT+M을 선택하고 확인을 누르면 된다.

http://blogs.msdn.com/b/psssql/archive/2013/03/19/sql-server-2012-partitioned-table-statistics-update-behavior-change-when-rebuilding-index.aspx

If a table is partitioned, ALTER INDEX REBUILD will only update statistics for that index with default sampling rate.  In other words, it is no longer a FULLSCAN.  This is documented in http://technet.microsoft.com/en-us/library/ms188388.aspx.  But lots of users do not realized that.  If you want fullscan, you will need to run UPDATE STATISTCS WITH FULLSCAN.   This change was made because we started to support large number of partitions up to 15000 by default.

Indirect Checkpoint.