SQL 'Could not allocate space'

Discussion in 'Databases' started by mangia, Nov 10, 2009.

  1. I have a photo album on my site. I have 'working' code that imports JPG images (rather large) into a SQL table. Last night I successfully import about 40 images. But the import process errorred about 1/2 through the second import. And now, I cannot import anymore images into the same table.

    Is there a SQL setting that would allow this table to grow naturally in large chunks? Please advise.

    BTW, I need to get a 2008 SQL Server Management Studio now that i running w/ Winhost, 2005 just doesn't cut the mustard anymore.

    Could not allocate space for object 'dbo.Photos'.'PK_Photos' in database 'DB_1382_imangia' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
    Last edited by a moderator: Oct 14, 2015
  2. Are you on the Basic or Max plan?

    Basic has a 100mb SQL limit and that can't be increased. When you create the db the system automatically provisions all 100mb of the quota to the database.

    On the Max plan you have 500mb to use, but you have to allocate it to specific databases (because you can create up to 5 databases).

    Generally speaking, storing blob (large binary) information like images in a database is not a good idea. You might consider storing only an image file name and uploading the images themselves to a specific directory.


    To increase the quota on a Max plan database:
    1. Click the MS SQL 2008 icon in the Site Tools section of Control Panel.
    2. Click the Manage link for the database you want to increase.
    3. On the "Assigned Quota" line, click the Edit link.
    If you have more than one database you have to be aware of what the quotas are on each of them. If you try to increase the size of one database and that increase takes you above 500mb total for all databases, the quota increase will fail.
    Last edited: Oct 14, 2015
  3. I have the Basic plan, and I know 100Mb is my limit. I checked on my control panel my space usage and I am only at aout 25%, so it appears I have plenty of space left.

    I agree placing large binary blobs into a table is not the best, but this is what I have right now and it has been working quite well.

    Since I don't have SQL 2008 Express yet, I can't really see what the Photos table size and properties are set to. Is there a default max table size setting that I am unaware of?
  4. Never Mind!!! you were right, the site usage is only 50Mb but the SQL is 99MB ... or basically full.

Share This Page