- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- PLSQL from unix shell
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
тАО08-04-2005 05:12 AM
тАО08-04-2005 05:12 AM
I need to execute a PLSQL from unix shell script. Like this:
/usr/bin/su - usuopt -c svrmgrl <
declare
p_resposta varchar2(100);
begin
carga_geral_reducao_carbono(p_resposta);
end;
EOF
I need to know the value of p_resposta after execution. How can I get it end print, or store in a variable ?
Thanx,
Lima.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2005 05:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2005 03:24 PM
тАО08-04-2005 03:24 PM
Re: PLSQL from unix shell
You would also need to turn on the serveroutput
SQL> set serverpoutput on.
To aid in the development of PL/SQL programs, stored procedures, and triggers, Oracle provides a public package named DBMS_OUTPUT for displaying debugging Information
In order to use the package with these two tools, you must set the 'serveroutput' before any info can be displayed to the screen. Use the following command in SQL*Plus or SQL*DBA:
SQL> set serveroutput on
Note that 'serveroutput' is one word. If serveroutput is not turned on, nothing will be displayed even if you call the DBMS_OUTPUT.ENABLE packaged procedure.
Indira A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2005 08:36 PM
тАО08-04-2005 08:36 PM
Re: PLSQL from unix shell
To be sure your p_resposta variable always have a value (not null) you can declare p_resposta and initiate it at the same time:
p_resposta varchar2(100) := 'NULO';
The value of p_resposta is affected after you invoke carga_geral_reducao_carbono. So after that you can use the dbms_output package to know its value...
Best Regards,
Eric Antunes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2005 04:32 PM
тАО08-05-2005 04:32 PM
Re: PLSQL from unix shell
i would also add 2 things:
1. Use SQLPLUS instead of svrmgrl
2. you can also spool the result to a file and later verify it when you exit
hopw this helps too!
regards
yogeeraj