Restore database from backup file of different version / edition Announcing the arrival of...

How much damage would a cupful of neutron star matter do to the Earth?

What is the home of drows in Flanaess?

Put R under double integral

Is there public access to the Meteor Crater in Arizona?

Dyck paths with extra diagonals from valleys (Laser construction)

How do I find out the mythology and history of my Fortress?

What is the meaning of 'breadth' in breadth first search?

An adverb for when you're not exaggerating

Crossing US/Canada Border for less than 24 hours

Is it possible for SQL statements to execute concurrently within a single session in SQL Server?

What is this round thing on the pantry door in The Shining

"Lost his faith in humanity in the trenches of Verdun" — last line of an SF story

Do wooden building fires get hotter than 600°C?

Google .dev domain strangely redirects to https

Hangman Game with C++

Maximum summed subsequences with non-adjacent items

File name problem(?)

How could we fake a moon landing now?

What does Turing mean by this statement?

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

How many time has Arya actually used Needle?

Can a new player join a group only when a new campaign starts?

Would it be easier to apply for a UK visa if there is a host family to sponsor for you in going there?

One-one communication



Restore database from backup file of different version / edition



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Import .bak file in Microsoft SQL Server 2008 Service Pack 3Techniques for moving database from Enterprise to Standard EditiionRestore SQL Server 2012 backup to a SQL Server 2008 database?Restoring an SQL Server 2012 MDF to SQL Server 2008Restore database according to editionsRestoring differential backup creates DEFUNCT log file?RESTORE failing with OS error 32, file being used by another processSecondary log shipped DB becoming suspect after restore of a transaction logUTF8 Trouble while migrating from MSSQL to MySQL with MySQL WorkbenchTLS 1.0 disabled causing errors when requests come from SQL Server to a WebserverMSSQL: Export Wizard, not possible to save SSIS PackageLog Shipping: two secondary DBs on the same instance - is this possible?SQL 2016 Always encrypted for all data?Multiple databases, one backup fileIssue installing SQL Server 2012 SP4 in a cluster - missing ‘vc_red.msi’





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







10















I read that it's possible to restore a database in SQL Server as long as you're restoring from an older version to a newer version, for backwards compatibility reasons.



Does anyone know off hand if you can restore a database from a *.bak file for different editions of SQL Server? We are moving a very large database via FTP that will take a couple days, so we'd rather only do this once. If nobody responds by the time we transfer the database via FTP, we will obviously try this out and see if it works by testing, and answer our own question.



Below is a query to get version details of SQL Server. The productversion is in the format {major revision}.{minor revision}.{release revision}.{build number}. In my case, the {release revision} has a value of 5500 for the source and 5512 for the target. So that looks okay. However, the edition is different.



Query:



SELECT 
SERVERPROPERTY('productversion'),
SERVERPROPERTY('productlevel'),
SERVERPROPERTY('edition')


Source database:



10.0.5500.0
SP3
Developer Edition (64-bit)


Target database:



10.0.5512.0
SP3
Enterprise Edition (64-bit)









share|improve this question

























  • How about restoring a backup file from SQL Server 2012 Business Intelligence Edition to a developer instance?

    – sdg320
    Jan 16 '15 at 15:44


















10















I read that it's possible to restore a database in SQL Server as long as you're restoring from an older version to a newer version, for backwards compatibility reasons.



Does anyone know off hand if you can restore a database from a *.bak file for different editions of SQL Server? We are moving a very large database via FTP that will take a couple days, so we'd rather only do this once. If nobody responds by the time we transfer the database via FTP, we will obviously try this out and see if it works by testing, and answer our own question.



Below is a query to get version details of SQL Server. The productversion is in the format {major revision}.{minor revision}.{release revision}.{build number}. In my case, the {release revision} has a value of 5500 for the source and 5512 for the target. So that looks okay. However, the edition is different.



Query:



SELECT 
SERVERPROPERTY('productversion'),
SERVERPROPERTY('productlevel'),
SERVERPROPERTY('edition')


Source database:



10.0.5500.0
SP3
Developer Edition (64-bit)


Target database:



10.0.5512.0
SP3
Enterprise Edition (64-bit)









share|improve this question

























  • How about restoring a backup file from SQL Server 2012 Business Intelligence Edition to a developer instance?

    – sdg320
    Jan 16 '15 at 15:44














10












10








10


2






I read that it's possible to restore a database in SQL Server as long as you're restoring from an older version to a newer version, for backwards compatibility reasons.



Does anyone know off hand if you can restore a database from a *.bak file for different editions of SQL Server? We are moving a very large database via FTP that will take a couple days, so we'd rather only do this once. If nobody responds by the time we transfer the database via FTP, we will obviously try this out and see if it works by testing, and answer our own question.



Below is a query to get version details of SQL Server. The productversion is in the format {major revision}.{minor revision}.{release revision}.{build number}. In my case, the {release revision} has a value of 5500 for the source and 5512 for the target. So that looks okay. However, the edition is different.



Query:



SELECT 
SERVERPROPERTY('productversion'),
SERVERPROPERTY('productlevel'),
SERVERPROPERTY('edition')


Source database:



10.0.5500.0
SP3
Developer Edition (64-bit)


Target database:



10.0.5512.0
SP3
Enterprise Edition (64-bit)









share|improve this question
















I read that it's possible to restore a database in SQL Server as long as you're restoring from an older version to a newer version, for backwards compatibility reasons.



Does anyone know off hand if you can restore a database from a *.bak file for different editions of SQL Server? We are moving a very large database via FTP that will take a couple days, so we'd rather only do this once. If nobody responds by the time we transfer the database via FTP, we will obviously try this out and see if it works by testing, and answer our own question.



Below is a query to get version details of SQL Server. The productversion is in the format {major revision}.{minor revision}.{release revision}.{build number}. In my case, the {release revision} has a value of 5500 for the source and 5512 for the target. So that looks okay. However, the edition is different.



Query:



SELECT 
SERVERPROPERTY('productversion'),
SERVERPROPERTY('productlevel'),
SERVERPROPERTY('edition')


Source database:



10.0.5500.0
SP3
Developer Edition (64-bit)


Target database:



10.0.5512.0
SP3
Enterprise Edition (64-bit)






sql-server compatibility-level






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 3 '13 at 19:20









Aaron Bertrand

154k18300496




154k18300496










asked Jan 30 '13 at 21:06









MacGyverMacGyver

971102850




971102850













  • How about restoring a backup file from SQL Server 2012 Business Intelligence Edition to a developer instance?

    – sdg320
    Jan 16 '15 at 15:44



















  • How about restoring a backup file from SQL Server 2012 Business Intelligence Edition to a developer instance?

    – sdg320
    Jan 16 '15 at 15:44

















How about restoring a backup file from SQL Server 2012 Business Intelligence Edition to a developer instance?

– sdg320
Jan 16 '15 at 15:44





How about restoring a backup file from SQL Server 2012 Business Intelligence Edition to a developer instance?

– sdg320
Jan 16 '15 at 15:44










3 Answers
3






active

oldest

votes


















14














From Developer to Enterprise will be fine, just be sure that if you are using processor licensing you have licenses on the target server to cover all of the CPUs. And it's not enough to just hide them from SQL, if they're physically connected to the machine, you're responsible for them.



Also when you go from a lower build to a higher build your database version will increase. There are a few scenarios where this can be problematic - e.g. if you are using 15,000 partition support on a specific build of 2008 it will not work when you upgrade to a specific build of 2008 R2. You may also be relying on optimizations (and have workarounds in place) that are actually bugs in an older build but are fixed in the new build, and this may lead to worse performance. It is also vital to review any trace flags in use at the source and determine if they should also be enabled at the destination. Never mind jobs, logins, etc.



Of course you cannot go backwards. I've never tried a minor downgrade like 10.0.5512 -> 10.0.5500 but it is definitely not possible to go down in service pack or version. So if you have a 2012 database on your Developer Edition instance and you want to put it on your 2008 instance in production, you'll have your work cut out for you (see here and here) - especially if you've used 2012 features.





But to cover other cases that might land people at this question (e.g. someone wants to go from Developer -> Standard or Enterprise -> Express or what have you)...



There are other edition -> edition upgrades that won't go so well, e.g. from Developer -> Express if you've used any features that aren't supported in Express (and same goes for any edition other than Enterprise really). Some examples of features you won't be able to use on down-level editions (in which case the restore will die at the point it tries to bring the database online):




  • Partitioning

  • Change Data Capture

  • Data Compression

  • Transparent Data Encryption


I don't know if there's a way to tell this directly from the .BAK file (I'm sure there's some magic that can be extracted from page headers somewhere, or if you've got a weekend to burn with a hex editor), but while the database is still intact on the source instance, you can always do the following to see if you're using any features that are available because of the SKU you're in:



SELECT feature_name FROM sys.dm_db_persisted_sku_features;


I'm not sure if SQL Server Audit should be on that list - the edition exclusivity of that feature has changed, so it probably depends on what you're doing with it. There are other things that you might be using but won't show up in the DMV (some because they are in your code, which the DMV doesn't parse, and some because your database is relying on external things such as SQL Server Agent, Service Broker, etc.):




  • mirroring

  • certain forms of replication

  • log shipping

  • database snapshots

  • online indexing

  • updateable distributed partitioned views

  • backup compression

  • policy-based management

  • plan guides

  • database mail

  • maintenance plans

  • full-text search


There are also cases where you won't be able to go from Developer to Express because of file size limitations (Express databases are limited to 10GB in total data file size).



Of course there may be other gotchas that you won't be warned about - they won't prevent the migration, but they might lead to very different performance on the target. Examples:




  1. Different memory / CPU limitations on the target edition (or even the underlying operating system on the target). This bit a lot of people who went from 2008 R2 Enterprise to 2012 Enterprise (CAL), where the service is artificially limited to the first 20 cores). This can lead to straightforward performance differences (not enough memory to satisfy a query, for example, or much slower parallel query performance); more subtle ones include plan choices that are made because of the different underlying hardware.

  2. Reliance on features such as indexed view matching on the source will not be automatically respected on the target without changing source code to use NOEXPAND. And you may not even be aware that this capability is why your queries suddenly slow down.

  3. Same goes for parallel index operations and probably a slew of other optimizations that aren't coming to mind this moment (thankfully I work almost exclusively in the Enterprise space, so I don't have to worry about the limitations of lower editions in most cases).


UPDATE based on this duplicate:



There may be cases where you try to restore a database from a certain edition to a lesser edition (even on the same version), and you get errors that are less than helpful:




RESTORE failed for server 'serverinstance'.

RESTORE could not start database 'databasename'.




This isn't very intuitive. However if you look deeper in SQL Server's event logs, you will see more useful errors (just one example):




Database 'databasename' cannot be started because some of the database functionality is not available in the current edition of SQL Server.

Database 'databasename' cannot be started in this edition of SQL Server because it contains a partition function '_dta_pf__9987'. Only Enterprise edition of SQL Server supports partition functions.




Now, that's not quite true - you can also restore to Evaluation Edition or Developer Edition, but that's beside the point. In order to restore this database, you basically have two options:




  1. Restore to an appropriate edition of SQL Server - which will mean locating or installing a new instance.

  2. Restore the backup on the source server as a new database with a different name, remove any and all Enterprise features, then backup the database again, and restore that on the lesser edition. (In this specific case, I left the name of the partition function in the error message, because this seems like a discardable thing anyway - it was created by the Database Engine Tuning Advisor and may have been done so by someone who didn't quite know what they were doing. This isn't always the case.)


A variation on (2) would be to just remove the partitioning and other features on the source database, and take another backup. But if it ain't broke...






share|improve this answer

































    3














    Developer and Enterprise are the same software, just with different licensing agreements.



    You should be fine restoring this database at your destination.






    share|improve this answer































      0














      i am having this problem, i am trying to restore from 2008 standard to 2008 enterprise, and getting this error message



      TITLE: Microsoft SQL Server Management Studio



      Restore failed for Server ''. (Microsoft.SqlServer.SmoExtended)



      For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476





      ADDITIONAL INFORMATION:



      System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.4042. That version is incompatible with this server, which is running version 10.00.1600. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.Smo)



      For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&LinkId=20476





      BUTTONS:



      OK





      share








      New contributor




      Chris Rowley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





















        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "182"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f33870%2frestore-database-from-backup-file-of-different-version-edition%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        14














        From Developer to Enterprise will be fine, just be sure that if you are using processor licensing you have licenses on the target server to cover all of the CPUs. And it's not enough to just hide them from SQL, if they're physically connected to the machine, you're responsible for them.



        Also when you go from a lower build to a higher build your database version will increase. There are a few scenarios where this can be problematic - e.g. if you are using 15,000 partition support on a specific build of 2008 it will not work when you upgrade to a specific build of 2008 R2. You may also be relying on optimizations (and have workarounds in place) that are actually bugs in an older build but are fixed in the new build, and this may lead to worse performance. It is also vital to review any trace flags in use at the source and determine if they should also be enabled at the destination. Never mind jobs, logins, etc.



        Of course you cannot go backwards. I've never tried a minor downgrade like 10.0.5512 -> 10.0.5500 but it is definitely not possible to go down in service pack or version. So if you have a 2012 database on your Developer Edition instance and you want to put it on your 2008 instance in production, you'll have your work cut out for you (see here and here) - especially if you've used 2012 features.





        But to cover other cases that might land people at this question (e.g. someone wants to go from Developer -> Standard or Enterprise -> Express or what have you)...



        There are other edition -> edition upgrades that won't go so well, e.g. from Developer -> Express if you've used any features that aren't supported in Express (and same goes for any edition other than Enterprise really). Some examples of features you won't be able to use on down-level editions (in which case the restore will die at the point it tries to bring the database online):




        • Partitioning

        • Change Data Capture

        • Data Compression

        • Transparent Data Encryption


        I don't know if there's a way to tell this directly from the .BAK file (I'm sure there's some magic that can be extracted from page headers somewhere, or if you've got a weekend to burn with a hex editor), but while the database is still intact on the source instance, you can always do the following to see if you're using any features that are available because of the SKU you're in:



        SELECT feature_name FROM sys.dm_db_persisted_sku_features;


        I'm not sure if SQL Server Audit should be on that list - the edition exclusivity of that feature has changed, so it probably depends on what you're doing with it. There are other things that you might be using but won't show up in the DMV (some because they are in your code, which the DMV doesn't parse, and some because your database is relying on external things such as SQL Server Agent, Service Broker, etc.):




        • mirroring

        • certain forms of replication

        • log shipping

        • database snapshots

        • online indexing

        • updateable distributed partitioned views

        • backup compression

        • policy-based management

        • plan guides

        • database mail

        • maintenance plans

        • full-text search


        There are also cases where you won't be able to go from Developer to Express because of file size limitations (Express databases are limited to 10GB in total data file size).



        Of course there may be other gotchas that you won't be warned about - they won't prevent the migration, but they might lead to very different performance on the target. Examples:




        1. Different memory / CPU limitations on the target edition (or even the underlying operating system on the target). This bit a lot of people who went from 2008 R2 Enterprise to 2012 Enterprise (CAL), where the service is artificially limited to the first 20 cores). This can lead to straightforward performance differences (not enough memory to satisfy a query, for example, or much slower parallel query performance); more subtle ones include plan choices that are made because of the different underlying hardware.

        2. Reliance on features such as indexed view matching on the source will not be automatically respected on the target without changing source code to use NOEXPAND. And you may not even be aware that this capability is why your queries suddenly slow down.

        3. Same goes for parallel index operations and probably a slew of other optimizations that aren't coming to mind this moment (thankfully I work almost exclusively in the Enterprise space, so I don't have to worry about the limitations of lower editions in most cases).


        UPDATE based on this duplicate:



        There may be cases where you try to restore a database from a certain edition to a lesser edition (even on the same version), and you get errors that are less than helpful:




        RESTORE failed for server 'serverinstance'.

        RESTORE could not start database 'databasename'.




        This isn't very intuitive. However if you look deeper in SQL Server's event logs, you will see more useful errors (just one example):




        Database 'databasename' cannot be started because some of the database functionality is not available in the current edition of SQL Server.

        Database 'databasename' cannot be started in this edition of SQL Server because it contains a partition function '_dta_pf__9987'. Only Enterprise edition of SQL Server supports partition functions.




        Now, that's not quite true - you can also restore to Evaluation Edition or Developer Edition, but that's beside the point. In order to restore this database, you basically have two options:




        1. Restore to an appropriate edition of SQL Server - which will mean locating or installing a new instance.

        2. Restore the backup on the source server as a new database with a different name, remove any and all Enterprise features, then backup the database again, and restore that on the lesser edition. (In this specific case, I left the name of the partition function in the error message, because this seems like a discardable thing anyway - it was created by the Database Engine Tuning Advisor and may have been done so by someone who didn't quite know what they were doing. This isn't always the case.)


        A variation on (2) would be to just remove the partitioning and other features on the source database, and take another backup. But if it ain't broke...






        share|improve this answer






























          14














          From Developer to Enterprise will be fine, just be sure that if you are using processor licensing you have licenses on the target server to cover all of the CPUs. And it's not enough to just hide them from SQL, if they're physically connected to the machine, you're responsible for them.



          Also when you go from a lower build to a higher build your database version will increase. There are a few scenarios where this can be problematic - e.g. if you are using 15,000 partition support on a specific build of 2008 it will not work when you upgrade to a specific build of 2008 R2. You may also be relying on optimizations (and have workarounds in place) that are actually bugs in an older build but are fixed in the new build, and this may lead to worse performance. It is also vital to review any trace flags in use at the source and determine if they should also be enabled at the destination. Never mind jobs, logins, etc.



          Of course you cannot go backwards. I've never tried a minor downgrade like 10.0.5512 -> 10.0.5500 but it is definitely not possible to go down in service pack or version. So if you have a 2012 database on your Developer Edition instance and you want to put it on your 2008 instance in production, you'll have your work cut out for you (see here and here) - especially if you've used 2012 features.





          But to cover other cases that might land people at this question (e.g. someone wants to go from Developer -> Standard or Enterprise -> Express or what have you)...



          There are other edition -> edition upgrades that won't go so well, e.g. from Developer -> Express if you've used any features that aren't supported in Express (and same goes for any edition other than Enterprise really). Some examples of features you won't be able to use on down-level editions (in which case the restore will die at the point it tries to bring the database online):




          • Partitioning

          • Change Data Capture

          • Data Compression

          • Transparent Data Encryption


          I don't know if there's a way to tell this directly from the .BAK file (I'm sure there's some magic that can be extracted from page headers somewhere, or if you've got a weekend to burn with a hex editor), but while the database is still intact on the source instance, you can always do the following to see if you're using any features that are available because of the SKU you're in:



          SELECT feature_name FROM sys.dm_db_persisted_sku_features;


          I'm not sure if SQL Server Audit should be on that list - the edition exclusivity of that feature has changed, so it probably depends on what you're doing with it. There are other things that you might be using but won't show up in the DMV (some because they are in your code, which the DMV doesn't parse, and some because your database is relying on external things such as SQL Server Agent, Service Broker, etc.):




          • mirroring

          • certain forms of replication

          • log shipping

          • database snapshots

          • online indexing

          • updateable distributed partitioned views

          • backup compression

          • policy-based management

          • plan guides

          • database mail

          • maintenance plans

          • full-text search


          There are also cases where you won't be able to go from Developer to Express because of file size limitations (Express databases are limited to 10GB in total data file size).



          Of course there may be other gotchas that you won't be warned about - they won't prevent the migration, but they might lead to very different performance on the target. Examples:




          1. Different memory / CPU limitations on the target edition (or even the underlying operating system on the target). This bit a lot of people who went from 2008 R2 Enterprise to 2012 Enterprise (CAL), where the service is artificially limited to the first 20 cores). This can lead to straightforward performance differences (not enough memory to satisfy a query, for example, or much slower parallel query performance); more subtle ones include plan choices that are made because of the different underlying hardware.

          2. Reliance on features such as indexed view matching on the source will not be automatically respected on the target without changing source code to use NOEXPAND. And you may not even be aware that this capability is why your queries suddenly slow down.

          3. Same goes for parallel index operations and probably a slew of other optimizations that aren't coming to mind this moment (thankfully I work almost exclusively in the Enterprise space, so I don't have to worry about the limitations of lower editions in most cases).


          UPDATE based on this duplicate:



          There may be cases where you try to restore a database from a certain edition to a lesser edition (even on the same version), and you get errors that are less than helpful:




          RESTORE failed for server 'serverinstance'.

          RESTORE could not start database 'databasename'.




          This isn't very intuitive. However if you look deeper in SQL Server's event logs, you will see more useful errors (just one example):




          Database 'databasename' cannot be started because some of the database functionality is not available in the current edition of SQL Server.

          Database 'databasename' cannot be started in this edition of SQL Server because it contains a partition function '_dta_pf__9987'. Only Enterprise edition of SQL Server supports partition functions.




          Now, that's not quite true - you can also restore to Evaluation Edition or Developer Edition, but that's beside the point. In order to restore this database, you basically have two options:




          1. Restore to an appropriate edition of SQL Server - which will mean locating or installing a new instance.

          2. Restore the backup on the source server as a new database with a different name, remove any and all Enterprise features, then backup the database again, and restore that on the lesser edition. (In this specific case, I left the name of the partition function in the error message, because this seems like a discardable thing anyway - it was created by the Database Engine Tuning Advisor and may have been done so by someone who didn't quite know what they were doing. This isn't always the case.)


          A variation on (2) would be to just remove the partitioning and other features on the source database, and take another backup. But if it ain't broke...






          share|improve this answer




























            14












            14








            14







            From Developer to Enterprise will be fine, just be sure that if you are using processor licensing you have licenses on the target server to cover all of the CPUs. And it's not enough to just hide them from SQL, if they're physically connected to the machine, you're responsible for them.



            Also when you go from a lower build to a higher build your database version will increase. There are a few scenarios where this can be problematic - e.g. if you are using 15,000 partition support on a specific build of 2008 it will not work when you upgrade to a specific build of 2008 R2. You may also be relying on optimizations (and have workarounds in place) that are actually bugs in an older build but are fixed in the new build, and this may lead to worse performance. It is also vital to review any trace flags in use at the source and determine if they should also be enabled at the destination. Never mind jobs, logins, etc.



            Of course you cannot go backwards. I've never tried a minor downgrade like 10.0.5512 -> 10.0.5500 but it is definitely not possible to go down in service pack or version. So if you have a 2012 database on your Developer Edition instance and you want to put it on your 2008 instance in production, you'll have your work cut out for you (see here and here) - especially if you've used 2012 features.





            But to cover other cases that might land people at this question (e.g. someone wants to go from Developer -> Standard or Enterprise -> Express or what have you)...



            There are other edition -> edition upgrades that won't go so well, e.g. from Developer -> Express if you've used any features that aren't supported in Express (and same goes for any edition other than Enterprise really). Some examples of features you won't be able to use on down-level editions (in which case the restore will die at the point it tries to bring the database online):




            • Partitioning

            • Change Data Capture

            • Data Compression

            • Transparent Data Encryption


            I don't know if there's a way to tell this directly from the .BAK file (I'm sure there's some magic that can be extracted from page headers somewhere, or if you've got a weekend to burn with a hex editor), but while the database is still intact on the source instance, you can always do the following to see if you're using any features that are available because of the SKU you're in:



            SELECT feature_name FROM sys.dm_db_persisted_sku_features;


            I'm not sure if SQL Server Audit should be on that list - the edition exclusivity of that feature has changed, so it probably depends on what you're doing with it. There are other things that you might be using but won't show up in the DMV (some because they are in your code, which the DMV doesn't parse, and some because your database is relying on external things such as SQL Server Agent, Service Broker, etc.):




            • mirroring

            • certain forms of replication

            • log shipping

            • database snapshots

            • online indexing

            • updateable distributed partitioned views

            • backup compression

            • policy-based management

            • plan guides

            • database mail

            • maintenance plans

            • full-text search


            There are also cases where you won't be able to go from Developer to Express because of file size limitations (Express databases are limited to 10GB in total data file size).



            Of course there may be other gotchas that you won't be warned about - they won't prevent the migration, but they might lead to very different performance on the target. Examples:




            1. Different memory / CPU limitations on the target edition (or even the underlying operating system on the target). This bit a lot of people who went from 2008 R2 Enterprise to 2012 Enterprise (CAL), where the service is artificially limited to the first 20 cores). This can lead to straightforward performance differences (not enough memory to satisfy a query, for example, or much slower parallel query performance); more subtle ones include plan choices that are made because of the different underlying hardware.

            2. Reliance on features such as indexed view matching on the source will not be automatically respected on the target without changing source code to use NOEXPAND. And you may not even be aware that this capability is why your queries suddenly slow down.

            3. Same goes for parallel index operations and probably a slew of other optimizations that aren't coming to mind this moment (thankfully I work almost exclusively in the Enterprise space, so I don't have to worry about the limitations of lower editions in most cases).


            UPDATE based on this duplicate:



            There may be cases where you try to restore a database from a certain edition to a lesser edition (even on the same version), and you get errors that are less than helpful:




            RESTORE failed for server 'serverinstance'.

            RESTORE could not start database 'databasename'.




            This isn't very intuitive. However if you look deeper in SQL Server's event logs, you will see more useful errors (just one example):




            Database 'databasename' cannot be started because some of the database functionality is not available in the current edition of SQL Server.

            Database 'databasename' cannot be started in this edition of SQL Server because it contains a partition function '_dta_pf__9987'. Only Enterprise edition of SQL Server supports partition functions.




            Now, that's not quite true - you can also restore to Evaluation Edition or Developer Edition, but that's beside the point. In order to restore this database, you basically have two options:




            1. Restore to an appropriate edition of SQL Server - which will mean locating or installing a new instance.

            2. Restore the backup on the source server as a new database with a different name, remove any and all Enterprise features, then backup the database again, and restore that on the lesser edition. (In this specific case, I left the name of the partition function in the error message, because this seems like a discardable thing anyway - it was created by the Database Engine Tuning Advisor and may have been done so by someone who didn't quite know what they were doing. This isn't always the case.)


            A variation on (2) would be to just remove the partitioning and other features on the source database, and take another backup. But if it ain't broke...






            share|improve this answer















            From Developer to Enterprise will be fine, just be sure that if you are using processor licensing you have licenses on the target server to cover all of the CPUs. And it's not enough to just hide them from SQL, if they're physically connected to the machine, you're responsible for them.



            Also when you go from a lower build to a higher build your database version will increase. There are a few scenarios where this can be problematic - e.g. if you are using 15,000 partition support on a specific build of 2008 it will not work when you upgrade to a specific build of 2008 R2. You may also be relying on optimizations (and have workarounds in place) that are actually bugs in an older build but are fixed in the new build, and this may lead to worse performance. It is also vital to review any trace flags in use at the source and determine if they should also be enabled at the destination. Never mind jobs, logins, etc.



            Of course you cannot go backwards. I've never tried a minor downgrade like 10.0.5512 -> 10.0.5500 but it is definitely not possible to go down in service pack or version. So if you have a 2012 database on your Developer Edition instance and you want to put it on your 2008 instance in production, you'll have your work cut out for you (see here and here) - especially if you've used 2012 features.





            But to cover other cases that might land people at this question (e.g. someone wants to go from Developer -> Standard or Enterprise -> Express or what have you)...



            There are other edition -> edition upgrades that won't go so well, e.g. from Developer -> Express if you've used any features that aren't supported in Express (and same goes for any edition other than Enterprise really). Some examples of features you won't be able to use on down-level editions (in which case the restore will die at the point it tries to bring the database online):




            • Partitioning

            • Change Data Capture

            • Data Compression

            • Transparent Data Encryption


            I don't know if there's a way to tell this directly from the .BAK file (I'm sure there's some magic that can be extracted from page headers somewhere, or if you've got a weekend to burn with a hex editor), but while the database is still intact on the source instance, you can always do the following to see if you're using any features that are available because of the SKU you're in:



            SELECT feature_name FROM sys.dm_db_persisted_sku_features;


            I'm not sure if SQL Server Audit should be on that list - the edition exclusivity of that feature has changed, so it probably depends on what you're doing with it. There are other things that you might be using but won't show up in the DMV (some because they are in your code, which the DMV doesn't parse, and some because your database is relying on external things such as SQL Server Agent, Service Broker, etc.):




            • mirroring

            • certain forms of replication

            • log shipping

            • database snapshots

            • online indexing

            • updateable distributed partitioned views

            • backup compression

            • policy-based management

            • plan guides

            • database mail

            • maintenance plans

            • full-text search


            There are also cases where you won't be able to go from Developer to Express because of file size limitations (Express databases are limited to 10GB in total data file size).



            Of course there may be other gotchas that you won't be warned about - they won't prevent the migration, but they might lead to very different performance on the target. Examples:




            1. Different memory / CPU limitations on the target edition (or even the underlying operating system on the target). This bit a lot of people who went from 2008 R2 Enterprise to 2012 Enterprise (CAL), where the service is artificially limited to the first 20 cores). This can lead to straightforward performance differences (not enough memory to satisfy a query, for example, or much slower parallel query performance); more subtle ones include plan choices that are made because of the different underlying hardware.

            2. Reliance on features such as indexed view matching on the source will not be automatically respected on the target without changing source code to use NOEXPAND. And you may not even be aware that this capability is why your queries suddenly slow down.

            3. Same goes for parallel index operations and probably a slew of other optimizations that aren't coming to mind this moment (thankfully I work almost exclusively in the Enterprise space, so I don't have to worry about the limitations of lower editions in most cases).


            UPDATE based on this duplicate:



            There may be cases where you try to restore a database from a certain edition to a lesser edition (even on the same version), and you get errors that are less than helpful:




            RESTORE failed for server 'serverinstance'.

            RESTORE could not start database 'databasename'.




            This isn't very intuitive. However if you look deeper in SQL Server's event logs, you will see more useful errors (just one example):




            Database 'databasename' cannot be started because some of the database functionality is not available in the current edition of SQL Server.

            Database 'databasename' cannot be started in this edition of SQL Server because it contains a partition function '_dta_pf__9987'. Only Enterprise edition of SQL Server supports partition functions.




            Now, that's not quite true - you can also restore to Evaluation Edition or Developer Edition, but that's beside the point. In order to restore this database, you basically have two options:




            1. Restore to an appropriate edition of SQL Server - which will mean locating or installing a new instance.

            2. Restore the backup on the source server as a new database with a different name, remove any and all Enterprise features, then backup the database again, and restore that on the lesser edition. (In this specific case, I left the name of the partition function in the error message, because this seems like a discardable thing anyway - it was created by the Database Engine Tuning Advisor and may have been done so by someone who didn't quite know what they were doing. This isn't always the case.)


            A variation on (2) would be to just remove the partitioning and other features on the source database, and take another backup. But if it ain't broke...







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 13 '17 at 12:42









            Community

            1




            1










            answered Jan 30 '13 at 23:29









            Aaron BertrandAaron Bertrand

            154k18300496




            154k18300496

























                3














                Developer and Enterprise are the same software, just with different licensing agreements.



                You should be fine restoring this database at your destination.






                share|improve this answer




























                  3














                  Developer and Enterprise are the same software, just with different licensing agreements.



                  You should be fine restoring this database at your destination.






                  share|improve this answer


























                    3












                    3








                    3







                    Developer and Enterprise are the same software, just with different licensing agreements.



                    You should be fine restoring this database at your destination.






                    share|improve this answer













                    Developer and Enterprise are the same software, just with different licensing agreements.



                    You should be fine restoring this database at your destination.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 30 '13 at 21:19









                    Mark HendersonMark Henderson

                    381214




                    381214























                        0














                        i am having this problem, i am trying to restore from 2008 standard to 2008 enterprise, and getting this error message



                        TITLE: Microsoft SQL Server Management Studio



                        Restore failed for Server ''. (Microsoft.SqlServer.SmoExtended)



                        For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476





                        ADDITIONAL INFORMATION:



                        System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.4042. That version is incompatible with this server, which is running version 10.00.1600. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.Smo)



                        For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&LinkId=20476





                        BUTTONS:



                        OK





                        share








                        New contributor




                        Chris Rowley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.

























                          0














                          i am having this problem, i am trying to restore from 2008 standard to 2008 enterprise, and getting this error message



                          TITLE: Microsoft SQL Server Management Studio



                          Restore failed for Server ''. (Microsoft.SqlServer.SmoExtended)



                          For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476





                          ADDITIONAL INFORMATION:



                          System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.4042. That version is incompatible with this server, which is running version 10.00.1600. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.Smo)



                          For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&LinkId=20476





                          BUTTONS:



                          OK





                          share








                          New contributor




                          Chris Rowley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.























                            0












                            0








                            0







                            i am having this problem, i am trying to restore from 2008 standard to 2008 enterprise, and getting this error message



                            TITLE: Microsoft SQL Server Management Studio



                            Restore failed for Server ''. (Microsoft.SqlServer.SmoExtended)



                            For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476





                            ADDITIONAL INFORMATION:



                            System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.4042. That version is incompatible with this server, which is running version 10.00.1600. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.Smo)



                            For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&LinkId=20476





                            BUTTONS:



                            OK





                            share








                            New contributor




                            Chris Rowley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.










                            i am having this problem, i am trying to restore from 2008 standard to 2008 enterprise, and getting this error message



                            TITLE: Microsoft SQL Server Management Studio



                            Restore failed for Server ''. (Microsoft.SqlServer.SmoExtended)



                            For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476





                            ADDITIONAL INFORMATION:



                            System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.4042. That version is incompatible with this server, which is running version 10.00.1600. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.Smo)



                            For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&LinkId=20476





                            BUTTONS:



                            OK






                            share








                            New contributor




                            Chris Rowley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.








                            share


                            share






                            New contributor




                            Chris Rowley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            answered 4 mins ago









                            Chris RowleyChris Rowley

                            1




                            1




                            New contributor




                            Chris Rowley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.





                            New contributor





                            Chris Rowley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






                            Chris Rowley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Database Administrators Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f33870%2frestore-database-from-backup-file-of-different-version-edition%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                ORA-01691 (unable to extend lob segment) even though my tablespace has AUTOEXTEND onORA-01692: unable to...

                                Always On Availability groups resolving state after failover - Remote harden of transaction...

                                Circunscripción electoral de Guipúzcoa Referencias Menú de navegaciónLas claves del sistema electoral en...