CDC (변경 데이터 캡처)를 사용하는 SQL Server 2008 R2 (SP 1)에 호스트 된 SQL Server 데이터베이스가 있습니다.데이터베이스를 SQL Server 2008 R2 인스턴스에 연결하면 CDC가 실패합니다.
적법
그러나 라이센스 만료 (배포 팀이 올바른 라이센스를 설치하는 것을 잊었다 :() 우리가 새로 설치된 인스턴스에 데이터베이스를 연결.에 SQL Server 인스턴스의 재 설치 후, CDC이었다 우리는 우리가
The database 'DBName' is not enabled for Change Data Capture. Ensure that the correct database context is set and retry the operation. To report on the databases enabled for Change Data Capture, query the is_cdc_enabled column in the sys.databases catalog view.
Sugg을 가지고
sys.sp_cdc_enable_table
을 실행하여 기능을 활성화했을 때 모든 테이블 를 사용할 수 없습니다 CDC가 활성화되지 않았다고 추측합니다. 우리가 가진
sys.sp_cdc_disable_db
을 실행하여 CDC를 해제하려고 한 후
Msg 22906, Level 16, State 1, Procedure sp_cdc_enable_db_internal, Line 49
The database 'DBName' cannot be enabled for Change Data Capture because a database user named 'cdc' or a schema named 'cdc' already exists in the current database. These objects are required exclusively by Change Data Capture. Drop or rename the user or schema and retry the operation.
:
그래서, 우리는
sys.sp_cdc_enable_db
을 실행하여 활성화하려고 우리는 다음과 같은 오류가 발생했습니다 오류가 다시 같은 오류 :
The database 'DBName' is not enabled for Change Data Capture. Ensure that the correct database context is set and retry the operation. To report on the databases enabled for Change Data Capture, query the is_cdc_enabled column in the sys.databases catalog view.
내 생각 엔 DB 시스템 테이블과 SQL 서버 시스템 테이블 사이에 CDC의 유효하지 않은 상태로 연결되는 일부 불일치가 있다고 생각됩니다.
해결할 방법이 있습니까?
의견을 보내 주시면 감사하겠습니다.
제외하고 잘 작동하는 내 경우에는, 전혀 규칙이없는 경우 내가 NULL을 얻으면이 문은 실패합니다 ... EXEC ('ROLE :: ALTER AUTHORIZATION ON ROLE ::'+ @ ruleName + 'TO dbo;') –