오늘 무엇을 도와드릴까요?

Database maintenance jobs failing with error: The current database does not contain a file named 'tempdev'

Issue
The three maintenance jobs are failing with the following error:

An error occurred during the execution of the Maintenance task for ION_Network: Microsoft.SqlServer.Management.PowerShell.SqlPowerShellSqlExecutionException: The current database does not contain a file named 'tempdev'. DBCC execution completed. If DBCC printed error messages, contact your system administrator.

The error refers to the tempdev database.

Product Line

Power Monitoring Expert 7.2.x

Power Monitoring Expert 8.x

Power Monitoring Expert 9.0

Power Monitoring Expert 2020

Power Monitoring Expert 2021

Power Monitoring Expert 2022

Power Monitoring Expert 2023

Power Monitoring Expert 2024


Environment

SQL Server


Cause
Database maintenance jobs use stored procedure.  Two of the stored procedures check the size of TempDB by referring to it by its logical name.  Since the logical name is modified, the stored procedures fail to find the database.  As a result, the maintenance jobs fail.

By default TempDB has one data file (.MDF) and one log file (.LDF), with each having a physical and a logical name.  The logical file name is tempdev as shown below:

Database Properties


TempDB can be modified to include multiple data and log files.  As such, each file will have a unique logical name.  Below is an example were TempDB consists of four data files and one log file:

Logical FilePhysical File
tempdev_primary_01tempdb_primary_01.mdf
tempdev_primary_02tempdb_primary_02.ndf
tempdev_primary_03tempdb_primary_03.ndf
tempdev_primary_04tempdb_primary_04.ndf
tempdb_log_01templog.ldf


As can be seen, the logical file names have changed.




Resolution

Warning: Irreparable database damage can occur. This procedure should only be performed by DBAs or users familiar with SQL Server Management studio with extensive knowledge of database structure. Databases should be backed up before performing this procedure.


Warning: Disabling this check could lead to drives filling up.  Please make sure there will always be sufficient space prior to eliminating this check



Since the code within the software which refers to tempdev, cannot be modified, there is no resolution.  However, there is a workaround which requires eliminating the TempDB size check.

For each of the three ION databases, modify these two stored procedures:
dbo.DefragIndexAll
dbo.UpdateStatisticsAll

By commenting out the following line using '--' at the beginning of the line:
EXEC ChkTempSpace


Here is an example showing the line has been commented out:

Script


슈나이더 일렉트릭 Korea

자세히 알아보기
제품군
자세히 알아보기
제품군

도움이 필요하신가요?

도움이 필요하신가요?

제품 선택기

제품 선택기

애플리케이션에 적합한 제품과 액세서리를 빠르고 쉽게 찾을 수 있습니다.

견적 받기

견적 받기

영업 관련하여 온라인으로 문의하시면 전문가가 연락드립니다.

구매처

구매처

해당 지역의 가장 가까운 슈나이더 일렉트릭 대리점을 쉽게 찾을 수 있습니다.

지원 센터

지원 센터

한 곳에서 모든 요구 사항에 대한 지원 리소스를 찾아보십시오.

  • 제품 문서
  • 소프트웨어 다운로드
  • 제품 선택기
  • 제품 대체 및 교체
  • 지원 및 연락처 센터
  • 영업소 검색
  • 견적 받기
  • 슈나이더 일렉트릭 커뮤니티
  • 채용
  • 회사 소개
  • 부정 행위 보고
  • 접근성
  • 뉴스룸
  • 투자자
  • Ecostruxure
  • 작업 검색
  • 블로그
  • 개인정보 취급방침
  • 쿠키 공지
  • 사용 약관
  • Change your cookie settings