- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- scripting
Operating System - HP-UX
1753519
Members
5093
Online
108795
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
Go to solution
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
тАО04-28-2004 07:57 PM
тАО04-28-2004 07:57 PM
Hi
My first question so please excuse my inexperience.
I write scripts that always seems require sqlplus. To monitor for errors I run my sql within a variable and then do checks on the variable searing for string to determine failure or not. This all works well normally.
My problem is that for this one script I am getting a <scriptname>[36]: no space message displayed. The offending lines are as follows
SQLRESULTS=`/u01/app/oracle/product/8.0.6/bin/sqlplus -S xxxx/xxxxxxxx @$scriptname $scriptoutput < /tmp/endsql.txt`
This is where the results from sqlplus are held
print $SQLRESULTS | grep -q "ORA-"
This is where I search for oracle errors
<scriptname>[36]: no space
This is the error message from unix. Unix doesn't seem to like me displaying the results of variable SQLRESULTS and grep 'ing it due to a size restriction
Can someone please advise.
Thanks
heb
My first question so please excuse my inexperience.
I write scripts that always seems require sqlplus. To monitor for errors I run my sql within a variable and then do checks on the variable searing for string to determine failure or not. This all works well normally.
My problem is that for this one script I am getting a <scriptname>[36]: no space message displayed. The offending lines are as follows
SQLRESULTS=`/u01/app/oracle/product/8.0.6/bin/sqlplus -S xxxx/xxxxxxxx @$scriptname $scriptoutput < /tmp/endsql.txt`
This is where the results from sqlplus are held
print $SQLRESULTS | grep -q "ORA-"
This is where I search for oracle errors
<scriptname>[36]: no space
This is the error message from unix. Unix doesn't seem to like me displaying the results of variable SQLRESULTS and grep 'ing it due to a size restriction
Can someone please advise.
Thanks
heb
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 08:07 PM
тАО04-28-2004 08:07 PM
Solution
Why not just output the 'sqlplus' command to a temporary file, and grep that?
TMPFILE=/tmp/$$.tmp
/u01/app/oracle/product/8.0.6/bin/sqlplus -S xxxx/xxxxxxxx @$scriptname $scriptoutput < /tmp/endsql.txt > $TMPFILE
grep -q "ORA-" $TMPFILE
....
rm $TMPFILE
This will do away with the need to have a large amount of environment space allocated.
TMPFILE=/tmp/$$.tmp
/u01/app/oracle/product/8.0.6/bin/sqlplus -S xxxx/xxxxxxxx @$scriptname $scriptoutput < /tmp/endsql.txt > $TMPFILE
grep -q "ORA-" $TMPFILE
....
rm $TMPFILE
This will do away with the need to have a large amount of environment space allocated.
One long-haired git at your service...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2004 08:34 PM
тАО04-28-2004 08:34 PM
Re: scripting
Thanks Stuart
I got caught up trying to solve the no space message rather than taking a step back and going for the simple solution.
I got caught up trying to solve the no space message rather than taking a step back and going for the simple solution.
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