BookmarkSubscribeRSS Feed
Fluorite | Level 6
Hello! Is it possible to disassociate a libref that was preassigned? And do it in a stored process?
Tourmaline | Level 20

I haven't found any specific information about this, but it would make sense if this is possible only in session scope.

Have you tried?


Data never sleeps
Fluorite | Level 6

Hello LinusH,

we have limited oracle sessions count in one of the environments, thus we need to reduce the number of oracle librefs. This is why we try to disassociate some of them.

What do you mean by session scope? I know that it's possible to assign and clear the libname in a single session, but we have the librefs preassigned, unfortuntelly.


Onyx | Level 15

Won't just this:

libname LIB clear;

in autoexec in EG do the thing?


In SAS EG project tree add a program named "autoexec" and insert that line there.



Polish SAS Users Group: and

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation

Fluorite | Level 6

Thanks yabwon!

We haven't tried this but wouldn't it be the same as "libname x clear" in stp code?

Still it's worth a shot 😉 I'll get back.

Fluorite | Level 6

Fail 😞

The warning is the same as in the open code: "libref was not declared in this scope"

Regards! 🙂


Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


Register now!

Discussion stats
  • 6 replies
  • 1 like
  • 3 in conversation