BookmarkSubscribeRSS Feed
marcus_daman
Calcite | Level 5

Dear all,

 

we are trying to switch over from a Sybase 15.1 data base to MS SQL server 2016. In SAS Management Console, we have named the libref 'sybsprod' (label: ATLAS) for Sybase and the libref 'live' (label: POCMSSQL) for MS SQL. The content of the two libraries are exactly the same (table names and columns).

 

In our SAS EG scripts (6.1 version, and SAS Base 9.3), the tables are pointing to the 'ATLAS' label and now have to change to the 'POCMSSQL' table. If we are only changing the libref's in SAS Base, that would be an easy exercise. However, in the EG scripts we only have the manual change of the table references to the new library. We have almost 100 scrpts all over the company.

 

Note: We have only one production instance, where we do develop and deploy live versions.

 

Do you know an easy solution to switch library labels of all the tables?

 

In addition, do you see any other impact on the switch process?

 

Thank you in advance and best regards.

2 REPLIES 2
LinusH
Tourmaline | Level 20

Not sure how, and what impact in your EG scripts the library label has. Can you elaborate and give some examples?

 

On power of SAS is that you can change the data source without changing your code. So my immediate thought would be to keep the same libref for the new database connection, and that would hopefully leave your code working without changes.

 

That said, EG is primarily an ad-hoc environment. If you wish to create production batch jobs within EG it is important to design the jobs accordingly. One principle is to use meta librefs whenever appropriate.

Data never sleeps
SASKiwi
PROC Star

If you had more than one Production instance I think you could duplicate your database sources (different names/labels but same LIBREFs) and have the Sybase sources assigning only on one instance and the SQL Server instances only on the other.

 

Setting up a new server instance would be helpful for testing also.

 

On the other hand the EG find/replace function can easily go through a program and automatically change all LIBREFs. 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1719 views
  • 0 likes
  • 3 in conversation