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

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

@SSS20

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:

Capture.PNG

 

Capture.PNG 

View solution in original post

5 REPLIES 5
LinusH
Tourmaline | Level 20

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)

http://support.sas.com/documentation/cdl/en/biasag/63854/HTML/default/viewer.htm#n11015intelplatform...

Data never sleeps
Patrick
Opal | Level 21

@SSS20

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

http://support.sas.com/documentation/cdl/en/acreldb/69580/HTML/default/viewer.htm#p1aukl464makuln1ms...  

SSS20
Fluorite | Level 6

Hi @LinusHa and ,

 

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

http://support.sas.com/documentation/cdl/en/acreldb/69580/HTML/default/viewer.htm#p1aukl464makuln1ms...

 

it’s  specified that option has to be used on the libname statement and on

http://support.sas.com/documentation/cdl/en/biasag/63854/HTML/default/viewer.htm#n11015intelplatform...

 

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!!!

Patrick
Opal | Level 21

@SSS20

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:

Capture.PNG

 

Capture.PNG 

SSS20
Fluorite | Level 6

Hello Guys,

 

Thank you a lot for your availability to help me with this question!!!

 

Kind Regards,

 

sas-innovate-2024.png

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!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1289 views
  • 5 likes
  • 3 in conversation