Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 652693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:18:03+00:00 2026-05-13T22:18:03+00:00

Our database schema is stored in a single file that is intended for production

  • 0

Our database schema is stored in a single file that is intended for production use but we also use when running functional tests on our local boxes. We drop the database and rebuild it from this file and then add a known set of test data. All was working well.

Recently we added some performance improvements. The trouble came when we adding partitioning to one of the tables.

Msg 7736, Level 16, State 1
Server 'SERVERNAME\SQLEXPRESS', Line 4
Partition function can only be created in Enterprise edition of SQL Server. Only Enterprise edition
of SQL Server supports partitioning.

Undaunted I added an if statement to check to see if we were running under Enterprise before enabling partitioning:

IF CHARINDEX('Enterprise', CONVERT(varchar(1000), SERVERPROPERTY('edition'))) > 0
BEGIN
    CREATE PARTITION FUNCTION [MyPartitionRange] (int)
    AS RANGE LEFT
    FOR VALUES (14200000, 14225000, 14250000, 14300000, 14350000, 14375000, 14400000, 14475000, 14500000, 14525000, 14550000, 14575000, 14600000, 14625000, 14650000, 14675000, 14700000, 14725000, 14750000, 14775000, 14800000, 14825000, 14850000, 14875000, 14900000, 14925000, 14950000, 14975000, 15000000 )
END

Unfortunately this still fails. I think SQL Server is telling us about the issue at the time it parses the CREATE PARTITION FUNCTION so it throws the error even if we don’t use it.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:18:03+00:00Added an answer on May 13, 2026 at 10:18 pm

    You may consider this a hack, but you could put the ‘create partition…’ in a string and then call sp_executesql on it if you are on the right edition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.