- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 9i sqlplus + perl
Operating System - HP-UX
1748202
Members
2906
Online
108759
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО02-09-2006 08:42 PM
тАО02-09-2006 08:42 PM
9i sqlplus + perl
Hello!
I have a script, that sholud run a simple sqlplus. Alone, the sqlplus code works, so it shold be OK, but embedded in a Perl-script it doesn't work. Does anybody know why?
Here is the script and some output:
#!/usr/bin/perl
$ENV{'ORACLE_SID'}='test01';
$ENV{'ORACLE_HOME'}='/oracle/ora92/';
$s=qx{/oracle/ora92/bin/sqlplus -SL /nolog < set echo off linesize 1000 pagesize 300
connect / as sysdba
shutdown immediate;
exit
END};
print $s;
_______________________________________________________________
OUTPUT:
[oracle@dbserv0:/tmp/develop/dbscript]$ perl stop.pl
Connected to an idle instance.
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
HPUX-ia64 Error: 2: No such file or directory [oracle@dbserv0:/tmp/develop/dbscript]$ echo $ORACLE_SID test01 [oracle@dbserv0:/tmp/develop/dbscript]$ echo $ORACLE_HOME /oracle/ora92/ [oracle@visap00:/tmp/develop/dbscript]$ echo $ORACLE_BASE /oracle
I have a script, that sholud run a simple sqlplus. Alone, the sqlplus code works, so it shold be OK, but embedded in a Perl-script it doesn't work. Does anybody know why?
Here is the script and some output:
#!/usr/bin/perl
$ENV{'ORACLE_SID'}='test01';
$ENV{'ORACLE_HOME'}='/oracle/ora92/';
$s=qx{/oracle/ora92/bin/sqlplus -SL /nolog <
connect / as sysdba
shutdown immediate;
exit
END};
print $s;
_______________________________________________________________
OUTPUT:
[oracle@dbserv0:/tmp/develop/dbscript]$ perl stop.pl
Connected to an idle instance.
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
HPUX-ia64 Error: 2: No such file or directory [oracle@dbserv0:/tmp/develop/dbscript]$ echo $ORACLE_SID test01 [oracle@dbserv0:/tmp/develop/dbscript]$ echo $ORACLE_HOME /oracle/ora92/ [oracle@visap00:/tmp/develop/dbscript]$ echo $ORACLE_BASE /oracle
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2006 09:59 PM
тАО02-09-2006 09:59 PM
Re: 9i sqlplus + perl
Found it out:
owner of script was oracle, but group was sys. After changing group with chgrp to dba, the script worked.
owner of script was oracle, but group was sys. After changing group with chgrp to dba, the script worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2006 10:20 PM
тАО02-09-2006 10:20 PM
Re: 9i sqlplus + perl
good. Please close the thread.
--
Muthu
--
Muthu
Easy to suggest when don't know about the problem!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2006 11:37 PM
тАО02-09-2006 11:37 PM
Re: 9i sqlplus + perl
See above
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP