Are you sure it's
Could not allocate a new page for database 'database' because of insufficient disk space in filegroup 'PRIMARY'.
and not
Could not allocate a new page for database 'tempdb' because of insufficient disk space in filegroup 'PRIMARY'.
?
If it's actually [tempdb]
in the error message then that's something that needs to be managed separately by ensuring that [tempdb]
is on an appropriately-sized disk separated from other database.
If it's not [tempdb]
in the error message, I'd imagine that an "upload" of this kind would hit [tempdb]
pretty hard. Is [tempdb]
on the same disk/LUN as 'database'
? If so, you're probably exacerbating your problem with multiple attempted file growths (on multiple databases). So while you're doing this "upload" make sure you're monitoring [tempdb]
as well.
If [tempdb]
is on a separate drive and you're certain that you have enough space, I'd go ahead and size your data file to what you expect to be it's end-state size:
USE master;
GO
ALTER DATABASE [database]
MODIFY FILE
(
NAME = datafile,
SIZE = 60GB,
FILEGROWTH = 5GB
);
GO
Also, please make sure that the database's log file is separate from the data file. If it's not then you're back with competing growth events. If they are on separate disks, then I'd also go through and size them appropriately.
USE master;
GO
ALTER DATABASE [database]
MODIFY FILE
(
NAME = logfile,
SIZE = 8000MB
);
GO
ALTER DATABASE [database]
MODIFY FILE
(
NAME = logfile,
SIZE = 16000MB
);
GO
ALTER DATABASE [database]
MODIFY FILE
(
NAME = logfile,
SIZE = 24000MB
);
GO
...
until you get to your desired logfile size. Let's call it 80GB where you'll set your growth to a specific size. I'm using values recommended by Paul Randal and Kimberly Tripp
ALTER DATABASE [database]
MODIFY FILE
(
NAME = logfile,
SIZE = 80000MB,
FILEGROWTH = 8000MB
);