About Author

Leonid Batkhan

Leonid Batkhan is a long-time SAS consultant and blogger. Currently, he is a Lead Applications Developer at F.N.B. Corporation. He holds a Ph.D. in Computer Science and Automatic Control Systems and has been a SAS user for more than 25 years. From 1995 to 2021 he worked as a Data Management and Business Intelligence consultant at SAS Institute. During his career, Leonid has successfully implemented dozens of SAS applications and projects in various industries. All posts by Leonid Batkhan >>>

10 Comments

  1. Michael O'Neil on

    It seems odd to me that SAS Metadata Server allows what it seems to deem must be a unique key to have duplicates in the first place. If it matters to the extent that specific error generation occurs, then it suggests to me that there should be a uniqueness constraint. This is a legacy of SAS origins in a time when every SAS user had a separate SAS process. If you used the libref "MYLIB" and I used the libref "MYLIB" our separate sessions kept us safe. Leonid, it is nice of you to help us with little tools that we can use, but this is really a design issue that SAS should resolve.

    • Leonid Batkhan

      You nailed it, Michael! (Or can I say "Neiled it"? 🙂 ) If you attempt to assign an existing Library Name to a new Library in SAS Management Console, it will display an Error pop-up window stating "A library named 'SomeName' is already assigned to the server 'SASApp'." preventing the new library creation. I agree that something similar could be done with the librefs too.

  2. Thanks Leonid! One quick note: if you click the "Show Details" button on the "duplicate librefs detected" window, it usually lists the duplicated libraries. The admin still has to take action to fix the issue, though.

  3. Great post Leonid! Could also be a pro-active approach for SAS admins to take to avoid SAS users getting the "Duplicate librefs detected" pop-up window. 😉

    I saw that you mentioned Metacoda Plug-ins in the additional resources - thanks for that. If a SAS administrator is not a programmer and has access to the Metacoda Library Reviewer, they can click on the LIBREF column heading and see the list of LIBREFs sorted alphabetically to identify the duplicates. https://platformadmin.com/blogs/paul/2022/03/metacoda-plug-ins-library-reviewer/

    Cheers,
    Michelle

    • Leonid Batkhan

      Thank you, Michelle!
      Metacoda is a great SAS administrator's tool. The programmatic approach to the metadata data libraries inventorization described in this post should empower all SAS admins (even those who do not yet have Metacoda 🙂 ).

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top