Desktop productivity for business analysts and programmers

Move dataset from Server to server

Accepted Solution Solved
Reply
Contributor
Posts: 26
Accepted Solution

Move dataset from Server to server

Hello,  Im currently having a problem with moving data between two different servers that both have a connection to me.

What im doing currently is:
1. Logg into server using Enterpriseguide        Server1->PC
2. Logging into local and transfer  PC-> Server2.

Since im able to do this by logging into the different servers there has to be an automatic way of transfering data (and accessing the data on different places through the code?) instead of manually clicking and having to move huge datasets to PC SSD which is rather slow.

What i want my code to do:

libname A "[path_server1]; (currently only accessable through logging into server with enterprise guide)
libname B "[path_server2]; (currently only accessable through local)

data  b.Results;
      set a.Results;
run;



Accepted Solutions
Solution
‎02-15-2018 06:27 AM
Community Manager
Posts: 3,462

Re: Move dataset from Server to server

The technique in that paper relies on SAS/CONNECT, which must be installed/configured on each of those SAS sessions so that you can run PROC UPLOAD/DOWNLOAD or use remote library services.

 

Another option is SAS/SHARE, which can make the data from one server available to any other SAS session on the network.  But that also requires a setup by an admin and a dedicated process.

 

So right now you do have at least two nodes on the network that can talk to both machines: SAS Enterprise Guide (your PC) and the SAS Metadata Server (which might even be the same node as one of those boxes).  So I agree with you that there must be a way to get these two machines to talk to one another.  

 

As others have said, there is a prerequisite human component: the right people have to talk to one another, and then tech connections can happen.   You might be able to help by collecting some info.  In EG, open the Servers list and check the Server properties of server1 and server2, then make note of the node names. This will help show that they are (or are not) on the same network zone.

View solution in original post


All Replies
Super User
Posts: 10,571

Re: Move dataset from Server to server

Could you tell us a bit more about your servers in terms of operating systems, SAS versions, and accessibility?

If you have the same OS and SAS versions, a simple sftp done from the commandline should do it.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 26

Re: Move dataset from Server to server

Posted in reply to KurtBremser

I work for a quite big Company. So honestly i am not sure, and are in no contact of these people.

i believe the server A, who needs server access, is linux based. The dataset itself is stored as  a sas dataset in a map on the harddrive.
The second server B i have no clue other than i have access to it through:


libname B1303_ST odbc dsn=[xxxx] schema = Stresstest dbindex=yes INSERTBUFF=[xxxxxx];


Super User
Posts: 10,571

Re: Move dataset from Server to server

The odbc seems to point to a database; so the best option IMO is to create (or have created) that same odbc connection on server A and use it there in code. Then you only have to jump over the network once.

 

Building a good rapport with system and network admins is usually mandatory for any heavy SAS worker.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Contributor
Posts: 26

Re: Move dataset from Server to server

Posted in reply to KurtBremser

Hi Kurt, 

I tried to use the same odbc on the server connection. I did not find a connection. And as to creating one is not an option here i believe.

The data needs to go Server1->through pc connection -> Server2.         Getting Server1 and server2 to speak is directly is not an option i believe.

Community Manager
Posts: 3,462

Re: Move dataset from Server to server

The best advice is to find a direct connection from the server -- define the path to the data in terms of the server that you're working on.  On server A that might be an ODBC DSN, and on server B it might be a LIBNAME to MYSQL.  I actually have that situation here in my work.  

 

But, if Server A and Server B cannot talk to the same data source, you can automate the transfer in your SAS Enterprise Guide process flow. This technique is called "going around your elbow to get to your thumb."

 

Use the Tasks->Data->Download SAS Data Sets task, then Tasks->Data->Upload SAS Data Sets task.  It even works if the source you're downloading is a database table.  It also fixes encoding differences where needed.  Connect those steps together, and you've got your SAS Enterprise Guide session as a go-between, practicing shuttle data diplomacy between the two servers who can't manage to speak to each other.  Inefficient use of network bandwidth, but at least a time saver for your effort.

 

updown.png

 

 

 

 

Contributor
Posts: 26

Re: Move dataset from Server to server

Posted in reply to ChrisHemedinger
Hi Chris,

Thanks for the response.
I have made that solution while looking around for options. But that solution solves the manual work (which in reality is 2-3 minutes of work). The big issue is the download to pc/upload to pc takes a ton of time. And this is the real issue im having.

What's both frustrating, and the reason im sure there is a solution to my problem. Is that through my enterprise guide, i can look in server connections, and see both server1 and server2. So sas has a connection to both.

Im currently looking at http://support.sas.com/resources/papers/proceedings11/143-2011.pdf.

But im unable to get it to work sadly
Solution
‎02-15-2018 06:27 AM
Community Manager
Posts: 3,462

Re: Move dataset from Server to server

The technique in that paper relies on SAS/CONNECT, which must be installed/configured on each of those SAS sessions so that you can run PROC UPLOAD/DOWNLOAD or use remote library services.

 

Another option is SAS/SHARE, which can make the data from one server available to any other SAS session on the network.  But that also requires a setup by an admin and a dedicated process.

 

So right now you do have at least two nodes on the network that can talk to both machines: SAS Enterprise Guide (your PC) and the SAS Metadata Server (which might even be the same node as one of those boxes).  So I agree with you that there must be a way to get these two machines to talk to one another.  

 

As others have said, there is a prerequisite human component: the right people have to talk to one another, and then tech connections can happen.   You might be able to help by collecting some info.  In EG, open the Servers list and check the Server properties of server1 and server2, then make note of the node names. This will help show that they are (or are not) on the same network zone.

Super User
Posts: 10,571

Re: Move dataset from Server to server

TALK.TO.YOUR.ADMINS.

 

I mean that. Really. As soon as you have the odbc connection on the right server, your task is a breeze. Without it you're just banging your head against the wall. Which does not solve anything and only causes headaches.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
☑ This topic is solved.

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

Discussion stats
  • 8 replies
  • 285 views
  • 0 likes
  • 3 in conversation