Issue
When creating item database in WebUI logs is logged following error:

[2018-07-17 11:11:40Z] [ 5244] [ 48] [ERROR] [ CreateItemDatabase] Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: MODIFY FILE failed. Specified size is less than or equal to current size.
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
at ArchiveShuttle.DAL.Helpers.DatabaseHelpers.ExecuteScript(SqlConnectionStringBuilder connectionString, String script)
at ArchiveShuttle.DAL.Item.Wrapper.Maintenance.CreateDatabase(SqlConnectionStringBuilder connectionString, String databaseName, Int64 defaultDatabaseSize, Int64 defaultDatabaseLogSize)
at ArchiveShuttle.Core.Library.Database.Maintenance.CreateItemDatabase(String sqlServerName, String databaseName, Boolean historyDb) Int32 ExecuteNonQuery(System.String, Microsoft.SqlServer.Management.Common.ExecutionTypes)
An exception occurred while executing a Transact-SQL statement or batch.
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
at ArchiveShuttle.DAL.Helpers.DatabaseHelpers.ExecuteScript(SqlConnectionStringBuilder connectionString, String script)
at ArchiveShuttle.DAL.Item.Wrapper.Maintenance.CreateDatabase(SqlConnectionStringBuilder connectionString, String databaseName, Int64 defaultDatabaseSize, Int64 defaultDatabaseLogSize)
at ArchiveShuttle.Core.Library.Database.Maintenance.CreateItemDatabase(String sqlServerName, String databaseName, Boolean historyDb)
[2018-07-17 11:11:40Z] [ 5244] [ 48] [ERROR] [ CreateLinkDatabase] An error occured while creating/updating the Database: XXX.XX.X.XX\XXXX (XXXXXXXX__3f45cd0c-e585-4c59-8467-1a7bc04f88ad) Error: An error occured while creating/updating the Database: XXX.XX.X.XX\XXXX (XXXXXXXX__3f45cd0c-e585-4c59-8467-1a7bc04f88ad) Error: An exception occurred while executing a Transact-SQL statement or batch.
[2018-07-17 11:11:40Z] [ 5244] [ 48] [ERROR] [ CreateLinkDatabaseCallbackPanel_OnCallback] Error while creating item database XXXXXXXX__3f45cd0c-e585-4c59-8467-1a7bc04f88ad (XXX.XX.X.XX\XXXX): An error occured while creating/updating the Database: XXX.XX.X.XX\XXXX (XXXXXXXX__3f45cd0c-e585-4c59-8467-1a7bc04f88ad) Error: An exception occurred while executing a Transact-SQL statement or batch.

Explanation
This issue occurs when initial database size in the Model database is lower or equal to Item database size defined in Archive Shuttle configuration. Model database initial size is assumed as SQL server default value for all newly created databases. In this specific case was item database created “bigger” and then in Archive Shuttle, we tried to MODIFY FILE to lower size as SQL default which is not possible.
Solution
Increasing values in Archive Shuttle configuration to HIGHER values than Model database initial size will resolve the issue. Especially log file size must be HIGHER, Item database can be the same size as Model initial size.
Example
Model database initial size setting

Archive Shuttle Item database initial size setting

WebUI logs when the database is successfully created

[2018-07-17 11:56:41Z] [ 5244] [ 8] [ INFO] [ CreateLinkDatabaseCallbackPanel_OnCallback] Preparing to add new Link Database for Link: dc5b2bbb-183c-450b-92fe-1e9a968e2326
[2018-07-17 11:56:41Z] [ 5244] [ 8] [TRACE] [ CreateItemDatabase] Checking connection to SQL Server: XXX.XX.X.XX\XXXX
[2018-07-17 11:56:41Z] [ 5244] [ 8] [TRACE] [ CreateItemDatabase] Checking XX\XX.XX-XXXX-XX's SQL dbcreator Role
[2018-07-17 11:56:41Z] [ 5244] [ 8] [TRACE] [ CreateItemDatabase] Checking if Database XXXXXXXX__dc5b2bbb-183c-450b-92fe-1e9a968e2326 exists
[2018-07-17 11:56:41Z] [ 5244] [ 8] [ INFO] [ CreateItemDatabase] Creating Item Database XXXXXXXX__dc5b2bbb-183c-450b-92fe-1e9a968e2326 (XXX.XX.X.XX\XXXX)
[2018-07-17 11:56:41Z] [ 5244] [ 8] [TRACE] [ ScriptExists] fileName: CoreLinkDB_PreCreate1.sql
[2018-07-17 11:56:41Z] [ 5244] [ 8] [TRACE] [ ScriptExists] path: D:\AS\Core\Web\ | filePath: D:\AS\Core\Web\bin\SQLScripts\CoreLinkDB_PreCreate1.sql
[2018-07-17 11:57:20Z] [ 5244] [ 8] [TRACE] [ ScriptExists] fileName: CoreLinkDB.sql
[2018-07-17 11:57:20Z] [ 5244] [ 8] [TRACE] [ ScriptExists] path: D:\AS\Core\Web\ | filePath: D:\AS\Core\Web\bin\SQLScripts\CoreLinkDB.sql
[2018-07-17 11:57:20Z] [ 5244] [ 8] [TRACE] [ GetScript] fileName: CoreLinkDB.sql | databaseName: XXXXXXXX__dc5b2bbb-183c-450b-92fe-1e9a968e2326
[2018-07-17 11:57:20Z] [ 5244] [ 8] [TRACE] [ GetScript] path: D:\AS\Core\Web\ | filePath: D:\AS\Core\Web\bin\SQLScripts\CoreLinkDB.sql
[2018-07-17 11:57:20Z] [ 5244] [ 8] [TRACE] [ GetScript] Item database size set on: [1024] MB
[2018-07-17 11:57:20Z] [ 5244] [ 8] [TRACE] [ GetScript] Item database log size set on: [512] MB
[2018-07-17 11:57:22Z] [ 5244] [ 8] [TRACE] [ ScriptExists] fileName: CoreLinkDB_PostCreate1.sql
[2018-07-17 11:57:22Z] [ 5244] [ 8] [TRACE] [ ScriptExists] path: D:\AS\Core\Web\ | filePath: D:\AS\Core\Web\bin\SQLScripts\CoreLinkDB_PostCreate1.sql
[2018-07-17 11:57:22Z] [ 5244] [ 8] [ INFO] [ CreateItemDatabase] Item Database XXXXXXXX__dc5b2bbb-183c-450b-92fe-1e9a968e2326 (XXX.XX.X.XX\XXXX) created successfully
[2018-07-17 11:57:22Z] [ 5244] [ 8] [TRACE] [ GetScript] fileName: CoreLinkDB_Update1.sql | databaseName: XXXXXXXX__dc5b2bbb-183c-450b-92fe-1e9a968e2326
[2018-07-17 11:57:22Z] [ 5244] [ 8] [TRACE] [ GetScript] path: D:\AS\Core\Web\ | filePath: D:\AS\Core\Web\bin\SQLScripts\CoreLinkDB_Update1.sql
[2018-07-17 11:57:26Z] [ 5244] [ 8] [TRACE] [ GetScript] fileName: CoreLinkDB_EnableCompression.sql | databaseName: XXXXXXXX__dc5b2bbb-183c-450b-92fe-1e9a968e2326
[2018-07-17 11:57:26Z] [ 5244] [ 8] [TRACE] [ GetScript] path: D:\AS\Core\Web\ | filePath: D:\AS\Core\Web\bin\SQLScripts\CoreLinkDB_EnableCompression.sql
[2018-07-17 11:57:26Z] [ 5244] [ 8] [ INFO] [ CreateLinkDatabaseCallbackPanel_OnCallback] Successfully created item database: XXXXXXXX__dc5b2bbb-183c-450b-92fe-1e9a968e2326 (XXX.XX.X.XX\XXXX)
Print Friendly, PDF & Email