Creating data files for the Reviewer workspace in SQL Server

Standard GIS storage recommendations favor keeping index and log files separate from vector and tabular business tables. For performance reasons, it is better to position the business, feature, and spatial index tables separately and position FileGroup data files based on their usage pattern. For a multiversioned, highly active editing geodatabase, database files of the VERSIONS FileGroup may be separated and dispersed across available disks to avoid input/output contention.

The following table has the recommended FileGroups to be created for storing the Reviewer features and table.

FILEGROUP

ArcSDE_PARAMETER

REV_BDATA

Business table

REV_BINDEX

Business table index

REV_FDATA

Feature table

REV_FINDEX

Feature table index

REV_SDATA

Spatial index table

REV_SINDEX

Spatial index table index

REV_ADATA

Adds table (versioned)

REV_AINDEX

Adds table index

REV_DDATA

Deletes table (versioned)

REV_DINDEX

Deletes table index

FileGroups

The following script can be used to add FileGroups through SQL Server Management Studio.

USE MASTER
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_BDATA] 
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Bdata01', FILENAME = N'C:\mssql\data\revdb\rev_Bdata01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_BDATA]
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_BINDEX]
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Bindex01', FILENAME = N'C:\mssql\data\revdb\rev_Bindex01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_BINDEX]
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_FDATA] 
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Fdata01', FILENAME = N'C:\mssql\data\revdb\rev_Fdata01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_FDATA]
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_FINDEX] 
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Findex01', FILENAME = N'C:\mssql\data\revdb\rev_Findex01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_FINDEX]
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_SDATA] 
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Sdata01', FILENAME = N'C:\mssql\data\revdb\rev_Sdata01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_SDATA]
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_SINDEX] 
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Sindex01', FILENAME = N'C:\mssql\data\revdb\rev_Sindex01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_SINDEX]
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_ADATA] 
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Adata01', FILENAME = N'C:\mssql\data\revdb\rev_Adata01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_ADATA]
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_AINDEX] 
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Aindex01', FILENAME = N'C:\mssql\data\revdb\rev_Aindex01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_AINDEX]
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_DDATA] 
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Ddata01', FILENAME = N'C:\mssql\data\revdb\rev_Ddata01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_DDATA]
GO
ALTER DATABASE [REVDB] ADD FILEGROUP [REV_DINDEX] 
GO
ALTER DATABASE [REVDB] ADD FILE(NAME = N'rev_Dindex01', FILENAME = N'C:\mssql\data\revdb\rev_Dindex01.NDF' , SIZE = 1, MAXSIZE = 800, FILEGROWTH = 1) TO FILEGROUP [REV_DINDEX]
GO

By setting the data files’ initial size to 1 MB, there is no delay in the creation of the FileGroups. You can then resize the data files to avoid fragmentation.

ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Bdata01, SIZE = 400MB )
ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Bindex01, SIZE = 400MB )
ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Fdata01, SIZE = 400MB )
ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Findex01, SIZE = 400MB )
ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Sdata01, SIZE = 400MB )
ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Sindex01, SIZE = 400MB )
ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Adata01, SIZE = 400MB )
ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Aindex01, SIZE = 400MB )
ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Ddata01, SIZE = 400MB )
ALTER DATABASE [REVDB] MODIFY FILE ( NAME = Nrev_Dindex01, SIZE = 400MB )

Use the following to verify FileGroups and data files:

EXEC sp_helpdb revdb
GO
4/26/2014