Error: "(ALTER DATABASE Failed Because FILESTREAM Filegroups Cannot Be Added to a Database That Has Either the READ_COMMITTED_SNAPSHOT or the ALLOW_SNAPSHOT_ISOLATION Option Set to ON" When Upgrading a P6 EPPM Database Using Dbsetup.bat (Doc ID 2180591.1)

Last updated on SEPTEMBER 20, 2016

Applies to:

Primavera P6 Professional Project Management - Version 15.1.0.0 and later
Primavera P6 Enterprise Project Portfolio Management - Version 15.1.0.0 and later
Information in this document applies to any platform.

Symptoms

When upgrading a P6 EPPM database to 16.1.0 or later using dbsetup.bat, on a SQL Server DB instance, the following error is observed:

Error in Run SQL Script SSPM_P152.sql : DatabaseToolException (ALTER DATABASE failed because FILESTREAM filegroups cannot be added to a database that has either the READ_COMMITTED_SNAPSHOT or the ALLOW_SNAPSHOT_ISOLATION option set to ON.To add FILESTREAM filegroups, you must set READ_COMMITTED_SNAPSHOT and ALLOW_SNAPSHOT_ISOLATION to OFF.)for query::declare @v_streamfile_path nvarchar(300), @v_streamfile_path_name nvarchar(300), @v_sql nvarchar(4000), @FILE_CNT int; DECLARE @DB_NAME sysname SELECT @FILE_CNT=COUNT(*) FROM master.sys.master_files WHERE NAME ='fs_file1'; IF @FILE_CNT = 0 BEGIN SELECT @DB_NAME=DB_NAME() set @v_streamfile_path=(SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1) FROM master.sys.master_files WHERE database_id = 1 AND file_id = 1); set @v_streamfile_path_name=@v_streamfile_path + 'filestream_doc.mdf'; SET @v_sql = 'alter database ' + @DB_NAME + ' add filegroup '+ @DB_NAME +'_fs_files contains filestream' EXEC (@v_sql) SET @v_streamfile_path_name= @v_streamfile_path +@DB_NAME +'_fs_doc.mdf' SET @v_sql = 'ALTER DATABASE '+ @DB_NAME +' ADD FILE (NAME= ''fs_file1'',FILENAME = '''+@v_streamfile_path_name+''') TO FILEGROUP '+ @DB_NAME +'_fs_files' EXEC (@v_sql) END

  

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms