[Catalyst] Catalyst and oracle database.

Rohan M rohan7799 at gmail.com
Thu Mar 10 10:50:01 GMT 2011


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=3Dstatic* 'dbi:Oracle:sid=3DTEST1;host=3D192.168.100.107; port=3D152=
1' '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=3Dstatic* and fired the command again. The DB.pm fi=
le
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 =3D
    (DESCRIPTION =3D
      (ADDRESS_LIST =3D
        (ADDRESS =3D (PROTOCOL =3D TCP)(HOST =3D 192.168.100.107)(PORT =3D =
1521))
      )
    (CONNECT_DATA =3D
      (SERVICE_NAME =3D 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110310/295c8=
fa7/attachment.htm


More information about the Catalyst mailing list