When you try to execute a query on a SQL Server database, such as creating a stored procedure, a table or adding data to one, and you are receiving the error The operation could not be completed. Not enough storage is available to complete this operation. the cause may be one of the following:
– The “Enable Autogrowth” option was unchecked for this specific database. This prevents the database from expanding over a different size. To uncheck this option, inside SQL Server Management Studio right click the database, choose Properties and in the Files page click the “…” button under the Autogrowth column. Make sure “Enable Autogrowth” is checked; repeat the same step for the log, since inside the Files page you should see both the data and the log file types, normally under the name of DatabaseName and DatabaseName_log.
– If you do not wish to enable autogrowth you can chhange the initial size of the database. Inside SQL Server Management Studio right click the database, choose Properties and in the Files page increase the value under the “Initial Size (MB)” column for both the data and the log files.
– If you are using SQL Server Express make sure your database is no larger than 4GB, since SQL Server Express Edition is limited to a maximum of 4GB. If this is the case, you should consider upgrading to SQL Server 2005 Standard, Developer or Enterprise.