Dear All,

 I'm trying to use Oracle database as a back-end database for Catalyst
application. (I tried MySQL and its working properly for me ).

 At first, I tried the following command  -

 perl script/testapp_create.pl model DB DBIC::Schema DB::Schema *
create=static* 'dbi:Oracle:sid=TEST1;host=192.168.100.107; port=1521' 'user'
'pass'

 This command ended up with an error
 "*ORA-12505: TNS:listener does not currently know of SID given in connect
descriptor (DBD ERROR: OCIServerAttach)* "

Then, I removed *create=static* and fired the command again. The DB.pm file
appeared in the Model directory but there was no Schema->Result directory. I
manually created one class (.pm) representing a table and put that under
Result directory which normally gets created after a successful run with the
above mentioned command.

 I still get the above mentioned error when I try to fetch data from the
table since there is no connection to Oracle database.

 Testing done for Oracle connection:
1) I checked for ORACLE_HOME and PATH variables and they are set properly.
2) I tested oracle client connection by using sqlplus with the same SID ,
username and password.
3) I could connect the oracle using DBI class through Perl.(DBD::Oracle is
present).

This is how the tnsnames.ora file look like....

TEST1 =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.107)(PORT = 1521))
      )
    (CONNECT_DATA =
      (SERVICE_NAME = test.abcd.com)
    )
 )



Could somebody tell me the Proper command  to create model for Oracle
database?
perl script/testapp_create.pl model .......

OR Am I missing on anything?

Thanks and regards,
-- 
Rohan M
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to