Error in Libname

Reply
Regular Contributor
Posts: 212

Error in Libname

Hi, i'm a fraud consultant and need a way to correct this error:

ERROR: Libname ODBC is not assigned.

ERROR: Error in the LIBNAME statement.

This is the libname i use:

Libname ODBC Properties="DSN=SQL_NANNY;Description=SQL;UID=xxxx;DATABASE=Fraud;Trusted_Connection=Yes";

These are the products i 'm licensed:

---Base Product                                                            30OCT2015 (CPU A)

---SAS/STAT                                                               30OCT2015 (CPU A)

---SAS/GRAPH                                                            30OCT2015 (CPU A)

---SAS/CONNECT                                                        30OCT2015 (CPU A)

---SAS Enterprise Miner                                                30OCT2015 (CPU A)

---SAS Integration Technologies                                    30OCT2015 (CPU A)

---Enterprise Miner Server                                             30OCT2015 (CPU A)

---Enterprise Miner Thin Client                                       30OCT2015 (CPU A)

---SAS/ACCESS Interface to ORACLE                          30OCT2015 (CPU A)

---SAS/ACCESS Interface to PC Files                           30OCT2015 (CPU A)

---SAS/ACCESS Interface to ODBC                              30OCT2015 (CPU A)

---SAS/ACCESS Interface to Teradata                          30OCT2015 (CPU A)

---SAS Workspace Server for Local Access                  30OCT2015 (CPU A)

An additional:

When i connect via ODBC by hand, Open > ODBC and declare a new datasrc, it works, but if i try to load a dataset larger than 10.000 rows it can't be loaded. The example is in the attachment.

Another, sometimes i use another type of libname and gets an error that my data source it is not recognized.

odbc.png


I've tried to use the same connection of then ODBC by hand but do not work.


Sometimes this error appear when i use the other type of libname connection:


ERROR: CLI error trying to establish connection: [Microsoft][ODBC Driver Manager]

Data source name not found and no default driver specified

What shall i do ?

Tks,

Dartibali Rodrigo

Valued Guide
Posts: 2,111

Re: Error in Libname

Check the documentation.

SAS/ACCESS(R) 9.4 for Relational Databases: Reference, Sixth Edition

You need to include a "libref" in between "LIBNAME" and "ODBC".

Questions like this would be better posted to the "SAS Macro Language and DATA Step" forum.

Regular Contributor
Posts: 212

Re: Error in Libname

Yes i Know, but i just removed the name from here. The point is it can't recognize the data source and i've declared it in my ODBC in windows either.

Tks,

Dartibali Rodrigo

Grand Advisor
Posts: 17,389

Re: Error in Libname

If you've set it up in your computers DSN and it works something like the following should work:

Libname test ODBC dsn=sqlnanny schema=dbo;


data want;

set test.tb_fews_action;

run;


It May be case sensitve

Regular Contributor
Posts: 212

Re: Error in Libname

I ran this one and get this error:

ERROR: CLI error trying to establish connection: [unixODBC][Driver Manager]Data source name not found, and no default driver

       specified

ERROR: Error in the LIBNAME statement.

Valued Guide
Posts: 2,111

Re: Error in Libname

You need to talk to your local SAS admin.  You have shown error messages from both Windows and Unix; SAS uses very different approaches to ODBC on the different platforms.

Grand Advisor
Posts: 17,389

Re: Error in Libname

I'm assuming you fixed the spelling/case?

Try the instructions here - specifically testing it first. Otherwise, you will need to talk to your server administrator.

Regular Contributor
Posts: 212

Re: Error in Libname

Yes, i think this is it. Because, we here use SAS EG in a machine placed in USA.

This machine only has access to SAS, and nothing else.

Maybe it's because the ODBC it is not set up in this machine on windows.

Tks,

Dartibali Rodrigo

Regular Contributor
Posts: 212

Re: Error in Libname

Thank you guys anyway.

Tks

Valued Guide
Posts: 3,206

Re: Error in Libname

I remember : https://communities.sas.com/message/205459 you can specify all in the connection string  (saskiwi)

---->-- ja karman --<-----
Regular Contributor
Posts: 212

Re: Error in Libname

Yes, i ran this and get this error:

ERROR: CLI error trying to establish connection:



Regular Contributor
Posts: 212

Re: Error in Libname

I ran this and got the same error before:

ERROR: CLI error trying to establish connection: [Unix][ODBC Driver Manager]

Data source name not found and no default driver specified

Grand Advisor
Posts: 9,584

Re: Error in Libname

The Error said data source is not specified.

You need set up a connection(i.e. Data Source Name) in ODBC.ini file if your SAS Server OS is Linux or Unix .

Valued Guide
Posts: 3,206

Re: Error in Libname

DartibaliRodrigo You are connecting to a machine in USA for EGuide. That is not your desktop that is a different (virtual machine desktop).

Do not expect your local desktop is the same one as that virtual one.   What you do on your desktop with ODBC is not available on any other including that remote one.
Obviously you tried something on that remote remote desktop op and than run into that first cli error. You maybe have coded a libname statement and run that on the server Eguide is connecting to getting that CLI Unix error message. There is you third machine to be aware of. The sas processes run on that Unix server not on your desktop and not on the same machine where EGuide is sitting.
As you are needing the ODBC connection in your libname (SQL server?) you could specify all  options for that sas process on that Unix server.  That construction is of isolated machines is most likely done for preventing actions like placing the data by users. In that case you have to ask why and who made up those limitations.   

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 13 replies
  • 3107 views
  • 0 likes
  • 5 in conversation