Hi there,
I have a problem when the services are started, connections to the oracle are created by the sessions started by the PooledWorkspaceServer and the StoredProcessServer. However when we stop these services the sessions created continue in Oracle data base, in this way, the bd is suffering problems to reach the maximum limit of connections that are configured in the db.
These ORACLE libraries are preassigned in Metadata in such a way that all SAS sessions started by the sas.servers services, in particular the Object Spawner, which starts SAS sessions from the stored process or pooled workspace session, and the OLAPServer connections to the Bb, for having pre-allocated libraries.
My question is: Is there any way to end these sessions when we stop services?
Thanks in advance.
DEFER is a libname option which you define as part of a libname definition. You can define any library via SAS Metadata or directly in SAS code.
The second link you've posted has nothing to do with this. That's about executing code during SAS session invocation or SAS session termination.
Example for a metadata library definition with the ODBC engine that is pre-assigned and with defer=yes:
It seems that you can specify SAS code to execute at "system boundaries", start and stop of the server.
Perhaps you could do a libname _all_ clear; there? (untested)
On top of what @LinusH suggests I'm normally using "defer=yes" for all pre-assigned libraries so a process only establishes a connection if it's required.
DEFER= LIBNAME Option
Hi @LinusHa and Patrick,
Many thanks for your prompt response, it looks like this will work, but I still have the following doubt:
about DEFER Option, on sas support reference
it’s specified that option has to be used on the libname statement and on
It’s specified that we can add code, so on that code should appear all ORACLE libname statements with DEFER Option, but would those ORACLE libname overwrite, libnames defined on Metadata that are not defined by SAS/BASE code?.
Can you help me in more this one doubt?
Thanks a lot for your availability!!!
DEFER is a libname option which you define as part of a libname definition. You can define any library via SAS Metadata or directly in SAS code.
The second link you've posted has nothing to do with this. That's about executing code during SAS session invocation or SAS session termination.
Example for a metadata library definition with the ODBC engine that is pre-assigned and with defer=yes:
Hello Guys,
Thank you a lot for your availability to help me with this question!!!
Kind Regards,
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.