Msg 2812, Level 16, State 62, Line 2 Could not find stored procedure 'xml_schema_namespace'.

  • Hi,

    my version is sql server is as follow

    SELECT @@VERSION

    Microsoft SQL Server 2012 - 11.0.2100.60 (X64)

    Feb 10 2012 19:39:15

    Copyright (c) Microsoft Corporation

    Express Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

    according to http://technet.microsoft.com/en-us/library/ms175562.aspx way of executing function and http://technet.microsoft.com/en-us/library/ms188332.aspx

    DECLARE @ret nvarchar(max);

    EXEC @ret=xml_schema_namespace @Relational_schema=N'dbo' , @XML_schema_collection_name =N'MyCollection';

    PRINT @ret;

    I received the following error:

    Msg 2812, Level 16, State 62, Line 2

    Could not find stored procedure 'xml_schema_namespace'.

    May I know what's wrong?

    thanks

  • Maybe you could explain in the first place why you expect there to be a function with that name? What does this query return:

    SELECT name, type, schema_id FROM sys.all_objects where name = 'xml_schema_namespace'

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • SELECT name, type, schema_id FROM sys.all_objects where name = 'xml_schema_namespace'

    return me an empty set.

    from http://technet.microsoft.com/en-us/library/ms190316.aspx

    This function returns an xml data type instance.

  • So this is a built-in system function, not a user-defined function. You cannot invoke built-in functions through EXEC. This is only possible with scalar user-defined functions.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply