BookmarkSubscribeRSS Feed
Dee2
Obsidian | Level 7

Can Enterprise Guide pass through a SAS table to Oracle? I didn't find the syntax online. Can someone please help? Thanks.

13 REPLIES 13
Reeza
Super User

Assuming you have permissions to create tables in your Oracle server, yes.

How are you typically connecting to your server, via explicit pass through or do you have an ODBC connection set up?

 


@Dee2 wrote:

Can Enterprise Guide pass through a SAS table to Oracle? I didn't find the syntax online. Can someone please help? Thanks.


 

NicoM
Obsidian | Level 7

Yes. If you can define a SAS library to the Oracle database this is possible. In that case you can use a regular data step or PROC SQL to create a table (assuming that you have permissions to create tables) in that library and it will appear in the database.

If you do not have permissions to create tables on the database it is still possible that you are allowed to insert records into a table.

 

Do you have a SAS library assigned to the Oracle database?

Dee2
Obsidian | Level 7

I don't know if there is a SAS library assigned to the Oracle database. Do I find out from the SAS side or Oracle? Thanks.

Reeza
Super User
Since you want to push the data from SAS to Oracle, you need a connection in SAS to Oracle. You would check in SAS for the connection.
Dee2
Obsidian | Level 7

Thank you.

SASKiwi
PROC Star

You also need a SAS product that can connect to Oracle installed like SAS/ACCESS to Oracle or SAS/ACCESS to ODBC. You can confirm if you have such a product installed and licensed by running this:

proc product_status;
run;
proc setinit;
run;
Dee2
Obsidian | Level 7

Thanks. I think it does. I saw the expire date.

Sajid01
Meteorite | Level 14

Hello @Dee2 
1. You wanted to know how to pass SAS table to oracle.
The following reference has all the details and will hopefully solve all your problems.
https://support.sas.com/resources/papers/proceedings/proceedings/sugi29/106-29.pdf 

2.Your second question is 

"I don't know if there is a SAS library assigned to the Oracle database. Do I find out from the SAS side or Oracle?."
The simplest approach for an answer to this question ask your team / manager. 

 

Dee2
Obsidian | Level 7

Thank you. I will check out the link.

SASKiwi
PROC Star

@Dee2  - Do you have SAS administrators available to you? They should be able to tell you if they have EG data libraries pointing to Oracle or not or at least guide you how to do it.  

Dee2
Obsidian | Level 7

Yes, I will. Thanks. I thought it might be a temporary quicker approach before asking the administrator. 😀

SASKiwi
PROC Star

@Dee2  - I'm a SAS administrator where I work and when we create data libraries for all SAS users in SAS Enterprise Guide and they point to an external database we add SQL on the front of the name so it is obvious they aren't SAS dataset libraries. Perhaps you could suggest a similar approach with your administrator.

Sajid01
Meteorite | Level 14

Well then you must create the libraries in the SAS Management console and preassign them or alternatively use   autoexec_usermod.sas..
Second about the original question of passing SAS tables to oracle, have a look at the link that I shared in my earlier post.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 13 replies
  • 1118 views
  • 9 likes
  • 5 in conversation