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.
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.
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.
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.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.