sql - perl execution permission error -
i have 1 perl script using script connect sqlserver database , execute stored procedure in case perl scrip give 1 error scrip
use dbi; $host = 'server'; $database = 'db'; $user = 'usr'; $auth = 'pssword'; # dbd::ado $dsn = "provider=sqloledb;trusted connection=yes;"; $dsn .= "server=$host;database=$database"; $dbh = dbi->connect("dbi:ado:$dsn", $user, $auth, { raiseerror => 1, autocommit => 1} ) || die "database connection not made: $dbi::errstr"; $sql = "exec [dbo].[get_status] '2013-10-31','00',320,'mbm40cashflw'"; $sth = $dbh->prepare($sql); $sth->execute(); $sth->finish(); $dbh->disconnect();
above script use dbi:ado driver. give full grand permissions in stored procedure
errors
dbd::ado::st execute failed: can't execute statement 'exec [dbo].[sap.get_status_load_data] '2013-10-31','00!',320,'mbmy_fcl_s40cashflw'' lasterror: -2147217871: ole exception "microsoft ole db provider sql server": query timeout expired win32::ole(0.1709) error 0x80040e31 in method/propertyget "execute" description: query timeout expired helpcontext: 0 helpfile: nativeerror: 0 number: -2147217871 source: microsoft ole db provider sql server sqlstate: hyt00 @ c:\users\administrator\desktop\temp\testdbconn.pl line 19.
please me .....
have tried setting timeout attributes? perhaps:
{ raiseerror => 1, autocommit => 1, ado_connectiontimeout => 300, commandtimeout => 300}
(depending on current timeouts are).
Comments
Post a Comment