I have a 230GB database without a clustered index that I’m trying to partition into 25 files for efficiency on a hard drive with 460GB of space. I’ve created the partition function
and partition scheme
, and I have executed the commands. During the partition process, the 25 files grew to about 230GB as well and the Primary file did not shrink causing the drive to run out of room. Although the query finished, I was left with two errors.
- Transaction log disappeared since there was no room due to
ACTIVE_TRANSACTION
- Could not allocate a new page for database because of insufficient disk space.
I’m trying to figure out if:
- the partition is successful and that this is an indexing issue.
- the Primary is still taking up the full 230GB or is it just allocated space that appears used on my drive. If so, can I safely shrink this without fragmentation?
- there is an issue with the missing transaction log. If not, where is it going?
I’ve been able to run queries against the database, so it seems fine on the surface. However, I cannot find any more information on the above mentioned problems. In theory, SQL cannot operate without a transaction log, so I am not sure how to proceed.
I only have a single table Europe_Amad which has 130 columns. No primary keys set.
My partition script is as follows:
USE [FTC] GO BEGIN TRANSACTION CREATE PARTITION FUNCTION [FTC_to_NACE](nvarchar(255)) AS RANGE RIGHT FOR VALUES (N'3500', N'3600', N'4100', N'4500', N'4800', N'5500', N'5800', N'6400', N'6800', N'6900', N'7700', N'8400', N'8500', N'8600', N'9000', N'9400', N'9700', N'9900') CREATE PARTITION SCHEME [FTC_PS1] AS PARTITION [FTC_to_NACE] TO ([FTCC], [FTCD], [FTCE], [FTCF], [FTCG], [FTCH], [FTCI], [FTCJ], [FTCK], [FTCL], [FTCM], [FTCN], [FTCO], [FTCP], [FTCQ], [FTCR], [FTCS], [FTCT], [FTCU]) SET ANSI_PADDING ON CREATE CLUSTERED INDEX [ClusteredIndex_on_FTC_PS1_636522495640236401] ON [dbo].[Europe_Amad] ([NACE_PRIM_CODE])WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [FTC_PS1]([NACE_PRIM_CODE]) DROP INDEX [ClusteredIndex_on_FTC_PS1_636522495640236401] ON [dbo].[Europe_Amad] COMMIT TRANSACTION