Solved

Partition Scheme

  • 19 November 2020
  • 3 replies
  • 41 views

Hi,

I have a large FACT-tables in my DWH (copy from a view in stage). I have tried to add partitions. I didn't help that much, so I removed it again.
But since I removed it, the table can't be deployed. I get the below error. I can re-add the partition, but still the same error:

An error occurred during drop partition function. See exception details for the failing object
An error occurred during drop user defined function. See exception details for the failing object: Drop failed for PartitionFunction 'FactSalesOrder_History_PartitionFunction'.
An exception occurred while executing a Transact-SQL statement or batch.
Partition function 'FactSalesOrder_History_PartitionFunction' is being used by one or more partition schemes.

Details:

SQL Server: '.'
SQL Procedure: ''
SQL Line Number: 2
SQL Error Number: 7706

I'm not sure how to find and drop what-ever TX is complaining about.
Tried this:
DROP PARTITION FUNCTION FactSalesOrder_History_PartitionFunction

and then get this:
Partition function 'FactSalesOrder_History_PartitionFunction' is being used by one or more partition schemes.

Any suggestions on how to proceed?

icon

Best answer by jens.mikkelsen 4 December 2020, 09:54

View original

3 replies

I'm having the same error on a client's system. The workaround was to go into Management Studio and manually drop the schema, which will allow you to manually drop the partition function. Sometimes, there are also dependent tables, so you'll have to drop the table, then you can drop the schema, and then you can finally drop the partition function and the project will deploy and execute. The client I am having an issue with has to do this on almost every deployment.

Hi Anders.

Please write to me at JJM@Timextender.com so we can have a look at your solution together.

Regards Jens Jørn

Hi Anders

I just send a meeting invite to you.

Regards Jens Jørn

Reply