- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Perl quoting Problem doing select on Oracle.
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
Forums
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
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
тАО12-12-2005 06:49 PM
тАО12-12-2005 06:49 PM
I have a stupid problem hier. I have following piece of code:
$s=qx{/opt/oracle/ora92s/bin/sqlplus -SL /nolog <
off linesize 300 pagesize 0 pause off
connect / as sysdba
whenever sqlerror exit failure
select value from v$parameter where name = 'background_dump_dest';
exit
END};
I don't know how to quote v$parameter, so that it is read as v$parameter, not as v or something like that.
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2005 07:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2005 07:45 PM
тАО12-12-2005 07:45 PM
Re: Perl quoting Problem doing select on Oracle.
have you looked at perldoc -q quote ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2005 07:46 PM
тАО12-12-2005 07:46 PM
Re: Perl quoting Problem doing select on Oracle.
open ORA, "|/opt/oracle/ora92s/bin/sqlplus -SL /nolog\n";
print ORA "set echo off termout off heading off feedback off trimspool on trimout on verify off linesize 300 pagesize 0 pause off\n";
print ORA "connect / as sysdba\n";
print ORA "whenever sqlerror exit failure\n";
print ORA "select value from v\$parameter where name = 'background_dump_dest';\n";
print ORA "exit\n";
close ORA;
It worked.
But now I don't know how to put the output of this in a variable, instead to STDOUT.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2005 07:51 PM
тАО12-12-2005 07:51 PM
Re: Perl quoting Problem doing select on Oracle.
@arr=qx [ command1; command2; command3; etc.. ]
print @arr;
gives that.
-Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2005 07:59 PM
тАО12-12-2005 07:59 PM
Re: Perl quoting Problem doing select on Oracle.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2005 08:04 PM
тАО12-12-2005 08:04 PM
Re: Perl quoting Problem doing select on Oracle.
$param1="v$parameter";
@arr=qx [ command1;select value from $param1 where name= ... ]
You can also try with ` ` instead of qx [ ] to accomplish this.
-Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2005 08:18 PM
тАО12-12-2005 08:18 PM
Re: Perl quoting Problem doing select on Oracle.
Unfortunately nothing works. I dont't know anymore and I am leaving it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2005 08:45 PM
тАО12-12-2005 08:45 PM
Re: Perl quoting Problem doing select on Oracle.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2005 09:05 PM
тАО12-12-2005 09:05 PM
Re: Perl quoting Problem doing select on Oracle.
Perhaps I will use the "print HANDLE" approach and a file as a buffer, where the output is written, because two way communication in Perl is a bit complex for me.