none
Can not import stored procedure from SQL Azure V12. RRS feed

  • Question

  • I've imported stored procedures / functions to EF before, but when I try it against a SQL Azure V12 database, the stored procedures aren't recognized by the tools. Not in the Update Wizard and not in the Model Browser. Any Ideas?

    Mike Yeager

    Friday, February 27, 2015 8:29 PM

Answers

  • OPERATOR ERROR: Hi Erik. Thanks for the prompt reply. As we were working on your suggestion, someone noticed that the account we were running under was different than the account we used to create the stored procedure. Apparently, our problem was that no one explicitly gave execute permission for that stored proc to that user and since that user wasn't the admin...

    Mike Yeager

    • Marked as answer by Mike E Yeager Monday, March 2, 2015 7:18 PM
    Monday, March 2, 2015 7:18 PM

All replies

  • Start by investigating why this does not return anything:

    SELECT
           quotename(SPECIFIC_SCHEMA) + quotename(SPECIFIC_NAME) [Id]
           , SPECIFIC_CATALOG         [CatalogName]
           , SPECIFIC_SCHEMA          [SchemaName]
           , SPECIFIC_NAME            [Name]
           FROM
           INFORMATION_SCHEMA.ROUTINES
           WHERE
           NOT (ROUTINE_SCHEMA = 'dbo'
           AND ROUTINE_NAME LIKE 'dt[_]%'
           AND SUBSTRING(CAST(SERVERPROPERTY('productversion') as varchar(20)),1,1) = 8)
           AND (DATA_TYPE != 'TABLE' OR DATA_TYPE is null)
           AND ROUTINE_TYPE = 'PROCEDURE'
         


    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    Friday, February 27, 2015 8:57 PM
  • OPERATOR ERROR: Hi Erik. Thanks for the prompt reply. As we were working on your suggestion, someone noticed that the account we were running under was different than the account we used to create the stored procedure. Apparently, our problem was that no one explicitly gave execute permission for that stored proc to that user and since that user wasn't the admin...

    Mike Yeager

    • Marked as answer by Mike E Yeager Monday, March 2, 2015 7:18 PM
    Monday, March 2, 2015 7:18 PM