[root@prithvi bin]# perl tmp.pl DBI connect('hostname=localhost;port=1527;url=jdbc:derby:mydb%3BsecurityMechanism%3D8','myuser',...) failed: I/O Error 001bd00200010015124c0006114900080006000c00000005114a03 at tmp.pl line 9 Derby system tables -------------------------- Can't call method "prepare" on an undefined value at tmp.pl line 12. [root@prithvi bin]# [root@prithvi bin]# [root@prithvi bin]# cat tmp.pl use DBD::JDBC; $url = "jdbc:derby:mydb;securityMechanism=8"; ## Since space, ';' and '=' is used in DBD dsn, ## we need to encode them in the url: $url =~ s/([=;])/uc sprintf("%%%02x",ord($1))/eg; $dsn = "dbi:JDBC:hostname=localhost;port=1527;url=$url"; $dbh = DBI->connect($dsn, "myuser", "mypassword"); print "Derby system tables\n--------------------------\n"; $sth = $dbh->prepare("select tablename from SYS.SYSTABLES"); $sth->execute(); while (my ($i) = $sth->fetchrow_array) { print "Found: $i\n"; } [root@prithvi bin]# [root@prithvi bin]# /opt/Java/jdk1.6.0_21/db/bin/ij ij version 10.5 ij> connect 'jdbc:derby://localhost:1527/mydb;securityMechanism=8;user=myuser;password=mypassword'; ij>