Header Ads Widget

LightBlog

Breaking

LightBlog

Wednesday, January 13, 2016

because the 'PRIMARY' filegroup is full.adding additional files to the filegroup, or setting autogrowth.How to Shrink SQL Log file.Size limitations for SQL Server Express databases.

What are the size limitations for Microsoft SQL Server Express databases?
Check Microsoft SQL Server edition

Launch SQL Server Management Studio.
Open up a query window associated with the database and Execute the following,

SELECT @@VERSION

These limits are as follows:
  • Microsoft SQL Server 2005 Express edition has a database size limit to 4GB
  • Microsoft SQL Server 2008 Express edition has a database size limit to 4GB
  • Microsoft SQL Server 2008 R2 Express edition has a database size limit to 10GB
  • Microsoft SQL Server 2012 Express edition has a database size limit to 10GB
  • Microsoft SQL Server 2014 Express edition has a database size limit to 10GB

How to Shrink SQL Server Transaction Logs

Shrink SQL Log file


Identify how much space you want to add to the database storage allocation:


  • Open windows explorer
  • Right click on the disk drive that your database files exist on
  • Select properties
  • Check how much disk space is available and decide how much of this you want to allocate for the database 
  • (Suggestion: Leave at least 20% disk space free if you house the database files on the same disk as your OS {Sub-Suggestion: Don't do this! Rebuild/migrate your data to it's own disk; you're screwing yourself on I/O.} and leave at least 8% for a pure data disk; these numbers are estimates of what I think the actual percentage suggestions are.)


Update the storage allocation for the database.
  • Open SSMS
  • Click the "View" tab
  • Select "Object Explorer"
  • Expand the "Databases" folder
  • Right click the database your trying to bulk insert into
  • Select "Properties"
  • Click the "Files" list option from the "Select a page" area at the left of the properties window
  • Find the "Database files" row with the "Filegroup" as "PRIMARY"
  • Add whatever number of megabytes you want to add to the database allocation to the "Initial Size (MB)" number
  • Hit "OK" 
(You might also want to consider your "Autogrowth" values while you're here.)
You want to give your database as much storage allocation as you can afford to give it. If it runs out of space you'll receive this error without auto-grow on and if auto-grow is on you'll take a performance hit each time it has to auto-grow. If you are simply out of disk space then that is your answer and you need a bigger disk.

No comments:

Post a Comment

Adbox