Quantcast
Channel: SCN : All Content - SAP MaxDB
Viewing all articles
Browse latest Browse all 322

Need help on DBD::MaxDB

$
0
0

Hi,

 

I am new to MaxDB, I have installed DBD::MaxDB perl package on CentOS X64.

 

I am able to connect and fetch data from localhost but when i am trying to connect to remote database (MaxDB) it fails, with and error.

 

DBI connect('database=<Name>:host=<host_name>,...) failed: Connection failed (RTE:serverDB name too long) at perl2_maxdb_connect.pl line 13

conn at perl2_maxdb_connect.pl line

 

Also it gives an error as,

 

DBI connect('<Database_name>:'<Host_name>',...) failed: Connection failed (RTE:database not running: no request pipe) at perl2_maxdb_connect.pl line 13

conn at perl2_maxdb_connect.pl line

 

Please find my Perl script as below,

 

use DBI;

use DBD::MaxDB;

$platform = "MaxDB";

$database = "<Name_of_Database>";

$host = "<Remote_Host_Name>";

$user123 = "<User_Name>";

$pw = "<Password>";

 

 

$dsn = "dbi:MaxDB:$database:$host";

$dbn = DBI->connect($dsn, $user123, $pw) or die "conn";

$query = "SELECT * FROM ";

$query_handle = $dbn->prepare($query);

$query_handle->execute();

$query_handle->bind_columns(undef,\$name_cl1,\$name_c2);

while ($query_handle->fetch()) {

print "$name_cl1,$name_c2\n";

}

 

Please let me know if i am missing something.


Viewing all articles
Browse latest Browse all 322

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>