BookmarkSubscribeRSS Feed
Dmitriy1
Calcite | Level 5

Hi!
In the SAS Manadment Console, when the server is configured, the Path field is filled in as follows
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = XXX.XXX.XXX.XXX) (PORT = 1521))) (CONNECT_DATA = (sid = orc1))).
When I try to view the library that accesses this server in SAS Enterprisse Guide, I get an error

Exception type: SAS.EG.SDS.SDSException
SAS Message: [Error] ORACLE connection error: ORA-12505: TNS: listener does not know of SID given in connect descriptor.

Raw Message: <? Xml version = '1.0'?> <Exceptions> <Exception> <SASMessage severity = 'Error'> ORACLE connection error: ORA-12505: SIN given in connect descriptor. / SASMessage> </ Exception> </ Exceptions>
Source: SAS.EG.SDS.Model
Target Site: Assign

Stack Trace:
   at SAS.EG.SDS.Model.Library.Assign ()
   at SAS.EG.SDS.Model.Library.PopulateDatasets (Collection & collection)
   at SAS.EG.SDS.Model.Broker.PopulateCollection (Collection collection)
   at SAS.EG.SDS.Model.Collection.DoPopulate ()
   at SAS.EG.SDS.Views.View.DoPopulate (DisplayOperation & op).

 

The SID field is taken from the tnsnames.ora file. oracle client works normally using the tnsnames.ora file.

Tell me what can be wrong.

3 REPLIES 3
LinusH
Tourmaline | Level 20
Do you have any Oracle connection that works?
If no, be sure that have performed all configuration steps for SAS/ACCESS to Oracle.
If yes, have an Oracle DBA look through your tnsnames file and libname options.
Data never sleeps
SASKiwi
PROC Star

I find it easier to test database connection strings in a LIBNAME statement first before setting up libraries in metadata. Have you tried that? From what I can see it looks like you are trying to bypass the TNSNAMES.ORA definition by defining everything in the connection string - is that correct? It might be easier to try a LIBNAME with the PATH= option to reference an existing TNSNAMES.ORA defined database.

AhmedAl_Attar
Rhodochrosite | Level 12

Hi @Dmitriy1 Try to Right Click on the Library/Libname in SAS Management Console and selecting "Display Libname Statement". You'll see the Generated Libname Statement does not match the syntax of your definition! Hence you are getting the Error!

 

While the SAS/ACCESS to ORACLE Documentation shows an example on how connects to Oracle without updating the TNSNAMES.ORA file

libname x oracle user=myusr1 pw=mypwd1 
  path="(DESCRIPTION= 
          (ADDRESS_LIST=
            (ADDRESS= (PROTOCOL=TCP)(HOST=pinkfloyd)(PORT=1521))
             )
              (CONNECT_DATA= 
       "  	     (SID=alien)
       "   )
       " )
       " ";

That doesn't mean, the SAS Management Console would translate the library definition the same way!

 

It's safer to modify the TNSNAMES.ora file accessible to your SAS Server(s) to include the Oracle connection settings.

Just my 2 cents,

Ahmed

 

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 1580 views
  • 0 likes
  • 4 in conversation