SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Creating Oracle library in SAS 9.3

Accepted Solution Solved
Reply
Contributor
Posts: 50
Accepted Solution

Creating Oracle library in SAS 9.3

[ Edited ]

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 Smiley Tongue .

 

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.


Accepted Solutions
Solution
3 weeks ago
Super User
Posts: 8,062

Re: Creating Oracle library in SAS 9.3

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Solution
3 weeks ago
Super User
Posts: 8,062

Re: Creating Oracle library in SAS 9.3

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 3,306

Re: Creating Oracle library in SAS 9.3

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.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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