BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tammy_dezilva
Quartz | Level 8

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

1 ACCEPTED SOLUTION

Accepted Solutions
PaulHomes
Rhodochrosite | Level 12

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

4 REPLIES 4
PaulHomes
Rhodochrosite | Level 12

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

tammy_dezilva
Quartz | Level 8

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.

PaulHomes
Rhodochrosite | Level 12

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

LinusH
Tourmaline | Level 20

Authorization or misspelling comes into my mind.

Hard to trouble shoot via the forum...

Data never sleeps

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

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