MS SQL Server Tips

  • INF: How to Shrink the SQL Server 7.0 Transaction Log
    DBCC SHRINKFILE 명령 또는 DBCC SHRINKDATABASE 명령을 사용할 때 트랜잭션 로그가 줄어들지 않는 일반적인 이유가 몇 가지 있다. 본 문서에서는 이에 대해 간략하게 설명하며, SQL Server Books Online의 “DBCC SHRINKFILE” 및 “DBCC SHRINKDATABASE” 항목에서 자세하게 다룬다.
  • Exporting Data Programmatiaclly with bcp and xp_cmdshell
    This article demonstrates how to programmatically control bcp to generate text files. It uses dynamic SQL and xp_cmdshell to execute a call to bcp from within Query Analyzer.

MS SQLServer에서 인덱스 최대길이

오늘 MS SQLServer에서 쿼리를 하다가 다음의 오류를 만났다.

The index entry of length 934 bytes for the index ‘Table_IDX’ exceeds the maximum length of 900 bytes.

처음보는 오류다. 구글을 뒤져보니 MS SQLServer 인덱스의 최대길이 제한이 있었고, 그 길이는 900 바이트였다. 그랬군… 다음은 SQL Server 7.0과 2000의 제한 내용이다.

사용자 삽입 이미지