- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Perl script unable to connect to DB when its run u...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2012 04:11 AM
07-11-2012 04:11 AM
Hi Gurus,
I have a strange issue. when I ran the perl scripts through hp-ux prompt it us running successfully, but when I run the script through OVSD, its giving the below error:
Output: DBI connect('db','user',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc. a
Couldn't connect to database: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc.
Before it was running fine, but after the restart of the server, its not running now.
Need urgent help on it.
Ghazanfar Aziz
Solved! Go to Solution.
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2012 11:31 PM
07-11-2012 11:31 PM
SolutionWhen you run the script through the HP-UX command prompt, your environment variable settings include the proper ORACLE_HOME, SHLIB_PATH/LD_LIBRARY_PATH etc. settings that allow the script to use the Oracle libraries successfully. When OVSD runs the script, the environment variables are different: probably some settings are missing.
Before the system reboot, your OVSD was probably started manually from a command prompt session that included the required environment variable settings for Oracle. Thus, the OVSD had inherited the variables from the command prompt session and passed them on to all its child processes.
But when you restarted the server, OVSD was probably started by a start-up script: in HP-UX, the start-up scripts usually have very minimal environment settings. So it is very likely that OVSD now does not have the correct environment settings, and so cannot pass them to any processes it starts... and this is why your scripts fail.
If you stopped OVSD and re-started it from a command prompt that can run the scripts successfully, you might see OVSD "miraculously" start running the scripts successfully again. But that is not a real fix, just a quick workaround: next time the system was rebooted, this issue would appear again.
You have two ways to fix this:
- either modify the start-up script for OVSD so that it sets and exports the necessary environment variables before starting OVSD (NOTE: document your modification so that you'll know where to make changes the next time Oracle is upgraded.)
- or make OVSD do something to set up the necessary variables before it runs the scripts: e.g. create a wrapper script that initializes the variables required by Oracle and then runs the actual Perl script, then make OVSD run the wrapper instead of the actual script. (this might be considerad at least somewhat self-documenting, as anyone viewing the OVSD configuration should see that a wrapper is being used)
I'm not familiar with OVSD, so unfortunately I cannot provide any detailed instructions.
- Tags:
- PATH