Desktop productivity for business analysts and programmers

How to recover previous version of the overwritten SAS data set?

Reply
New Contributor
Posts: 4

How to recover previous version of the overwritten SAS data set?

Hi,

 

One of our user accidentally overwrote the original dataset. Could anyone please tell me how to recover previous version of the dataset?

 

I appreciate the help.

 

Regards,

Paulina

Super User
Posts: 22,865

Re: How to recover previous version of the overwritten SAS data set?

Posted in reply to paulinalawson

Are you on Windows or Unix? SAS Server? If its windows and on a local drive and you have versioning set up, go to the parent folder, click properties, see previous versions - may have to a wait a few minutes for it to populate (literally a few minutes). 

 

New Contributor
Posts: 4

Re: How to recover previous version of the overwritten SAS data set?

SAS Server is on Windows. Under Previous Versions it says "There are no previous versions available". 

 

I see that Shadow Copies of Shared Folders to make Previous Versions available is not enabled and configured on the file server.

Super User
Posts: 22,865

Re: How to recover previous version of the overwritten SAS data set?

Posted in reply to paulinalawson

:'( then its bye bye unless you can get a backup copy from a nightly/weekly backup. That's usually time intensive/$$.

Super User
Posts: 3,771

Re: How to recover previous version of the overwritten SAS data set?

Posted in reply to paulinalawson

If this dataset was stored in a server folder, check with your IT folks regarding server backups, and whether you can get the dataset restored from backup. If this was stored on a PC then it is unlikely to be backed up anywhere and SAS does not do backups itself.

New Contributor
Posts: 4

Re: How to recover previous version of the overwritten SAS data set?

Dataset has been stored on server folder.

New Contributor
Posts: 4

How to recover previous version of SAS data set?

Posted in reply to paulinalawson

Hi,

 

One of our user accidentally overwrote the original dataset. Could anyone please tell me how to recover previous version of the dataset?

 

I appreciate the help.

 

Regards,

Paulina

Occasional Contributor
Posts: 19

Re: How to recover previous version of SAS data set?

Posted in reply to paulinalawson
Not sure how you can do that in SAS, but restore-backup team in your company should be able to recover that for you ! you just need to tell them the date and time that you want the dataset or any file for that matter..! for example if your friend over write the dataset on 12 today, you ask them to restore the same dataset from 11.59 or before..!


Super User
Posts: 13,073

Re: How to recover previous version of SAS data set?

Posted in reply to paulinalawson

@paulinalawson wrote:

Hi,

 

One of our user accidentally overwrote the original dataset. Could anyone please tell me how to recover previous version of the dataset?

 

I appreciate the help.

 

Regards,

Paulina


If you do not have a backup (after checking with your IT staff) then how was the data set created initially? If it was read from another data source did you keep that program and source file? If so, rerun that code (and any cleaning/modification step up do but not the code which destroyed.

Now, go back through all of your code and change all the instances of

 

Data olddataset;

   set olddataset;

 

to something like

Data newerdataset;

    set olddataset;

 

to prevent this.

 

And beat all the programmers/users that use that old/old syntax with wet spaghetti noodles until they promise to stop.

It might not hurt to bill the time/effort cost to the offending persons project budget as a lesson if possible.

Super User
Posts: 9,610

Re: How to recover previous version of the overwritten SAS data set?

Posted in reply to paulinalawson

@paulinalawson wrote:
Hi,

 

One of our user accidentally overwrote the original dataset. Could anyone please tell me how to recover previous version of the dataset?

 

I appreciate the help.

 

Regards,

Paulina


Very easy. Restore from your backup.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 9 replies
  • 264 views
  • 2 likes
  • 6 in conversation