Forum Stats

  • 3,826,761 Users
  • 2,260,705 Discussions


Problem accessing schema in DB

999738 Member Posts: 2
edited Mar 28, 2013 11:20AM in PHP
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 --

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!


This discussion has been closed.