[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.6

sqlplus background nohup for multiple sql statements

Asked by dplinnane in Unix Operating Systems, Oracle Database, Databases Miscellaneous

Tags: sqlplus oracle unix

I want to run multiple statements in parallel not sequentially
dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'TABLE_1');
dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'TABLE_3');
dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'TABLE_3');

want to create sql scripts for each statements so I can run then like
nohup sqlplus system/system  @script1.sql &
nohup sqlplus system/system  @script2.sql &
nohup sqlplus system/system  @script3.sql &

I want to be able to so something like
nohup sqlplus system/system  dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'TABLE_1');&
nohup sqlplus system/system  dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'TABLE_2');&
nohup sqlplus system/system  dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'TABLE_3');&

I'm not sure whether this is possible or not. Below is my first attempt. It gives me erros but runs on of the statements.
ERRORS

SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon>  ::= <username>[/<password>][@<connect_identifier>] | /

SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon>  ::= <username>[/<password>][@<connect_identifier>] | /
BEGIN dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'SLS_ITEM_LM_DM', partname=>'SLS_ITEM_LM_DM_2008_Q2'); END;
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
xport NLS_LANG=AMERICAN_AMERICA.UTF8
export ORACLE_SID=rdw
 
sqlplus -silent rdwdm/rdwdm <<EOF &
exec dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'SLS_ITEM_LM_DM', partname=>'SLS_ITEM_LM_DM_2008_Q2');
EOF
 
sqlplus -silent rdwdmrdwdm <<EOF &
exec dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'SLS_ITEM_LM_DM', partname=>'SLS_ITEM_LM_DM_2008_Q3');
EOF
 
sqlplus -silent rdwdmrdwdm <<EOF &
exec dbms_stats.gather_table_stats (ownname=>'RDWDM', tabname=>'SLS_ITEM_LM_DM', partname=>'SLS_ITEM_LM_DM_2008_Q4');
EOF
[+][-]06/30/09 12:08 AM, ID: 24742951Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Unix Operating Systems, Oracle Database, Databases Miscellaneous
Tags: sqlplus oracle unix
Sign Up Now!
Solution Provided By: rolutola
Participating Experts: 4
Solution Grade: A
 
[+][-]06/24/09 09:14 PM, ID: 24708014Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/29/09 09:55 PM, ID: 24742373Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06/29/09 09:56 PM, ID: 24742376Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06/30/09 12:04 AM, ID: 24742927Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/30/09 07:12 AM, ID: 24745490Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/30/09 12:48 PM, ID: 24748857Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07/02/09 07:57 AM, ID: 24764063Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/29/09 03:34 PM, ID: 24975356Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07/30/09 12:23 AM, ID: 24977347Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/04/09 01:05 AM, ID: 25011418Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/04/09 07:39 AM, ID: 25014301Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/04/09 07:54 AM, ID: 25014442Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/27/09 11:10 AM, ID: 25201054Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625