BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MG18
Lapis Lazuli | Level 10

Hi All,

 

I am trying to create an oracle library using SAS/ACCESS and i am able to create  it and libname is shown below :-

 

LIBNAME FIN_PROD ORACLE  PATH="172.21.00.40:1521/******"  SCHEMA=T****M  AUTHDOMAIN="F**_PROD_AUTH" ;

 

which is running fine also. but sometime Our client wanted to do extraction from DR server having ip address 172.31.00.40 and other details are same only ip is different. we are having 50/60 job in which we have this libaname and every time we are changing this libname and redeploying those jobs which is very hectic task 😛 .

 

is there any other different way to create library in SAS where we can store this ip and can be  changed whenever we want?

what are the different type of creating SAS library For oracle engine   ? what is the workout for above problem ?

Please provide some other link from  where i can get this information.

Many many thanks in Advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Use a macro variable:

%let oraclehost=172.21.00.40;

libname fin_prod oracle path="&oraclehost.:1521/******" schema=T****M  authdomain="F**_PROD_AUTH" ;

If you use &oraclehost in all your libname or connect statements, you only need to set it once (eg in autoexec.sas) and maintain it there.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

Use a macro variable:

%let oraclehost=172.21.00.40;

libname fin_prod oracle path="&oraclehost.:1521/******" schema=T****M  authdomain="F**_PROD_AUTH" ;

If you use &oraclehost in all your libname or connect statements, you only need to set it once (eg in autoexec.sas) and maintain it there.

SASKiwi
PROC Star

In my experience it is unusual to specify server IP addresses in a library definition. We use server aliases for all of our library definitions so our code doesn't change when switching between Production and DR. The actual IP switching is done by IT Admin. Not sure if this approach would suit you or not though.

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 connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1367 views
  • 3 likes
  • 3 in conversation