BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
marcosemeao
Fluorite | Level 6

People,

How to substitute the pass through comand for libname


connect to oracle as myconn (user=smith password=secret
path='myoracleserver');

 

for libname sintax

1 ACCEPTED SOLUTION

Accepted Solutions
AndreasWindisch
Obsidian | Level 7

Hey,

  

if you use a environment with a Metadata Server (normally BI Server) you could use a Authentication Domain (libname option 'authdomain='). You will have to setup the library in the Metadata Server first, but that are a few steps.

 

This paper will give you a short overview (it is some days older, but the steps are the same until now).
http://support.sas.com/techsup/technote/ts771.pdf

 

Best regards,
Andreas

 

View solution in original post

7 REPLIES 7
r_behata
Barite | Level 11
PROC SQL;    
  CONNECT TO ORACLE (user=user password="password" path=schema);
  CREATE TABLE LIBRARY.tab_nm AS
   SELECT *       
      FROM CONNECTION TO ORACLE          
       (
           <Your ORACLE SQL query here>
     	);
  DISCONNECT
  FROM ORACLE; 
 QUIT;
marcosemeao
Fluorite | Level 6

thanks r_behata!

 

But I cant show my user and  password at code.

 

I need to have a way that my user and password can't  be seen by other users that can access my program.sas or log.

 

Regards

Reeza
Super User
It's stage 1 & 2 here:
https://documentation.sas.com/?docsetId=bidsag&docsetTarget=p1t9q2knb9tq5ln101dkrdsa9ymf.htm&docsetV...

Yes, this is for data integration studio, but the idea is the same for a desktop here. Set up the ODBC connection (or whatever connection in user dsn) and then use a libname statement.

libname name8cha odbc schema="dbo" noprompt="server=XXXXXXX,YYYY;DRIVER=SQL Server;Trusted_Connection=yes;database=dbname";

That's an example of my connection string.
AndreasWindisch
Obsidian | Level 7

Hey,

  

if you use a environment with a Metadata Server (normally BI Server) you could use a Authentication Domain (libname option 'authdomain='). You will have to setup the library in the Metadata Server first, but that are a few steps.

 

This paper will give you a short overview (it is some days older, but the steps are the same until now).
http://support.sas.com/techsup/technote/ts771.pdf

 

Best regards,
Andreas

 

marcosemeao
Fluorite | Level 6

I'm sorry for the delay in replying

 

My client uses connection in SQL.


CONNECT TO ODBC AS SQLCON
(DSN = BW_PROD USER = SRV_SASLayout PWD = "XXXXXXX%" READ_ISOLATION_LEVEL = 'RU');

 

Thanks for the tips and I'm reviewing what you have sent

 

I'll test the alternatives.

 

thankful

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1105 views
  • 5 likes
  • 5 in conversation