Getting error as Database locked while running a script

While i am trying to run a script in which it calls an executable(binary code)processes a file using the data in database.

But while running the script the following error is occured.

"permission to access this database was denied
<err-0025-0191>re /ds1/nrms_r.db9 while looking up file database /ds1/nrms_r.db9 (host "phpprmt") (err_permission_denied)".

I dont know the cause of this problem.

I want to know whether /tmp or /var partition has anything relation with this error.

Please help me out in resolving this.

Thanks in advance.