Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

cannot register table to library

Reply
New Contributor
Posts: 2

cannot register table to library

When  I try to register table(view from sybase ASE) to library i get the following error, but when i register table(table from sybase ASE)  i have no problems. 

*****************************************************************

 

 

NOTE: End of registration for table library.view_name.


NOTE: Additional host information:

X64_SRV12 WIN 6.2.9200 Server

NOTE: SAS Initialization used (Total process time):

NOTE: The autoexec file, D:\SAS\Config\Lev1\SASApp\WorkspaceServer\autoexec.sas, was executed at server initialization.
1 LIBNAME libray ODBC DATAsrc=datasourcename SCHEMA=dbo USER=dbo_user_net
1 ! PASSWORD=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ;
NOTE: Libref libray was successfully assigned as follows:
Engine: ODBC
Physical Name: transferencias
2

3 PROC SQL;
3 ! CREATE TABLE work._memTypes AS
4 Select MEMTYPE, MEMLABEL, COMPRESS, ENCRYPT, DBMS_MEMTYPE from dictionary.tables where libname="library" and
4 ! memname="view_name" and MEMTYPE in ("DATA", "VIEW");; quit;
NOTE: Table WORK._MEMTYPES created, with 1 rows and 5 columns.

NOTE: PROCEDURE SQL used:

 

5 PROC SQL;
5 ! CREATE TABLE work._cols AS
6 Select NAME, TYPE, LENGTH, FORMAT, INFORMAT, LABEL, NOTNULL from dictionary.columns where libname="library"
7 and memname="view_name" and MEMTYPE in ("DATA", "VIEW");
NOTE: Table WORK._COLS created, with 24 rows and 7 columns.

7 ! quit;
NOTE: PROCEDURE SQL used:

8 PROC SQL;
8 ! CONNECT TO ODBC( DATAsrc=datasourcename USER="dbo_user_net"
8 ! PASSWORD=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX );
9 CREATE TABLE _Indexes AS
10 SELECT COLUMN_NAME, INDEX_NAME, SEQ_IN_INDEX, UNIQUE, 0 as ISPRIMARY
11 FROM CONNECTION TO ODBC(DBMS::Indexes("","dbo","view_name"))
12 order by INDEX_NAME desc;
NOTE: Table WORK._INDEXES created, with 0 rows and 5 columns.

13 QUIT;
NOTE: PROCEDURE SQL used:

14

15 PROC SQL;
16 CONNECT TO ODBC( DATAsrc=datasourcename USER="dbo_user_net"
16 ! PASSWORD=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX );
17 CREATE TABLE _PrimaryKeys AS
18 SELECT COLUMN_NAME FROM CONNECTION TO ODBC(DBMS:Smiley TonguerimaryKeys("","dbo","view_name"))
19 QUIT;
NOTE: Table WORK._PRIMARYKEYS created, with 0 rows and 1 columns.

20

NOTE: PROCEDURE SQL used:

21 PROC SQL;
22 CONNECT TO ODBC( DATAsrc=datasourcename USER="dbo_user_net"
22 ! PASSWORD=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX );
23 CREATE TABLE _ForeignKeys AS
24 SELECT PKCOLUMN_NAME, FKTABLE_NAME, FKCOLUMN_NAME
25 FROM CONNECTION TO ODBC(DBMS::ForeignKeys("","dbo","view_name", "", "", ""))
26 QUIT;
ERROR: Error executing CLI query statement: [SAP][ASE ODBC Driver][Adaptive Server Enterprise]Object does not exist in this
database.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
27

 

Thank you!

SAS Employee
Posts: 199

Re: cannot register table to library

Posted in reply to Chrystopher

Hi @Chrystopher

 

Did you have a look at Problem Note 43224 (An error message appears in your SAS® log if you use the METALIB procedure to register or update a view that is defined in a Sybase database)?

if you try to use the METALIB procedure, what is the behaviour (valid if you're trying to register table from SAS Management Console)?

Do you have the issue with any Sybase view or maybe those with an index?

 

Hope that helps.

 

Cheers,

Damo

Ask a Question
Discussion stats
  • 1 reply
  • 282 views
  • 0 likes
  • 2 in conversation