5

We have encountered a critical error today - we are no longer able to create bacpac files of our live Azure production databases. Everything was working up until now, and suddenly we've started encountering the following error:

Error encountered during the service operation. Could not extract package from specified database. Error SQL70015: Deprecated feature 'String literals as column aliases' is not supported on SQL Azure.

We have a complex database schema which has been deployed live to Azure for over a year. We are relying on daily bacpacs are our only backup strategy - need help to figure out how to resume making bacpacs.

2 Answers 2

7

well I fell your pain... the answer here is: Replace your schema...There's no other way...
Instead of 'Column Name' use [Column Name]... instead of Select CryptColumnA 'Column A' from myTable use Select CryptColumnA as [Column A] from myTable and so forth...

12
  • I agree with both of you. This was a crappy breaking change for them to have made without making sure everybody was aware of this and this is likely your only solution - "fix it". Really unfortunate situation. I really hope you didn't have production code depending on this! If so, I'd go check your stored procs/functions/views now (that's likely what's in the backup causing this error).
    – Jaxidian
    Apr 29, 2013 at 17:14
  • How do we go about doing this? We have a large business database with hundreds of tables, and there is no single create script for it, because it's versioned. How do we discover which columns need to be altered? Also, changing the database schema is challenging because we do it only when we roll out a new version of the software. We are in production, bigtime, with dozens of databases and live customers using them! Apr 29, 2013 at 17:31
  • @davidair Management Studio 2012 has a feature called "Script Database" that can help you! just right click the database->Script Database As
    – Leonardo
    Apr 29, 2013 at 17:46
  • So what exactly do I need to fix? Sprocs? UDFs? Views? Indexed Views? I tried creating a small database with one table and one UDF, it bacpac'ed alright: CREATE FUNCTION GetNames() RETURNS TABLE AS RETURN (SELECT Name 'Person Name' from Test) Our production database has almost 2000 sprocs, and about 200 views... it's going to be a royal pain to review! Apr 29, 2013 at 18:32
  • I bet you need to look at sprocs, functions, and/or views. Just script it out via SSMS and use a regex to find offending code/schemas. While this may be a pita, it shouldn't be too terrible. You shouldn't need any data scripted. Ultimately, I've yet to find documentation on this change hitting yesterday/today so I'm guessing right now.
    – Jaxidian
    Apr 29, 2013 at 18:53
0

We have filed a support ticket with Microsoft and the issue was acknowledged as a bug. We only had a problem with bacpac export, not import - and apparently it was due to a SQL Azure change which hardened some of the export validations.

To make the long story short, the issue has been fixed by Microsoft and we are no longer experiencing the problem - and that is without any schema changes on our end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.