*Gary Mort* bz-gmort at beezifies.com <mailto:talk%40lists.nyphp.org?Subject=%5Bnyphp-talk%5D%20PHP%20Question%20--%20SID%20in%20Oracle&In-Reply-To=475553B7.70303%40vassar.edu>

Dear Gary,

Yes. I can set the database name while making the connection. I use an include file for the connection and make a small change just to the name of the SID when I want to point the whole shebang to the production data.

My problem is that the SID name I return in using getenv is wrong.

But you gave me a really good idea. Instead of using the standard oci connection

$Ora_conn = OCILogon(DB_USER,DB_PASS,DB_NAME) or die ("Couldn't Connect to Oracle");


which uses the define that follows:


define('DB_NAME' , '(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = somemachinehere.vassar.edu)(PORT = XXXX))

                   (CONNECT_DATA = (SID = testserverX)))');

define('DB_USER','myadminuserid');

define('DB_PASS','myadminuserpassword');



I could instead use: $conn = OCILogon($dbuser, $dbpass, $dbtns);

$dbuser = 'myadminuserid';
$dbpass = 'myadminpassword';
$dbtns = 'testerverX';

and $dbtns is a variable I can recall accurately. This is fine as long as the web app can resolve the TNS on it's own (in the config)

I am playing with this and am hopeful that it will work


begin:vcard
fn:Julia Sheehy
n:Sheehy;Julia
org:Vassar College;Administrative Information Services
adr;dom:;;C 221;Poughkeepsie;NY;12604
email;internet:[EMAIL PROTECTED]
title:Programmer/Analyst
tel;work:845-437-5939
note;quoted-printable:Raise money for your favorite charity or school just by searching the Int=
	ernet with GoodSearch - www.goodsearch.com - powered by Yahoo!=0D=0A=
	=0D=0A=
	
x-mozilla-html:FALSE
url:http://computing.vassar.edu/
version:2.1
end:vcard

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to