Date: Tue, 24 May 2005 17:27:49 +0300
Reply-To: Hunter <huntertaylor@SURFEU.FI>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Hunter <huntertaylor@SURFEU.FI>
Subject: Re: find oracle database tables from Proc SQL
Content-Type: text/plain; charset="iso-8859-1"
Steve Raimi wrote:
> You're specifying mydb as the libname for the Oracle connection, so the
> last line of your query would be "where libname = 'MYDB' ". If you change
> that, the sample code should work for you.
ok, please allow me to recap this then as I still am missing some piece of information
(1) my "tnsnames.org" looks like this, where the "SERVICE_NAME" is the actual name of
the database on oracle server
(ADDRESS = (PROTOCOL = TCP)(HOST = 220.127.116.11)(PORT = 1521))
(SERVICE_NAME = myDatabase)
(2) I do not understand how the sample below (and it does not work) connects to the
database names "myDatabase" as it is not being referenced in the libname or the proc
(3) In a SQL server libname, I would specify a DSN or I would specify DATABASE, there
is no such statement in the oracle libname below, is that why this does not work?
(Note: I have no trouble reading SQL server databases and tables)
(a) my oracle server IP address 18.104.22.168
(b) my oracle server database name myDatabase
(c) I have admin userid and password to this database (myID, password)
libname mydb oracle (server=22.214.171.124;user=myID,password=password);
*note: the database name is not specified - why not?;
select mem_name, engine
where libname = 'MYDB';
(4) If the above starts working, how is a sample table being accessed, for example, I
have inside the database myDatabase, a table named myTable ?
assuming mem_name lists myTable as one of the tables, would it look something like
select * from MYDB.myTable