This discussion is archived
1 Reply Latest reply: Mar 28, 2013 8:20 AM by 999738 RSS

Problem accessing schema in DB

999738 Newbie
Currently Being Moderated
I am operating on a DB that has 82 different schemas. I have read the Underground PHP Manual, searched google and searched the forum here with no results. The setup is as follows - I have a database called 'asmp' and I need to access data from the schema 'apps' within that DB.

I can use either connection string successfully:
$db = "(DESCRIPTION= (ADDRESS = (PROTOCOL = TCP)(HOST = ".$this->DBhost.")(PORT = ".$this->DBport."))                    (CONNECT_DATA=(SID=".$this->DBserviceName.")))";
$this->connection = @oci_connect($this->DBuserName, $this->DBpassWord, $db);
Where $this->DBserviceName = "asmp"

-- OR --

$this->conn=@oci_connect($this->user,$this->password,$this->database)
Where $this->database = $hostaddr."/asmp");

If I change the 'asmp' in either statement above to 'apps' I get an 'ORA-12514: TNS:listener does not currently know of service requested in connect descriptor' error.

I simply need to know how to switch to the 'apps' schema once I am connected to the 'asmp' DB. Seems simple but I cannot find anything on this subject. Thank you all in advance!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points