Problem accessing schema in DB
999738Mar 28 2013 — edited Mar 28 2013I 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!