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 2025: Call for Content

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!

Submit your idea!

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
  • 1555 views
  • 3 likes
  • 3 in conversation