Architecting, installing and maintaining your SAS environment

ERROR: No metadata objects found matching the specified URI.

Accepted Solution Solved
Reply
Contributor
Posts: 47
Accepted Solution

ERROR: No metadata objects found matching the specified URI.

Hi

 

I am getting the below error message when I submit a libname statement on this library using the meta libname engine.  

 

libname tamedw2 meta library=edwref libdebug;
ERROR: No metadata objects found matching the specified URI.
ERROR: Error in the LIBNAME statement.

 

This library contains several views and metadata for each of them.  I have created a test library set up the same way and issued the same libname statement in the same environment and it works but for some reason this library it won't work.  Any ideas why this would be?  the libdebug option doesn't seem to give me anything for this error.

 

the metadata repository settings have all been set in the config so there is no need to set these options, and the fact that it works exactly the same way for another library doesn't make sense.

 

Any ideas?

 

thanks

Tammy


Accepted Solutions
Solution
‎09-08-2016 06:14 AM
PROC Star
Posts: 392

Re: ERROR: No metadata objects found matching the specified URI.

Hi Tammy,

 

That error message indicates it couldn't find the required library object. This could be due to a typo in the parameters or that the metadata identity being used doesn't have appropriate permissions to see the required library. 

 

In your example, is edwref the library name (i.e. the name of the metadata object that can have spaces in it) or the libref (standard libref naming rules - max 8 chars etc). Judging by the shortness of it I am wondering if it is the libref?

 

The library option is used to specify the name of the library and may appear to work if the library name is the same as the libref. If you want to look up a library by its libref then you need to switch to the liburi option and specify a query string that will uniquely identify the library. There are some examples in the documentation page LIBNAME Statement for the Metadata Engine. If edwref is a libref you can try:

 

libname tamedw2 meta liburi="SASLibrary?@libref='edwref'";

Bear in mind that if you have 2 libraries registered with the same libref then you'd need to add additional query string qualifiers to ensure you only get 1 result (or have unique names and switch back to using library= with the object name).

 

Cheers

Paul

View solution in original post


All Replies
Solution
‎09-08-2016 06:14 AM
PROC Star
Posts: 392

Re: ERROR: No metadata objects found matching the specified URI.

Hi Tammy,

 

That error message indicates it couldn't find the required library object. This could be due to a typo in the parameters or that the metadata identity being used doesn't have appropriate permissions to see the required library. 

 

In your example, is edwref the library name (i.e. the name of the metadata object that can have spaces in it) or the libref (standard libref naming rules - max 8 chars etc). Judging by the shortness of it I am wondering if it is the libref?

 

The library option is used to specify the name of the library and may appear to work if the library name is the same as the libref. If you want to look up a library by its libref then you need to switch to the liburi option and specify a query string that will uniquely identify the library. There are some examples in the documentation page LIBNAME Statement for the Metadata Engine. If edwref is a libref you can try:

 

libname tamedw2 meta liburi="SASLibrary?@libref='edwref'";

Bear in mind that if you have 2 libraries registered with the same libref then you'd need to add additional query string qualifiers to ensure you only get 1 result (or have unique names and switch back to using library= with the object name).

 

Cheers

Paul

Contributor
Posts: 47

Re: ERROR: No metadata objects found matching the specified URI.

Thanks so much Paul. I don't know how many times I read the doco for it and it must have gone over my head that I'd used a libref rather than the library name.  That has worked perfectly now.

PROC Star
Posts: 392

Re: ERROR: No metadata objects found matching the specified URI.

No problem Tammy. Great to hear it's working. Thanks for marking the post as solved too.

Super User
Posts: 5,256

Re: ERROR: No metadata objects found matching the specified URI.

Authorization or misspelling comes into my mind.

Hard to trouble shoot via the forum...

Data never sleeps
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 712 views
  • 7 likes
  • 3 in conversation