locked
Running SQLMetal against a SQL Azure database generates errors RRS feed

  • Question

  • Hi

    I'm running sqlmetal against a SQL Azure database and get the following error repeated for all my tables:

    Warning : SQM1012: Unable to extract table 'dbo.xxx' from SqlServer. Invalid object name 'syscomments'.

    When I run the command against the same database copied locally I get no errors at all.


    Any ideas?

    Thanks


    Thursday, August 14, 2014 9:58 AM

Answers

  • Hi,

    I'm currently running with same issue as well. What I also noticed is that when I schema compared between 'my local sql server' and 'Azure sql server', there is definitely some difference. Couldn't get to what those errors are. I really wonder, if thats possible to run SqlMetal again Azure Sql server database at all?

    Thanks

    Dayal


    Dayal

    Hi Dayal,

    Currently,the sqlMetal.exe tool does not support to generate source code and mapping attributes from a SQL azure database. In addition, you can submit a feedback or a feature request to Microsoft. So that we can try to modify and expand the product features based on your needs.

    You can provide a feedback on the below link.

    http://feedback.azure.com/forums/217321-sql-database

    Regards,


    Sofiya Li
    TechNet Community Support

    • Marked as answer by Mekh Subba Tuesday, November 18, 2014 10:05 AM
    Tuesday, August 26, 2014 3:01 AM

All replies

  • Hi sergiogove,

    According to your description, I do a test in my SQL Azure database, the same warnings are showing as your post. When you use the tools of SqlMetal.exe to generate source code and mapping attributes from a SQL azure database, it will fail due to no syscomments object.

    So I recommend you use the generate scripts option from SSMS on a SQL Azure database, or as your post, you use the  SqlMetal.exe tools to generate source code from the same on-premise database after migrating the SQL Azure database to on premise.

    Regards,
    Sofiya Li

    If you have any feedback on our support, please click here.


    Sofiya Li
    TechNet Community Support

    Friday, August 15, 2014 2:44 AM
  • Hi Sofiya

    Thank you for your reply. My current solution has been to keep a local copy on the build server and running the sqlmetal command on that but it feels dirty and I was looking for a cleaner approach.

    Thanks again
    Sergio

    Friday, August 15, 2014 8:39 AM
  • Hi,

    I'm currently running with same issue as well. What I also noticed is that when I schema compared between 'my local sql server' and 'Azure sql server', there is definitely some difference. Couldn't get to what those errors are. I really wonder, if thats possible to run SqlMetal again Azure Sql server database at all?

    Thanks

    Dayal


    Dayal

    Tuesday, August 19, 2014 5:16 AM
  • Hi,

    I'm currently running with same issue as well. What I also noticed is that when I schema compared between 'my local sql server' and 'Azure sql server', there is definitely some difference. Couldn't get to what those errors are. I really wonder, if thats possible to run SqlMetal again Azure Sql server database at all?

    Thanks

    Dayal


    Dayal

    Hi Dayal,

    Currently,the sqlMetal.exe tool does not support to generate source code and mapping attributes from a SQL azure database. In addition, you can submit a feedback or a feature request to Microsoft. So that we can try to modify and expand the product features based on your needs.

    You can provide a feedback on the below link.

    http://feedback.azure.com/forums/217321-sql-database

    Regards,


    Sofiya Li
    TechNet Community Support

    • Marked as answer by Mekh Subba Tuesday, November 18, 2014 10:05 AM
    Tuesday, August 26, 2014 3:01 AM
  • Hi Sofiya

    Thank you for your reply. My current solution has been to keep a local copy on the build server and running the sqlmetal command on that but it feels dirty and I was looking for a cleaner approach.

    Thanks again
    Sergio

    Hi Sergio,

    As above post, you can use  the generate scripts option from SSMS on a SQL Azure database.

    For more information, see: http://blogs.msdn.com/b/sqlazure/archive/2010/05/24/10014071.aspx

    Regards,


    Sofiya Li
    TechNet Community Support

    Tuesday, August 26, 2014 3:05 AM