Skip to Main Content

Problem accessing schema in DB

999738Mar 28 2013 — edited Mar 28 2013
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!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Apr 25 2013
Added on Mar 28 2013
1 comment
1,202 views