2009. 7. 12. 23:27

64bit Standard 에디션 에서 "Lock Page in memory" 가능

SQL SERVER 2005 이상

좋은 소식!!

 

이제 2005, 2008의 스탠다드 에디션에서도 Locak Page Memory 사용이 가능해 졌다.

 

CU2 for SQL Server 2008 SP1 => http://support.microsoft.com/kb/970315/en-us

http://support.microsoft.com/kb/970279/ko
CU4 for SQL Server 2005 SP3 => http://support.microsoft.com/kb/970279/en-us

http://support.microsoft.com/kb/970279/ko

 

 

How to enable "Lock pages in Memory" at the Windows level:

  1. On the Start menu, click Run. In the Open box, type gpedit.msc. The Group Policy dialog box opens.
  2. On the Group Policy console, expand Computer Configuration, and then expand Windows Settings.
  3. Expand Security Settings, and then expand Local Policies.
  4. Select the User Rights Assignment folder. The policies will be displayed in the details pane.
  5. In the pane, double-click Lock pages in memory.
  6. In the Local Security Policy Setting dialog box, click Add.
  7. In the Select Users or Groups dialog box, add the account that runs the SQL Server Service.
  8. Restart the machine for these changes to take effect.

If you are running an Enterprise or Developer Edition of SQL Server 2005 or 2008, please stop here. The rest of the steps are for the Standard Edition Only.

  1. Ensure that the build of SQL Server 2008 is Cumulative Update 2 on Service Pack 1. Preferably, run the "select @@version" command against the SQL Server Instance and verify that the build is 10.00.2714.00. In case of SQL Server 2005, please verify that the build is 9.00.4226.
  2. Now  set  the  Trace  Flag  845 as a  startup trace flag. This can be done by adding
    -T845 to the startup parameters from the SQL Server Configuration Manager. Please refer to the screenshot below:

    SQLConfigManager
  3. Restart the SQL Server Service.
  4. Verify that the following message is written in the SQL Server ErrorLog file at startup:
            Using locked pages for buffer pool

Note: Enabling Locked Pages may have a negative performance impact on your system performance. Please consider all potential effects before you use this option.
Enabling this trace flag on the Enterprise Edition or the Developer Edition has no effect.

 

 

2009. 7. 8. 23:42

에러::64bit 버퍼 풀 페이징

증상

 

  • 미러링 걸려있던 DB의 로그가 90% 이상.
  • 활성 트랜잭션이 없음에도  log 백업을 해도 로그가 줄어들지 않음
  • 주 서버에서 미러가 일시 중지됨
  • 파트너 서버에 에러 로그 파일 에 아래 errorlog 발생

2009-07-05 05:39:01.050spid1sA significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 0 seconds. Working set (KB): 263552, committed (KB): 528496, memory utilization: 49%.

2009-07-05 05:46:21.370spid1sA significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 0 seconds. Working set (KB): 265520, committed (KB): 527400, memory utilization: 50%.


2009-07-05 07:28:27.210spid27sError: 1204, Severity: 19, State: 4.

2009-07-05 07:28:27.210spid27sThe instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time.

Rerun your statement when there are fewer active users. Ask the database administrator to check the lock and memory configuration for this instance, or to check for long-running transactions.

2009-07-05 07:28:27.320spid27sError: 1454, Severity: 16, State: 1.

2009-07-05 07:28:27.320spid27sWhile acting as a mirroring partner for database 'DB명', server instance '주서버명' encountered error 1204, status 4, severity 19. Database mirroring will be suspended.  Try to resolve the error and resume mirroring.

2009-07-05 07:28:27.820spid27sDatabase mirroring is inactive for database 'DB명'. This is an informational message only. No user action is required.

 

(주서버)

2009-07-05 07:28:27.920spid34sError: 1453, Severity: 16, State: 1.

2009-07-05 07:28:27.920spid34s'TCP://정보', the remote mirroring partner for database 'DB명', encountered error 1204, status 4, severity 19. Database mirroring has been suspended.  Resolve the error on the remote server and resume mirroring, or remove mirroring and re-establish the mirror server instance.

 

원인

  • significant part of sql server process memory has been paged out. This may result in a performance degradation.
  • Windows 운영체제 페이지를 SQL Server 프로세스의 작업 집한 제한  때문에 발생합니다.
  • 데이터베이스 엔진 오류 : 1204
  • SQL Server 데이터베이스 엔진 인스턴스에서 지금 LOCK 리소스를 가져올 수 없습니다. 활성 사용자가 적을 때 문을 다시 실행하십시오. 데이터베이스 관리자에게 이 인스턴스의 잠금 및 메모리 구성이나 장기 실행 트랜잭션을 확인하도록 요청하십시오.
  • max server memory 옵션 증가시킴

select request_session_id, count(*) num_locks from sys.dm_tran_locks  group by request_session_id order by count(*) desc
  • 위는 전부 페이지 잠금 문제로 발생 했다.

 

해결

  1. 시작 을 클릭하고 실행 을 클릭합니다 gpedit.msc 를 입력한 다음 확인 을 클릭하십시오. 그룹 정책 대화 상자가 나타납니다.
  2. 확장 컴퓨터 구성 를 확장한 다음 Windows 설정 .
  3. 보안 설정 을 확장한 다음 로컬 정책 을 확장하십시오.
  4. 사용자 권한 할당 을 클릭한 다음 메모리의 페이지 잠그기 두 번 클릭하십시오.
  5. 로컬 보안 정책 설정 대화 상자에서 사용자 또는 그룹 추가 클릭합니다.
  6. 사용자 또는 그룹 선택 대화 상자에서 Sqlservr.exe 파일을 실행할 권한이 있는 계정을 추가하고 확인 을 클릭하십시오.
  7. 그룹 정책 대화 상자를 닫습니다.
  8. SQL Server 서비스를 다시 시작하십시오